Skip to content

feat(web-ui): add a column picker and persist sort + columns per table - #584

Merged
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:feature/web17
Jul 24, 2026
Merged

feat(web-ui): add a column picker and persist sort + columns per table#584
ngosang merged 1 commit into
amule-org:masterfrom
ngosang:feature/web17

Conversation

@ngosang

@ngosang ngosang commented Jul 24, 2026

Copy link
Copy Markdown
Member

Every VirtualTable-based table (downloads, shared, search, clients, ed2k servers) now has a column picker to show/hide columns, and remembers its sort direction and hidden columns per-table in localStorage.

  • store.js: add loadPref/savePref, a guarded localStorage JSON get/set that degrades to the fallback when localStorage is disabled/full. Kept next to the in-memory pub/sub store rather than in a separate module.
  • table.js: useTablePrefs hook persists sort + hidden columns under amule.table.; ColumnPicker renders a native
    Details checkbox menu for toggleable columns (those with a key and not flagged 'always').
  • views: each table swaps its local sort state for useTablePrefs and drops a ColumnPicker into its toolbar; the full column set feeds sortRows while only the visible subset feeds VirtualTable. Checkbox + name columns are flagged 'always' (fixed); everything else, actions included, is toggleable. Columns that lacked a key (server version/address/priority, shared priority) gain one so they sort and hide too.
  • split-detail.js: use the shared loadPref/savePref for the panel height instead of a bespoke unguarded localStorage access.
  • app.css: styles for the .col-picker dropdown, with a scrollable menu and roomier tap targets on touch screens.
  • i18n (en/es): add the 'Columns' key.

Every VirtualTable-based table (downloads, shared, search, clients, ed2k
servers) now has a column picker to show/hide columns, and remembers its
sort direction and hidden columns per-table in localStorage.

- store.js: add loadPref/savePref, a guarded localStorage JSON get/set that
  degrades to the fallback when localStorage is disabled/full. Kept next to
  the in-memory pub/sub store rather than in a separate module.
- table.js: useTablePrefs hook persists sort + hidden columns under
  amule.table.<key>; ColumnPicker renders a native <details> checkbox menu
  for toggleable columns (those with a key and not flagged 'always').
- views: each table swaps its local sort state for useTablePrefs and drops a
  ColumnPicker into its toolbar; the full column set feeds sortRows while
  only the visible subset feeds VirtualTable. Checkbox + name columns are
  flagged 'always' (fixed); everything else, actions included, is toggleable.
  Columns that lacked a key (server version/address/priority, shared
  priority) gain one so they sort and hide too.
- split-detail.js: use the shared loadPref/savePref for the panel height
  instead of a bespoke unguarded localStorage access.
- app.css: styles for the .col-picker dropdown, with a scrollable menu and
  roomier tap targets on touch screens.
- i18n (en/es): add the 'Columns' key.
@ngosang

ngosang commented Jul 24, 2026

Copy link
Copy Markdown
Member Author
imagen

@ngosang
ngosang merged commit ebfbb0b into amule-org:master Jul 24, 2026
14 checks passed
@ngosang
ngosang deleted the feature/web17 branch July 24, 2026 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant