Skip to content
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

Allow custom action menu icon for breadcrumb #2414

Merged
merged 1 commit into from
Dec 23, 2021

Conversation

raimund-schluessler
Copy link
Contributor

@raimund-schluessler raimund-schluessler commented Dec 21, 2021

This PR implements to customize the menu icon for the Actions menu of each breadcrumb. We can now e.g. use MenuDown for the actions menu of the last breadcrumb. I adjusted the docs to demonstrate this:
Screenshot 2021-12-21 at 20-55-39 Nextcloud Vue Style Guide

@jancborchardt
Copy link
Contributor

@raimund-schluessler nice! :) 2 things:

  • The arrow-down action icon is a bit far away from the folder name. Could it be moved closer to it? The whole "Folder 5" entry should be clickable in this case, basically be a button with an icon on the right.
  • Possibly for a different pull request: The current folder (the last one) would be better in bold so it’s clear which one has focus.

@raimund-schluessler
Copy link
Contributor Author

  • The arrow-down action icon is a bit far away from the folder name. Could it be moved closer to it? The whole "Folder 5" entry should be clickable in this case, basically be a button with an icon on the right.

That is a bit tricky with the current implementation. The arrow-down action is an Actions menu, directly adjacent to the crumb. See here:
breadcrumb

Moving them closer would make them overlap at the moment. We could move the Action into the crumb completely, I guess this is what you mean (quick mockup with the devtools):
breadcrumb1

Clicking on Folder 5 or the MenuDown should then both open the dropdown menu, right? And no separate hover effect for the menu/Action item.

  • Possibly for a different pull request: The current folder (the last one) would be better in bold so it’s clear which one has focus.

I would prefer to do both the changes in a separate PR. This one here is only a technical addon, not changing anything on the design. Reviewing it in a new PR makes more sense, I think.

@raimund-schluessler
Copy link
Contributor Author

@jancborchardt Your requested changes are in #2416. Would be great if we could get this one here in.

Copy link
Contributor

@quentinguidee quentinguidee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine for me! We just have to keep in mind that with the implementation discussed in #2416 (I don't think it needs to be explicit in the docs?), another symbol than MenuDown or MenuUp (if the bar is at the bottom) will not be explicit and requires a separate button elsewhere on the interface (ex: if the action icon is "share", it is better to have a share button elsewhere on the interface)

@raimund-schluessler
Copy link
Contributor Author

Fine for me! We just have to keep in mind that with the implementation discussed in #2416 (I don't think it needs to be explicit in the docs?), another symbol than MenuDown or MenuUp (if the bar is at the bottom) will not be explicit and requires a separate button elsewhere on the interface (ex: if the action icon is "share", it is better to have a share button elsewhere on the interface)

I am not sure I understand what you mean. Do you mean if there is only a single action which is not in a dropdown #2416 will not work well? Anyway, let's discuss this there.

@quentinguidee
Copy link
Contributor

quentinguidee commented Dec 23, 2021

Do you mean if there is only a single action which is not in a dropdown #2416 will not work well?

Well, I think it depends on what it will do. Imagine a share icon.

If the share icon is part of the text and only here to say "the folder is shared", it may be ok :

image

But if it's an action that says "share this folder", I don't think it will be intuitive. Passing my mouse over the folder 5, Imagine an user that don't really know that this "icon with three circles and two lines" is a share icon, he'll not understand what it does before clicking (whereas a button with an arrow is way more easy to understand without clicking).

In that case I think it would be better to have a real button next to the breadcrumbs bar (or elsewhere) with the text "Share" and this icon next to it. EDIT: or keep that in a dropdown. in a dropdown the share action is clear because there's the text "share" next to it.

So in my opinion anyone who uses a custom icon (other than MenuDown and MenuUp) here will have to think carefully before doing so.

Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
@raimund-schluessler
Copy link
Contributor Author

@quentinguidee I see what you mean and I agree that it might be problematic. But since this problem will be introduced by #2416 it is better to discuss this there. In this PR here the dropdown or single action is still clearly visible as a button/action since it's not part of the hover background yet. So I will merge this one here, rebase #2416 and we can further discuss the problem there.

@raimund-schluessler raimund-schluessler merged commit 068a91f into master Dec 23, 2021
@raimund-schluessler raimund-schluessler deleted the fix/noid/crumb-menu-icon branch December 23, 2021 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews enhancement New feature or request feature: breadcrumbs Related to the breadcrumbs components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants