Repository navigation
[usa-footer]: Preserve existing heading structure - #5044
Merged
Merged
Conversation
paulathevalley
marked this pull request as draft
November 16, 2022 21:05
paulathevalley
marked this pull request as ready for review
November 18, 2022 02:42
Contributor
Author
|
Apologies for opening the PR too early. Ready for review now. |
mejiaj
suggested changes
Dec 21, 2022
mejiaj
left a comment
Contributor
There was a problem hiding this comment.
@paulathevalley thanks for the contribution!
Just a few questions:
- This allows users of big footer to use any heading element by simply updating header in
.usa-footer__primary-link, right? For example, if I wanted to useh6instead ofh4I'd have something like:<h6 class="usa-footer__primary-link">. - Would you be able to add a test for this feature in footer.spec.js?
Contributor
Author
|
@mejiaj To answer your questions:
Thank you for your time! |
mejiaj
approved these changes
Dec 22, 2022
mejiaj
left a comment
Contributor
There was a problem hiding this comment.
Great, thank you so much @paulathevalley!
I've tested:
- Footer can take any header, value gets saved as data attr on mobile and restored on desktop
- Unit test passes
thisisdano
approved these changes
Feb 28, 2023
thisisdano
left a comment
Contributor
There was a problem hiding this comment.
Nice improvement, thank you!
Merged
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Issue: Headings are not properly nested in the footer on OSG priorities pages. The
usa-footer/src/index.jsfile assumes the footer headings will always beh4elements.This PR sets a
data-tagattribute with the html tag on the newbuttonelement and reference it when toggling back to the original html tag.Additional information
Before you hit Submit, make sure you’ve done whichever of these applies to you:
npm testand make sure the tests for the files you have changed have passed.(👋 first PR! hello! thank you for your patience)