[MGNLUI-2207] Cleanup and reviewing overriding of label/description of dialogs & forms Created: 02/Oct/13  Updated: 05/May/20  Resolved: 05/May/20

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Magnolia International Assignee: Unassigned
Resolution: Obsolete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MGNLUI-2280 i18n: Some dialogs do not display titles Closed
relation
is related to MGNLUI-2218 An i18n text set directly in a dialog... Closed
supersession
is superseded by MAGNOLIA-7778 Implement @I18nText fallback parameter Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Dialogs and forms can currently both specify a label and description.
They are displayed in the same location. To be confirmed: the dialog's should have priority, so it can override a more generic form label.

We current have hacks in place in both FormDialogPresenterImpl and FormBuilder - they check if the label/description's value "is a message key" by looking for dots and spaces. This is completely unreliable. If the value "is a key", then we don't use to override an otherwise specified label.

Other possibilities:

  • look at undecorated value
  • put some of this logic in the key generators (not convincing)
  • don't overwrite if there's already a value (dialog's label is set first, so FormBuilder should never overwrite it)
    • this would only work if we'd explicitly set all dialog labels
  • add a feature to i18nsystem such that a form's label and description could be marked as optional (@I18nText(optional=true))
    • TranslationService could return "" instead of a missing key for these. But doesn't that make it hard to figure keys out ?

In STK, our forms have a label, dialogs rarely do (since this is new)


Generated at Mon Feb 12 08:54:15 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.