-
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
Tidy list view props and deprecate BlockNavigationDropdown
#40777
Conversation
Size Change: -206 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
BlockNavigationDropdown
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.
Tested this and couldn't see any regressions. It looks like the deprecations were handled and we've now reduced the complexity of the API considerably. Thank you 👏
These changes all make sense to me. My only concern (or question) is if we remove some of the experimental props and enable them everywhere, wouldn't that mean this PR is introducing breaking changes by enabling features by default? I can see that you've already updated the CHANGELOG though, just wondering if we should make this clearer? (Maybe they're already covered in the previous entries in the CHANGELOG?) |
@kevin940726 There's only one place where that would be the case - All the other usages are in components aren't exported where the props were |
Also the entire component is experimental. I reckon we should promote it to a full API. Why is it even experimental at all at this stage? It's heavily used. |
6a4aa35
to
f61fa0d
Compare
What?
Improves the
ListView
component's props, which were a bit untidy, particularly the__experimental
props:__experimentalFeatures
- which was first used to test some experimental features for List View that were being developed in the navigation editor. All of these features have either now been removed or are considered stable. This prop wastrue
on every ListView instance in this project, so I think it's fine to remove the prop and consider and consider all the features tied to it as active by default (block settings menu).__experimentalPersistentListViewFeatures
- Similarly, this was used to make List View behave differently when the persistent sidebar was first introduced. The persistent sidebar is now the norm, so it seems fine to remove the prop. It wastrue
(almost) everywhere, and with this PR all the features tied to it are active by default (windowing, and better block highlights).__experimentalHideContainerBlockActions
- this was used by the Widget editor to hide the Block Settings menu for widget areas. I don't think the way it works was ideal. Widget Areas already use the__experimentalToolbar: false
block supports setting to hide the block toolbar and block settings menu in the editor canvas, so I've switched List View to use this as well.showNestedBlocks
- this was alwaystrue
everywhere ListView was used, and I don't think there's any time a list view would be shown without nested blocks now. I think it'd be good to make ittrue
by default....props
- I don't fully understand why this was there, it allowed any props to be set onListViewBranch
. I would expect it to be applied to the root element if anything. It was unused.This also deprecates the old
BlockNavigationDropdown
component.Why?
Code quality / DevEx.
List View itself is an experimental component, but I think it's worth improving the public API and looking at making it stable.
Testing Instructions
Everything should be the same as in
trunk
.