-
Notifications
You must be signed in to change notification settings - Fork 159
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
[full-ci] Implement long breadcrumb strategy #8984
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
Results for e2e-tests oCIS https://drone.owncloud.com/owncloud/web/35587/12/1 💥 To see the trace, please open the link in the console ...
npx playwright show-trace https://cache.owncloud.com/public/owncloud/web/35587/tracing/deny-and-grant-access-alice-2023-5-10-01-54-52.zip |
Results for acceptance oC10 https://drone.owncloud.com/owncloud/web/35580/20/1 |
yes, it should navigate to the previous hidden folder, so when you e.g. only have one folder in the breadcrumb you can navigate one up. Will look into mobile, and the long folder name |
36e72d5
to
68157c2
Compare
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.
You are obviously much deeper into the topic, but one thing got me wondering: Do you really need to pass calculateBreadcrumbMaxWidth
as a method to OcBreadcrumb
? Couldn't you just pass a number property (e.g. availableWidth
) to the component? You'd simply need to watch this value and re-evaluate the breadcrumb on change. Also, it would make the resize observer obsolete (we already have one in Appbar.vue
).
i think that should be possible |
6da59d2
to
b2c8dbe
Compare
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.
Didn't look into the code, yet. Just tried it out. Two things that caught my eye:
- vertical alignment of breadcrumb items is off. The last breadcrumb item has a lower baseline as all the other elements. More precisely, the breadcrumb items (except the last one) have slightly moved up. You can see that when you compare to the old state and watch the distance between text baseline and the chevron right icon. See two screenshots:
before
after
- The breadcrumbs are truncated far too early. See video. There is a lot of space left but the breadcrumbs already get shrinked down to a minimum. That feels wrong.
Screen.Recording.2023-05-17.at.14.57.13.mov
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
6656c00
to
be25c9d
Compare
be25c9d
to
80a5a65
Compare
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
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.
Probably looks like a wall of text (sorry for that) but all of these comments are small stuff and should be easy to fix... Great work, love it! UX feels really good.
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
packages/design-system/src/components/OcBreadcrumb/OcBreadcrumb.vue
Outdated
Show resolved
Hide resolved
hiddenItems.value = [] | ||
|
||
nextTick(() => { | ||
reduceBreadcrumb(2) |
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.
Please introduce a param for the offset. Don't forget to use it when inserting the ...
element to the correct position. Use 2
as default for the offset param. But then set 3
for breadcrumbs in project spaces. That way you get Spaces > SpaceName > ... > trölölö
for project spaces. Otherwise the space name will always be cut off.
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 like the idea very much and i implemented it BUT, as soon as i navigate into a space im no longer in a project space but in a generic space, the same as personal
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.
But you do have a space
object via prop in the generic space view. And on that space
object you can use the type guard isProjectSpaceResource(props.space)
to identify if it's a project space or not. I think you also need the same with isShareSpaceResource(props.space)
because a share breadcrumb also has an overview item and a share root item in the breadcrumbs (Shared with me > some share name > ... > subfolder
).
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.
🥳
Kudos, SonarCloud Quality Gate passed! |
Description
Breadcrumb should not line-break. This is a new strategy to deal with long breadcrumbs and long folder names.
See #6731
Maybe this helps
Screenshots
Before (old):
After (new):
Related Issue
Types of changes
Checklist:
Open tasks:
...
button