-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix(mui): Fixed condition preventing Breadcrumb text display #6503
Open
aress31
wants to merge
15
commits into
refinedev:master
Choose a base branch
from
aress31:6497
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+44
−18
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
aa3c7ae
fix: fix a bug whereby breadcrumbs are not shown
aress31 feb06eb
fix: fix a bug whereby breadcrumbs are not shown #1
aress31 4925b2b
chore: added changesets
aress31 9db34df
chore: style cleanup
aress31 f9063ce
refactor(mui): refactored breadcrumbs, added modularity and harmonise…
aress31 1236d0a
refactor: removed superflous padding
aress31 bfe1f33
refactor: focus on changes
aress31 1bfd850
refactor: applying suggested changes
aress31 babfe39
fix: one failed test
aress31 9cb9aa9
fix: fix rendering condition
aress31 101ea4a
chore: remove unnecessary changeset
alicanerdurmaz 8702671
chore: add issue link to changeset
alicanerdurmaz f09a88b
fix: https://github.com/refinedev/refine/pull/6503#discussion_r185155…
aress31 99dc85d
Merge branch '6497' of https://github.com/aress31/refine into 6497
aress31 f952ed3
fix: went for more logical option
aress31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
"@refinedev/chakra-ui": minor | ||
"@refinedev/ui-tests": minor | ||
"@refinedev/ui-types": minor | ||
"@refinedev/mantine": minor | ||
"@refinedev/antd": minor | ||
"@refinedev/mui": minor | ||
--- | ||
|
||
feat: added `minItems` prop to specify the minimum number of items required for rendering breadcrumbs. #6497 | ||
|
||
|
||
Resolves [#6497](https://github.com/refinedev/refine/issues/6497) |
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
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
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.
we have two options to fix case 2:
1.
minItems = 2
I believe second option is better because it fits
minItems
name.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.
Why should the default be set to
minItems = 2
by default?What’s the rationale behind this choice? If a route is configured, the breadcrumb should display it by default, unless specified otherwise (and that is the point of this new
minItems
prop).Regardless I pushed suggested changes, if you change your mind, please feel free to discard the commit. :)
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.
Because previously, the breadcrumb would render only if there were at least 2 items, but it wouldn’t render if there was only 1 item. So,
minItems
should be 2. If we break this logic, it would be a breaking change, and current users who update Refine would see a breadcrumb even in cases with just 1 item.I'm with you. If the route is configured, it should render, but we shouldn't make breaking changes, even if the old implementation is wrong.
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.
We should be good to merge then since I have the default for
minItems
to be2
. Please let me know if there is another blocker.Also for future major release might be a good idea to implement the breaking change of setting
minItems
to1
.