Block editors: adds prefix to workspace title (closes #20588) #20884
+25
−16
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.
Description
Resolves #20588.
When a Block item has a label which is rendered empty (e.g. a UFM label that exclusively uses a property value), the leading fragment of the browser's title is empty, (e.g. it would display as
| Content | Umbraco, see #20588 for details).To note, if the Block item has a label which has a value (isn't empty), then that will display in the browser's title.
This PR looks to add a prefix to the Block workspace's label, with either "Add" or "Edit" (depending on the
isNewstate). This way, if the Block item's label is empty, the prefix will still be used. (To note, these prefixes use localization keys, e.g.general_add,general_edit).How to test?
With either a Block Grid or Block List editor, try adding a new block item, notice that the modal workspace headline and browser title is prefixed with "Add". Try editing an existing block item, notice that the modal workspace headline and browser title is now prefixed with "Edit".