[MGNLRES-372] Validate hotfixes upon save Created: 06/Jul/21  Updated: 20/Jul/22  Resolved: 03/May/22

Status: Closed
Project: Magnolia Resources Module
Component/s: None
Affects Version/s: 3.0.4
Fix Version/s: None

Type: Improvement Priority: Neutral
Reporter: Richard Gange Assignee: Unassigned
Resolution: Won't Do Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File warning.png    
Issue Links:
relation
supersession
supersedes MGNLRES-371 Validate hotfixes for tab character u... 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)
Date of First Response:
Epic Link: Nucleus Quality Maintenance
Team: Nucleus

 Description   

When saving a definition file in the Resource Files app if the definition has problems I should be warned about those problems in a confirmation dialog when I click save. The app should not prevent me from saving it but instead confirm that I am aware of the issue.

For example, I edit the dialog /mtk/dialogs/components/html.yaml to create this problem:
Shown in the Definitions app

Failed to parse YAML file: Scanner: mapping values are not allowed here in 'reader', line 7, column 14: fields: ^

Title: Parsing configuration data from [/mtk/dialogs/components/html.yaml] failed
Path: /

When I click save the handler should determine if there are any problems with the dialog and ask me to confirm whether or not I'd really like to save it. But do not block me from saving it.



 Comments   
Comment by Roman Kovařík [ 03/May/22 ]
  • The app shouldn't be aware of the underlying logic consuming the files, it sees just files (FTL, CSS, YAML, ...)
  • The JCR observation of triggers the loading of the configuration, not the save action explicitly.
  • A hotfix should be the last resort fix, so improving it's UX of it goes against the light module philosophy

For the record, the check could be still hardcoded in custom projects, it shouldn't require any API changes.

Generated at Mon Feb 12 06:50:03 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.