skele icon indicating copy to clipboard operation
skele copied to clipboard

Replace cursors with zippers

Open ognen opened this issue 7 years ago • 2 comments

Internally, replace the usage of cursors with zippers.

In the public facing API:

  • [ ] Element components receive a new property location which is the current zipper
  • [ ] The element property is no longer a cursor
  • [ ] uiForElement and uiForElements are removed
  • [ ] uiFor accepts the following things as the parameter
    • a string or an array of strings which is treated as now (a key path)
    • a zipper movement function which is interpreted as instruction on how to move from the current location to the one for which we require the UI
    • a selector (zip.select) which is interpreted as an instruction on the selection of elements for which we require an ui for

Given our current top-down architecture, care must be taken so that uiFor does not accept a movement up or sideways from the current location (otherwise shouldComponentUpdate shortcutting won't work).

Consider rewriting the updates reducer more elegantly.

ognen avatar Jul 14 '17 11:07 ognen

Depends on #53 for the selector feature.

ognen avatar Jul 14 '17 13:07 ognen

Consider rewriting the updates reducer more elegantly.

🤔 I wonder what this means...

andon avatar Dec 14 '18 16:12 andon