-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Panel: Improve scroll view handling when expanding #23327
Merged
Merged
Changes from 9 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
cb813a1
Add scrollIntoView interaction for PanelBody
5cddfb0
Adjust PanelBody story to include scrollIntoView example
7311fb7
Adjust bottom padding for Layout sidebar
7619ffd
Allow for opened prop to control disclosure state
546a846
Update PanelBody tests
ff1c7cf
Update snapshots
1f183ac
Merge branch 'master' into update/panel-improve-scroll-view-handling
fa31367
Fix tests for PanelColorSettings + Update snapshots
d1fed38
Add new PanelBody props to README
3c8326c
Merge branch 'master' into update/panel-improve-scroll-view-handling
29a4949
Add react-merge-refs dependency
5e82406
Use react-merge-refs util
db594d7
Update test snapshots
740f69e
Merge branch 'master' into update/panel-improve-scroll-view-handling
ff7b3a6
Merge branch 'master' into update/panel-improve-scroll-view-handling
277f242
Remove disableSmoothScrollIntoView prop from PanelBody
85d4384
Update snapshots
09776c1
Remove focusable prop
1425782
Remove use-combined-refs - No longer needed
73783b1
Remove onToggle from useUpdateEffect deps array
e61bb11
Merge branch 'master' into update/panel-improve-scroll-view-handling
444bc3a
Adjust onToggle callback handling
a2dfe87
Merge branch 'master' into update/panel-improve-scroll-view-handling
8c4f6a6
Merge branch 'master' into update/panel-improve-scroll-view-handling
a194641
Merge branch 'master' into update/panel-improve-scroll-view-handling
2e5b430
Merge branch 'master' into update/panel-improve-scroll-view-handling
1c1ff72
Merge branch 'master' into update/panel-improve-scroll-view-handling
fb33dc0
Remove Reakit/Disclosure integration (for now)
c50d006
Update PanelBody tests
10fdadc
Update snapshots
fe70a9a
Merge branch 'master' into update/panel-improve-scroll-view-handling
d7c22a0
Merge branch 'master' into update/panel-improve-scroll-view-handling
45510e7
Fix initialOpen handling for PanelBody
8a35791
Remove unnecessary act wrappers in panel body tests
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 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
This file contains 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
Oops, something went wrong.
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.
Do you think we really need these props as part of the API or should we just be opinionated and avoid more APIs to support?
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.
@youknowriad I think we can be more opinionated. Initially, I wasn't sure how users may respond to the new smooth scrolling behaviour. If it is problematic, we can disable it.
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.
What about the focusable prop?
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 see that the
focusable
prop is passed toDisclosure
underneath. It probably doesn't work as you're expecting. It just guarantees that, whentrue
, the element will remain focusable even when the element isdisabled
. It's the same as ourButton
'sisFocusable
prop:gutenberg/packages/components/src/button/index.js
Line 43 in b98418d
If this causes confusion, that's a good signal that we should find a more descriptive name for the prop. Something like
isFocusableWhenDisabled
.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.
Hmm! I'm that case, I'll remove for now :)