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

Show menu title for single Action #2436

Merged
merged 1 commit into from
Jan 5, 2022

Conversation

raimund-schluessler
Copy link
Contributor

@raimund-schluessler raimund-schluessler commented Jan 4, 2022

This changes the behavior of the Actions component so that if a menu-title is provided, it can be shown for single Actions as well by setting the forceTitle prop to true. This is necessary for the changes to the Breadcrumbs component requested in #2416 so that the breadcrumb title of the last crumb is also shown if only a single Action is given. In case of multiple Actions, i.e. with a dropdown, or when menu-title or force-title is not set, nothing changes.

Before:
Screenshot 2022-01-04 at 15-03-58 Nextcloud Vue Style Guide

After:
Screenshot 2022-01-05 at 09-19-20 Nextcloud Vue Style Guide

@skjnldsv @nextcloud/vuejs In the current form this is a breaking change, since menu-title will be shown if it is set, which it was not before for single actions. Do you prefer that I keep the previous behavior and make showing the title for single actions optional by a new prop?
Edit: I decided to make it a non-breaking change by adding a prop force-title to show the title for single actions if a title is given. Having an additional prop seems ok, instead of introducing a breaking change.

@raimund-schluessler raimund-schluessler changed the title Allow to show menu title for single Action Show menu title for single Action Jan 4, 2022
@raimund-schluessler raimund-schluessler added this to the 5.0.0 milestone Jan 4, 2022
@raimund-schluessler raimund-schluessler added 3. to review Waiting for reviews feature: actions Related to the actions components labels Jan 4, 2022
@raimund-schluessler raimund-schluessler marked this pull request as ready for review January 4, 2022 14:08
@raimund-schluessler raimund-schluessler self-assigned this Jan 4, 2022
Signed-off-by: Raimund Schlüßler <raimund.schluessler@mailbox.org>
@raimund-schluessler raimund-schluessler added the feature: breadcrumbs Related to the breadcrumbs components label Jan 5, 2022
Copy link
Contributor

@jancborchardt jancborchardt left a comment

Choose a reason for hiding this comment

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

Looks good design-wise

@raimund-schluessler raimund-schluessler merged commit 861f9ac into master Jan 5, 2022
@raimund-schluessler raimund-schluessler deleted the fix/noid/single-actions-title branch January 5, 2022 12:55
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 feature: actions Related to the actions components feature: breadcrumbs Related to the breadcrumbs components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants