-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Implement new accordion design for FAQ page #985
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
Conversation
1ea2623
to
9294608
Compare
Nice work @carolstran! Is your screenshot from Safari? On Chrome (Windows) there's a black focus outline and also a stray black pixel (see to the left of the "W" in Why): Just wanted to let you know in case you weren't aware. By no means a blocker, I think the focus outline is actually useful for accessibility(?) although it looks a little out of place. |
Hey @mikeesto, thanks for taking a look As for the design of the focus outline, I definitely want to make sure it's prominent to aid keyboard navigation. I agree though that the blue (or in your view, black) looks a bit out of place - although we do have dark headers on the homepage and Code page so maybe that's an option. AFAIK we don't have any set styles for the focus outlines so it uses whatever is native to the browser. I'm not a designer so if anyone has strong design opinions let me know 👩🏼🎨 ✨ ❓ Also if we have any rules for which browsers/versions the site should support... someone let me know because that can also go in the contributing guidelines. |
Re: Browsers, I'd aim for the big 4: Chrome/Edge, Firefox, Safari and Safari on mobile Re: selection outline - that's generally how I leave it also ( we have the same behavior in the sidebar on https://www.typescriptlang.org/docs/handbook/intro.html ) so it should be fine IMO |
eb4200c
to
4a11d49
Compare
* Initial commit new FAQ design * Finally something rendering * Add sidebar * Jk remove the sidebar again * Add useAccordion hook * Move FAQ specific CSS into its own less file * Fix scrolling issue and keyboard accessibility * Workaround for gatsby build error * Remove broken transitions * Update based on code review in #982
💓 This PR is part of Google Season of Docs 💓
With the introduction of more questions and new sections in #982, the current format doesn't work and it's difficult to use. That's why this PR introduces a new design where all of the questions are listed by section and the answers are revealed on click or keypress.
🔗 Preview: https://graphql-faq-preview.netlify.app/faq/
⚠️ All of the content is the same as in #982, this PR is purely code/design changes.
🥪 Yes the commits will be squashed.
Here's an overview of the functionality:
+
icon when revealing question.Known issues:
Current design: