feat(web-ui): add a column picker and persist sort + columns per table - #584
Merged
Conversation
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.
Member
Author
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.
Details
checkbox menu for toggleable columns (those with a key and not flagged 'always').