Show menu title for single Action #2436
Merged
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.
This changes the behavior of the
Actions
component so that if amenu-title
is provided, it can be shown for single Actions as well by setting theforceTitle
prop totrue
. 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 whenmenu-title
orforce-title
is not set, nothing changes.Before:
After:
@skjnldsv @nextcloud/vuejs In the current form this is a breaking change, sincemenu-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.