-
Notifications
You must be signed in to change notification settings - Fork 355
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
disclosure navigation Example: Add "Open in CodePen" button #1651
Conversation
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. |
Hmm, I see what you mean. I guess the Menubar navigation has the same problem - sorry I didn't notice earlier. Treeview navigation will have the problem, too - currently being reviewed in #1558. I wonder if we should maybe leave the codepen button off of the navigation examples until this problem is fixed? How might updating to the latest APG coding guidelines help? Also, curious whether we would still need CodePen's |
Thanks for the thoughts @carmacleod !
We definitely need an item about updating the APG coding guidelines to include things you can and can't do in order to open the example in codepen! But I'm really not sure the technical solution for these navigational menus. I haven't had a moment to really put on my thinking cap about it, however.
Unfortunately, we really do need the |
Right, forgot about the carousel images. Are there any examples that need the The Menu Button example uses absolute URLs, so it's ok (hmm, but the codepen button in that example doesn't have the right style). I guess the Breadcrumb Example uses relative links into the APG, so it currently needs the Can't think of any others, but I didn't look deeply. |
i just looked through and your right, I don't think there are any relative links that are essential to the examples, so it is just the images. I also just tried to remove the "base" url override locally to test if the example would work in codepen, and it didn't -- but it turns out it didn't because the "onclick" handler is never replaced because of an error! I just pushed a fix for that. With that fix, the example does work if you remove the "base" reference. So one option for a fix is to consider changing the way we bring in images and removing base to get the examples that use fake links to work. But I also thought of another option -- if we are replacing the default behavior for activating a link in this example anyway, we could just call |
Interesting thought, @spectranaut. I will have to defer to @smhigley on that, because she wrote DisclosureNav. |
9f6690a
to
6086d3e
Compare
6086d3e
to
3aade06
Compare
Resolved the conflicts! |
I think I prefer this option if it can work for all examples. |
3aade06
to
1a30872
Compare
However, looking at this particular example, the scrolling that happens by navigating to the fragment |
@zcorpan this was discussed and resolved in the other disclosure nav example, I think it would make sense to adopt the same approach for this one: #1614 (comment) |
1a30872
to
3f207ae
Compare
@smhigley OK, so use regular link and don't |
@mcking65 should this be merged? |
Although minutes for October 19 meeting do not indicate a merge decision, my memory of the discussion is that the current behavior of the example when viewed in Codepen, while not ideal, is acceptable. So, I will merge. |
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.
Approving based on memory of Octt 19, 2021 meeting discussion
Hi everyone! This "Open to codepen" is in it's own PR because I'm not totally sure how to move forward with it.
Here is example: Preview Disclosure Navigation Example
The problem is that when we open these examples in codepen, the links send you back to the APG page instead of just updating the main content within the copepen HTML rendering. The reason why is that we send a
base
url to Codepen so that all images and links in the HTML lead back to the APG website.The codepen example works up until you click a link, so it is probably useful to most programmers. My suggestion is that we leave it in this state for now, and see if there is an elegant solution to keep the example links working in codepen when the example is updated to our APG coding guidelines (this example hasn't been updated yet).