-
Notifications
You must be signed in to change notification settings - Fork 536
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
SelectPanel2: Use html dialog #4020
Conversation
🦋 Changeset detectedLatest commit: a8430d4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
This reverts commit 19bc492.
Hey @siddharthkp I've previously raised this concern within Slack as well. The cancel and save buttons are visually clear to indicate confirming is required in the dialog. However, this pattern isn't obvious to everyone, which can be frustrating. This is particularly true for long-time users, who have been on our platform for over 10 years and may find these changes annoying. Additionally, clicking on the background without any response can make it seem as though we've deliberately worsened the user experience, especially for those who are not familiar with those accessible patterns. The best thing I think we can do now is introducing a gelatine or bounce effect on the buttons when this annoyance occurs? This could be an interesting and engaging way to guide users towards understanding and adopting the new behavior, without giving the impression that we've overlooked something that is an accessibility requirement. Jellatine.mov |
'::backdrop': {background: 'transparent'}, | ||
|
||
'& [data-selectpanel-primary-actions]': { | ||
animation: footerAnimationEnabled ? 'selectpanel-gelatine 0.5s linear' : 'none', |
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 think this feels a little nicer when we speed it up to 350ms
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.
Done!
Here's a video to compare durations:
animation-duration.mov
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.
Love that you actually did this in the end! ❤️
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 couldn't see it in the code but is it disabled when reduced motion is on?
I really like @maximedegreve's suggestion to "highlight" the buttons when somebody tries to close by clicking the background scrim. I think we should also add this functionality to |
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.
Looks great ✨ - just left a few notes
This reverts commit c2a53a0.
useAnchoredPosition
for positioning nowselectpanel-dialog.mov
Alt text: When a SelectPanel is opened, it renders a dialog with a focus trap, you see that the accessibility panel only shows a dialog. Pressing the
Esc
key closes the panel. Looking at the elements panel, you can see that the dialog is rendered in atop layer
Question for @maximedegreve related to html dialog:
[Answered] We decided clicking outside the panel should not close the panel, we still hold the same opinion? Is there something we can do to make this not feel like a bug? See demo in storybook.
Update: If the user clicks outside, we nudge the user to use the actions in the footer. See demo