-
Notifications
You must be signed in to change notification settings - Fork 1
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
feat: Create USSF Documentation page #860
Conversation
This pull request has been linked to Shortcut Story #543: Create Documents page. |
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.
Hi! Looks great in light and dark mode. A couple things:
- The accordion headers ("Essential Reading") are using h3's, when they should be using the label tag.
- Question: The design breaks at more narrow tablet/mobile widths but I'm not sure we're "officially" supporting mobile or not. Are we?
- Figma has the document type icon listed in front of each document. Is this in scope? (See photo below)
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.
Minor note about the test structure in the new test file, but I don't see a need to block the PR on that. Approving from an eng stand point, please follow up with Mallory on the notes she left.
Question: Should the Essential Reading
section be expanded by default since it's the only one? Might be a good question for @malworks or @shkeating
beforeEach(() => { | ||
html = renderWithAuth( | ||
<MockedProvider> | ||
<USSFDocumentation /> | ||
</MockedProvider> | ||
) | ||
}) |
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.
Thought, is there a reason to continue this pattern of sharing html
. IIRC the recommendation is to not do that now with react-testing-library. I think this was the article: https://kentcdodds.com/blog/avoid-nesting-when-youre-testing
Suggestion: refactor this to call render in each it block or just combine them all into one test. I can't find the article that recommended that but I read one from Kent Dodds about that.
|
@malworks I spoke too soon on changing the h3 in the Accordion. Guess I should have mentioned that the Accordion component is a ReactUSWDS component, and it uses a Also, @gidjin had a great question above asking if the 'Essential Reading' section should be open by default since it is the only Accordion item. I went ahead and made that change so that you could see what it would look like, but let me know if I need to change it back! |
No worries, it's fine as is. And nice addition to keep the 'Essential Reading' open by default! |
## [4.12.0](4.10.0...4.12.0) (2022-12-13) ### Features * Add support for hero image in articles ([#862](#862)) ([56721db](56721db)) * add USSF Guardian Commitment Poster to docs page ([#888](#888)) ([07fb472](07fb472)) * Create USSF Documentation page ([#860](#860)) ([6c5d6b3](6c5d6b3)) * Display hero image in article layout ([#884](#884)) ([b2201ac](b2201ac)) * UI modifications to the article template ([#856](#856)) ([dc7402c](dc7402c)) ### Bug Fixes * **deps:** update dependency axios to v1 ([#851](#851)) ([de30320](de30320)) ### Security Improvements * **deps:** update node.js to v14.21.1 ([#849](#849)) ([46aba91](46aba91))
SC-543
Proposed changes
/ussf-documentation
/about-us
to/ussf-documentation
<EPubsCard />
component to make thequery
prop optional and adds an optionaltitle
propReviewer notes
/ussf-documentation
and verify that it matches the below screenshotSetup
As always, run both the portal client and the CMS on your local machine
Code review steps
As the original developer, I have
As code reviewer(s), I have
As a designer reviewer, I have
As a test user, I have
Screenshots