FLUID-6098: Refactor InlineEdit so that it uses a model component idiom

Metadata

Source
FLUID-6098
Type
Task
Priority
Major
Status
Open
Resolution
N/A
Assignee
Antranig Basman
Reporter
Antranig Basman
Created
2016-12-18T00:23:22.979-0500
Updated
2017-01-11T12:31:19.698-0500
Versions
N/A
Fixed Versions
N/A
Component
  1. Inline Edit

Description

Our InlineEdit component is very crusty and has received no substantial reworking since it stabilised around 2009 as part of the Infusion 1.2 release - apart from being lightly dusted over during 2015 to ensure that it continued to function as before after the major framework upgrade.

We need to substantially rewrite this component to being it in line with expectations for modern framework components. Although it has a model and stores its value in it, it makes no use of the ChangeApplier idiom for coordinating updates, but instead relies on a raft of custom events and methods such as "updateModelValue". This makes it useless when cooperating in a tree with other components using modern features such as model relay etc.

We should deprecate and remove these methods, and ensure that the component is at least basically usable when addressed directly via its model, and update all of its implementation (and that of the "undo decorator") to work in terms of modelListeners.

We can also take the opportunity to rework its event binding to function using modern priority and namespace-driven primitives.

We should also correct a horrifying bug caused by its use of a "free constructor" for its tooltips, that will then survive after the destruction of the overall component (we didn't really go in for destroying components back in the old days).

A further useful refactoring would be to establish a "very lazy" instantiation idiom - we should factor off the basic hover and invitation actions into a "component-free" package such that the actual component construction can be deferred until the point the user has started to interact with the editable value.

Finally, we should take the opportunity to assess any interaction paths that were inserted to work around the oddities of ancient browsers which no longer exist, and remove them.

Comments

  • Antranig Basman commented 2016-12-18T00:26:29.780-0500

    A prerequisite for this work is the basic tidyup that has been on the table as FLUID-4734 for a while.

  • Antranig Basman commented 2016-12-18T00:27:34.523-0500

    Reworking the tooltip relationship so it is sane should have the effect of fixing FLUID-5348

  • Justin Obara commented 2017-01-11T12:31:19.698-0500

    Linking all of the recently filed Inline Edit related issues.