Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Jira
serverMagnolia - Issue tracker
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId500b06a6-e204-3125-b989-2d75b973d05f
keyMGNLUI-2542

 

1. Use cases

We need to support such dynamic forms in a much easier way. Collecting some commons requirements:

...

  • Exposing hooks on form-level
    • currently only possible on field-level via FieldFactories
    • fields & factories are only aware about themselves, in isolation. They're not aware about other fields and this is harder to do than it should.
  • Use more of Vaadin out of the box
    • less customizations
    • get rid of legacy Vaadin 6.x or client-side code
  • Open up APIs to offer more possibilities (data-binding, or dynamic/ cross-field behaviors)
  • Reduce technical debt

3. PoC phase

 

The PoC phase was conducted in September–October 2016. Refer to child-page Dynamic forms - PoC phase for details and outcome.

 

4. Productization phase

Based on the PoC results, we first collected the following tasks, in order to bring new forms on par with the current Magnolia forms.

F1. Formalize new Form APIs & Assess Configuration changes

Jira
serverMagnolia - Issue tracker
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverId500b06a6-e204-3125-b989-2d75b973d05f
keyDEV-419

  • Validate a high-level architecture with clear component responsibilities

    • expose 1. field creation, 2. data-binding, 3. layouting
    • produce architecture diagrams
  • Assess definition changes to support new ways of configuring forms

    • especially moving towards a separation between bindings and layout
  • Envision repackaging
  • Draft eventual backward compatibility
  • Iterate from Sang's PoC
  • Keep in mind / draft check if form is dirty or not
 

F2. [TOFILE] Define the generic typing for complex fields (or leave it open)

  • ideally move away from Items, in favor of domain types, e.g. CompositeField<Contact>
  • Challenging with JCR adapters in particular
  • MultivalueFields would in turn be typed with Collection types (List, Set, ordered/unordered, etc.)
  • Adapt new default CompositeField & MultivalueField

F3. [TOFILE] Reimplement Tabsheet customizations, ideally as Vaadin extension

...

  • Reuse and style Vaadin Windows instead?
  • How about dynamic resizing of dialog height?

F7. [TOFILE] Image Removed Validation bubbles as JavaScriptExtension

  • sort out the problem with marking component visible / invisible
  • use plain Vaadin validation state ( state.errorMessage && state.hideErrors )

F8. [TOFILE] Reimplement the error count banner at the top of the form

  • again, maybe as Form component extension?)
  • + jump to next error
 
F9. [TOFILE] Image Removed Reimplement help-text bubbles the same way as validation bubbles

...

  • Can only be done once the basic stones are in place
  • Prove form-level agility (binding upon field(s) constructed)

 

F12. [TOFILE] Proof-test new APIs against Vaadin 8

  • Ideally, only the data-binding "part" should be affected, not field creation nor layouting

 

TODO:

  •  File in JIRA / MGNLUI
  •  Estimate
  •  Flesh out, break out into even smaller tasks
  •  Add relative task dependencies

Then reevaluate progress after 2–3w. 

Unprocessed ideas

  • (lightbulb) binding strategies: default, transformerDelegate...
  • (lightbulb) expose layouting (default from fieldDef + tabs, declarative, or other new mechanism?, responsive forms?)
  • (lightbulb) save actions bundled in Form itself by default, can be delegated to configured action(s)
    • does validate ootb
  • (lightbulb) extensibility: generate wrapper implementations for component interfaces

Related wishful improvements

—i.e. keep out as long as we can / later scope:

  • Valo-based theme switch
  • Generate concrete FieldDefinitions (& builders) from our interfaces
  • Plain Java Decorators (add/remove field by user-based form decorator)
    • supplanting blossom
  • Documentation generation (via pegdown)