feat(plugin-id/ui): highlight entity name in delete confirmation dialogs#27
Merged
Merged
Conversation
Per Fabrice's review (18 mai 13h30): make the entity name stand out
(bold + error color) in the "Confirm delete" dialogs for user, group
and company, so the user can quickly verify what they're about to
delete.
Covers both the single-entity edit views (User/Group/CompanyEditView)
and the row-level delete dialogs in the list views (User/Group/
CompanyListView). Bulk-delete dialogs are not touched — they show a
count, not a name.
Implementation: split the i18n message into two halves (before/after
the name) and render the name as a styled <strong class="text-error">
span in the template. Keeps i18n strings free of HTML markup.
Plugin-local translations live under ui/src/i18n/{en,fr}.js and are
merged into the host i18n store from the plugin's install() hook via
useI18nStore().merge() — same pattern documented in the host store.
The original *.deleteConfirm keys remain in the host translations
(unused after this change, left for any external consumer).
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Highlight entity names (bold + error color) in the "Confirm delete"
dialogs across plugin-id, so users can quickly verify what they're
about to delete (per Fabrice's review of 18 mai 13:30).
Scope
Covers all 6 confirm-delete dialogs in plugin-id:
Bulk-delete dialogs are not affected (they show a count, not a name).
Implementation
Split the i18n message into two halves (Before/After the name) and
render the entity name as
<strong class="text-error">in thetemplate — keeps i18n strings free of HTML markup.
Plugin-local i18n
New pattern: the plugin now ships its own translations in
ui/src/i18n/{en,fr}.js, merged into the host i18n store viauseI18nStore().merge(messages, locale)in the plugin'sinstall()function. This avoids cross-repo coupling (no host PR needed for
plugin-local i18n).
The legacy
*.deleteConfirmkeys are kept untouched in the hosti18n in case other consumers still reference them.
Files
9 files, +35/-6 :
Tested
Visual validation FR + EN on the 6 dialogs : name appears in red bold,
no regression on other dialogs.