[MGNLUI-148] Improvements to configuration by code API Created: 06/Nov/12  Updated: 02/Mar/14  Resolved: 05/Dec/12

Status: Closed
Project: Magnolia UI
Component/s: configuration, framework
Affects Version/s: None
Fix Version/s: 5.0

Type: Improvement Priority: Critical
Reporter: Tobias Mattsson Assignee: Tobias Mattsson
Resolution: Fixed Votes: 0
Labels: configuration-by-code
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLUI-344 Add config object for standard action... Closed
relation
is related to MGNLUI-135 Cascading builders for configuration ... 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:

 Description   

General

  • create methods for standard actions and validators in builders
  • pass only one cfg object to methods, compose them into one (dont use inheritance)

Workbench

  • break out ColumnBuilder from WorkbenchBuilder
  • add cfg.columns.property("title", "Title")

Dialogs

  • rename field methods on cfg.fields, i.e. cfg.fields.textField() => cfg.fields.text()
  • fields.custom(new MyDefinition).name("foo")...


 Comments   
Comment by Philipp Bärfuss [ 29/Nov/12 ]

Marking as critical. The reason is that we use more and more configuration by code and that changes will be much harder to do.

Comment by Tobias Mattsson [ 05/Dec/12 ]

We now have a syntax like this:

  cfg.fields.text(..)
  cfg.fields.select(..)

  cfg.dialogs.action(..)

  cfg.validators.digitsOnly()
  cfg.validators.email()

See the result here https://git.magnolia-cms.com/gitweb/?p=magnolia_ui.git;a=blob;f=magnolia-ui-app-contacts/src/main/java/info/magnolia/ui/app/contacts/ContactsModule.java;h=27d3a82de41ae14a6120ce6df75be4e248bac82b;hb=11e5b09aa059f8f9b244e191f54d1e88908f5c06

Comment by Tobias Mattsson [ 05/Dec/12 ]

Fixed with rest split off into MGNLUI-344. All but 'methods for standard actions' is done.

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