ZDDC/browse/js
ZDDC 0b69367901 feat(browse): sort dropdown in the tree toolbar
The tree's underlying setSort API was carried forward from the old
table-with-clickable-headers UI but had no widget driving it after
the layout reshape. Adds an explicit dropdown in the toolbar:

  Sort: [Name (A→Z)         ▾]
        [Name (Z→A)            ]
        [Modified (new→old)    ]
        [Modified (old→new)    ]
        [Size (large→small)    ]
        [Size (small→large)    ]
        [Type (A→Z)            ]

Implementation:
- new tree.setSortExplicit(key, dir) — sets both axes in one call
  (the existing tree.setSort toggles direction on repeat-clicks,
  which is the right semantics for column-header clicks but wrong
  for an explicit dropdown).
- events.js parses the dropdown value as "<key>:<asc|desc>" and
  calls setSortExplicit. The dropdown is initialised to reflect
  the current sort state on mount.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 19:22:03 -05:00
..
app.js feat(browse): Phase 2 — preview popup, ZIP expansion, ext filter, breadcrumbs 2026-05-03 20:39:49 -05:00
events.js feat(browse): sort dropdown in the tree toolbar 2026-05-10 19:22:03 -05:00
grid.js feat(browse): two-pane shell + markdown plugin + grid mode (Phases A/B/C/D) 2026-05-10 15:46:51 -05:00
init.js feat(browse): two-pane shell + markdown plugin + grid mode (Phases A/B/C/D) 2026-05-10 15:46:51 -05:00
loader.js fix(browse): treat 404 on directory fetch as empty, not an error 2026-05-09 20:34:53 -05:00
preview-markdown.js feat(browse): TOC pane + FS-API saves in the markdown plugin 2026-05-10 19:02:32 -05:00
preview.js feat(browse): two-pane shell + markdown plugin + grid mode (Phases A/B/C/D) 2026-05-10 15:46:51 -05:00
tree.js feat(browse): sort dropdown in the tree toolbar 2026-05-10 19:22:03 -05:00