-
Notifications
You must be signed in to change notification settings - Fork 1.4k
docs(S2): add Typography search view #9524
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
base: main
Are you sure you want to change the base?
Conversation
|
I think we're missing it in mobile, when I click the Typography tab on my iphone, I get nothing. |
|
Build successful! 🎉 |
Agreed, just pushed a fix to left-align all these.
Just added to mobile. It keeps the same layout, and is scrollable. Open to changing this experience if we think a Picker would be better, but I think the current experience is fine (and less taps required). |
LFDanLu
left a comment
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.
I like this view a lot, definitely helpful as a playground for people to get a visual representation of the typography. Here are some initial thoughts from preliminary testing:
- is it confusing that what was a search field becomes an input field for the sample text? Perhaps for a sighted user this might not be as confusing, but the aria labeling for the field still states "Search React Spectrum"
- I personally found it a bit confusing that tabbing and ArrowLeft/Right didn't move me to the Title/Body sections when keyboard focused on a option in the Heading list. Instead I had to just use ArrowDown which then brought me to those columns
- In a similar vein, I wasn't able to tab to the row
h1/<div>etc, nor to the copy snippet button
Some of these focus issues be the fault of the autocomplete, but maybe we can explore some other ways to lay it out to make this more keyboard accessible
We discussed this and decided to revert it back to where the search value filters the list of styles. I've made the preview text editable via a RAC TextField, so we can see how we like that experience.
Not sure there is much we can do here. If we made this a grid layout, the columns would no longer semantically be sections. I guess we could potentially use a RAC Table here instead to achieve that though? Then we'd need horizontal scrolling instead of having it wrap, which isn't ideal.
I think this is a pretty big issue, I assume it has something to do with these focusable items being within the Autocomplete. I'll try to figure out what to do here, but I think this might be enough to hold off on merging this. |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
|
Build successful! 🎉 |
Adds a new Typography section to the search menu that allows you to preview different typography styles and copy the code snippets.
This should also improve the discoverability of how typography works in S2.
Notes:
✅ Pull Request Checklist:
📝 Test Instructions:
Open search menu: https://d1pzu54gtk2aed.cloudfront.net/pr/58c8a596dd0346bcb3b85a167dba51ea0051bc5a/
🧢 Your Project: