Open rolyp opened 10 months ago
Requires quite a bit of redesign but will also lay the groundwork for other related tasks.
Redraw
Selector Val
UIHelpers
RendererSpec
Renderer
draw
Drawable
ViewSelector
ViewState
filter
TableView
filterToggler
Setter Fig TableView
unsafeUnpack
View
in_views
out_views
Done/dropped:
th
TableViewHelpers
drawTableView
mousedown
TableView.js
view
Current design:
Fig
LinkedInputs
LinkedOutputs
EventListener
redraw
Effect Unit
drawFig
drawView
Proposed design:
Endo Fig
selectInput
selectOutput
selListener
selectInput x
Endo View -> Endo Fig
FilterToggler
Endo TableViewState
Endo View
App.View
App.View.Util
App.View.[ViewType]
MultiView
See also:
Paused until we have a more integrated framework for I/O (Fig), I/I (LinkedInputsFig) and O/O (LinkedOutputsFig) linking.
LinkedInputsFig
LinkedOutputsFig
Requires quite a bit of redesign but will also lay the groundwork for other related tasks.
Redraw
to support interactions other thanSelector Val
(see above)UIHelpers
out ofRendererSpec
intoRenderer
RendererSpec
in signature ofdraw
ExtraDrawable
parameter to specifyViewSelector
argumentViewState
in light of existentialsfilter
toTableView
and updatefilterToggler
accordinglySetter Fig TableView
to map filter toggler to viewunsafeUnpack
to update under existentialView
in_views
andout_views
never initialisedDone/dropped:
th
elementTableView
on whether to filter to selected rows only#1011TableViewHelpers
as separate argument todrawTableView
mousedown
handler on toggle buttonTableView.js
TableView.js
and verify executing on PureScript sideView
type class (more modular, potential to introduce per-view state type)View
RendererSpec
filter
fromTableView
view
which maintains state component and only updates view?Remaining design problem: generalising
Redraw
to support interactions beyondSelector Val
Current design:
Fig
stores selections associated with inputs and outputs, plus whether mode isLinkedInputs
orLinkedOutputs
EventListener
mapping mouse event coordinates to selector for viewEventListener
passed to JavaScript and attached to visual elementsredraw
of typeEffect Unit
drawFig
, for eachdrawView
, supply aredraw
which re-runsdrawFig
with updatedFig
stateunsafeUnpack
to allow updating under existentialView
Proposed design:
Redraw
takes anEndo Fig
rather than aSelector Val
to anEffect Unit
selectInput
/selectOutput
step moves fromdrawFig
intoselListener
selectInput x
/selectOutput
generalises to typeEndo View -> Endo Fig
FilterToggler
fromEndo TableViewState
toEndo View
and thence toEndo Fig
App.View
,App.View.Util
(Drawable
), and anyApp.View.[ViewType]
App.View
definesView
, which has a constructor for everyApp.View.[ViewType]
App.View.[ViewType]
implementsDrawable
, which therefore can’t be in (or import)App.View
MultiView
andView
are mutally defined, the former must be inApp.View
to avoid cycle (or orphan)See also:
951
923