silverstripe-admin icon indicating copy to clipboard operation
silverstripe-admin copied to clipboard

Enhancements to sitetree js (`LeftAndMain.Tree.js`)

Open sabina-talipova opened this issue 1 year ago • 0 comments

Description

I'm not sure that we plan to update JS Legacy code, but just in case I'll add this list of improvements that were planned

  • [ ] updateNodesFromServer() - apply initially_opened config (See https://github.com/silverstripe/silverstripe-admin/blob/609a0700eab205034d502f8e99cbc1c3dde01dca/client/src/legacy/LeftAndMain.Tree.js#L378)
  • [ ] onaftersubmitform() - Trigger by implementing and inspecting "changed records" metadata sent by form submission response (as HTTP response headers) (See https://github.com/silverstripe/silverstripe-admin/blob/609a0700eab205034d502f8e99cbc1c3dde01dca/client/src/legacy/LeftAndMain.Tree.js#L144)
  • [ ] Icon and page type hover support
  • [ ] Sorting of sub nodes (originally placed in context menu)
  • [ ] Automatic load of full subtree via ajax on node checkbox selection (minNodeCount = 0) to avoid doing partial selection with "hidden nodes" (unloaded markup)
  • [ ] Disallow drag'n'drop when node has "noChildren" set (see siteTreeHints)
  • [ ] Disallow moving of pages marked as deleted most likely by server response codes rather than clientside
  • [ ] "defaultChild" when creating a page (sitetreeHints)
  • [ ] Duplicate page (originally located in context menu)
  • [ ] Update tree node title information and modified state after reordering (response is a JSON array)

Tasks most likely not required after moving to a standalone tree:

  • [ ] Context menu - to be replaced by a bezel UI
  • [ ] Refresh form for selected tree node if affected by reordering (new parent relationship)
  • [ ] Cancel current form load via ajax when new load is requested (synchronous loading)

See https://github.com/silverstripe/silverstripe-admin/blob/609a0700eab205034d502f8e99cbc1c3dde01dca/client/src/legacy/LeftAndMain.Tree.js#L26-L43

sabina-talipova avatar Oct 17 '23 01:10 sabina-talipova