-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add codepen button to examples - part 1! #1532
Conversation
@spectranaut |
@mcking65 Otherwise the Code Pen button focus styling looks good and so far all the example load. The only artifact is that is the example code contains links, activating them in code pen loads the entire APG page. |
@spectranaut @mcking65 @jongund |
@spectranaut would it be possible to include an We could also do this via the API with |
I implement @ZoeBijl's idea to include the default example page styling in I think it's not such a big problem that clicking it pulls in the whole example page -- unless you really think it is, @jongund ? |
@jongund @carmacleod @smhigley @charmarkk @a11ydoer @jnurthen I'd like a couple of approving reviews on this. No need to look at any of the code; just make sure that the button on the example page and result in codepen sufficiently meet expectations. I'd like to merge by Friday if possible. |
I have checked 6 examples above. I can confirme that the button on the example page, results in codepen sufficiently meet expectations. One side note, one of whistles and bells we can ignore. It would be nice to transfer the APG example page title to codepen title sincec codepen title is "untitled" for each example. This is fancy and great help for developers, @spectranaut and @mcking65 |
Regression test coverage:Examples without any regression tests:
Examples missing some regression tests:
Example pages with Keyboard or Attribute table rows that do not have data-test-ids:
SUMMARY:55 example pages found. ERROR - missing tests: Please write missing tests for this report to pass. |
@@ -401,6 +401,10 @@ function addOpenInCodePenForm( | |||
css: '', | |||
js: '', | |||
head: '<base href="' + location.href + '">', | |||
css_external: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woohoo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
This is so cool! Thanks, @spectranaut !
Approving as-is, but if you wanted to add a title for @a11ydoer, then I think we could just use:
var path = location.pathname.split('/');
var title = path.length > 1 ? path[path.length - 2] : ''; // example directory
and then just add the following line to the postJson:
title: title,
This PR adds codepen buttons to the following examples! To test locally, you will have to serve the example file with a web server (described here).
RawGitHack preview links