-
Notifications
You must be signed in to change notification settings - Fork 526
[Poetry] Updates Select Poem dropdown to use component library simpleDropdown #70710
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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.
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'm noticing that
SimpleDropdowndoesn't seem to be scrollable. I wonder if this may be an issue for poetry levels with long poem lists on mobile devices.I see that for Dance (legacy) levels, the
SongSelectoris scrollable on mobile (checked on my phone!)I see that they both use native
<select>so it seems like there's some styling that's determining this inSimpleDropdown? I wonder if this is intended forSimpleDropdownor not. @moshebaricdo do you have context here?Uh oh!
There was an error while loading. Please reload this 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.
From what I'm seeing both use native select as the base, but the legacy implementation is a react select component with bootstrap inspired custom styling for the button trigger and dropdown menu. SimpleDropdown in DSCO uses a fully native approach for the dropdown menu and only applies custom styles to the select element itself (the button trigger).
When we were deciding whether to use a custom dropdown menu styling or go fully native, we opted to go fully native as that is best practice for the most reliable/accessible approach and most flexible as users in any environment will see their OS/browser's native menu—even though it's not as pretty. This is actually better for mobile, as they would see the iOS or android menu when opening the dropdown vs a custom styling.
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.
Thanks Moshe! So my concern was that for a dropdown with many options, a user could still scroll through entire list on a smaller mobile device. Can you confirm that a user can scroll in
SimpleDropdown?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.
Yep! On an iPad, for example, they'd see iOS's native dropdown which has its own optimizations/styling in place for menus with lots of options vs just a few. That was the primary driver for taking this approach for simple dropdown. I made a super quick codepen experiment to show what this would look like on iOS.
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.
The reason I asked is that locally when I checked out Hannah's branch, when I selected the iPhone view, I saw this dropdown which wasn't scrollable.
However, I found a place where
SimpleDropdownis used with a long list -StudentSelectoris a student dropdown on teacher dashboard unit page! I logged in on my iPhone, and viewed the list from a section with >30 students and list is scrollable. 🎉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.
Thanks! I posted my reply above before seeing your latest response. Appreciate the explanation and the check!
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.
Of c! My delay was also trying to find a good example I could screenshot on my phone 😄
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.
Thank you both for the learnings! I agree Alice that I usually test mobile by 'hacking' a mobile view in the browser (which in this case, doesn't quite work)