-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[TreeView] Always apply the indentation on the item content instead of its parent's group #15089
Merged
flaviendelangle
merged 16 commits into
mui:master
from
flaviendelangle:tree-item-indentation
Nov 7, 2024
Merged
[TreeView] Always apply the indentation on the item content instead of its parent's group #15089
flaviendelangle
merged 16 commits into
mui:master
from
flaviendelangle:tree-item-indentation
Nov 7, 2024
Conversation
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
flaviendelangle
added
breaking change
component: tree view
TreeView, TreeItem. This is the name of the generic UI component, not the React module!
labels
Oct 24, 2024
flaviendelangle
force-pushed
the
tree-item-indentation
branch
from
October 24, 2024 12:25
a0bac72
to
68ef16f
Compare
flaviendelangle
force-pushed
the
tree-item-indentation
branch
from
October 24, 2024 13:14
866c6fd
to
18507bd
Compare
flaviendelangle
force-pushed
the
tree-item-indentation
branch
from
October 29, 2024 16:12
a55b795
to
735b065
Compare
flaviendelangle
force-pushed
the
tree-item-indentation
branch
from
October 29, 2024 17:04
735b065
to
311d2dc
Compare
noraleonte
approved these changes
Nov 6, 2024
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 for taking care of this, LGTM 🎉
I think the Argos diffs are fine 👍
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking change
component: tree view
TreeView, TreeItem. This is the name of the generic UI component, not the React module!
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.
Closes #14785
We have 3 Argos diff:
CustomTreeItemDemo
: The indentation was broken before, the new one seems a lot betterContentSlot
andContentSlotProps
: There is no longer an indentation on the box, if we want to keep it we need to reset manually the padding on this item, but I don't think it's worth adding that complexity on this demoChangelog
Tree View
The indentation of nested Tree Items is now applied on the content of the element.
This is required to support features like the drag and drop re-ordering which requires every Tree Item to go to the far left of the Tree View.
Apply custom indentation:
If you used to set custom indentation in your Tree Item, you can use the new
itemChildrenIndentation
prop to do it while supporting the new DOM structure:See Tree Item Customization—Change nested item's indentation for more details.
Fallback to the old behavior:
If you used to style your content element (for example to add a border to it) and you don't use the drag and drop re-ordering, you can manually put the padding on the group transition element to restore the previous behavior: