[6.2] [AI] Backend: Save column visibility preferences per user account in list views#23
Open
[6.2] [AI] Backend: Save column visibility preferences per user account in list views#23
Conversation
Adds plg_system_usercolumns (system plugin) that stores each logged-in user's hidden-column preferences in #__users.params (key: tablecolumns). The table-columns.es6.js saveState() now POSTs to com_ajax on every toggle (fire-and-forget), and loadState() reads server-injected state first so preferences follow the user across browsers and sessions, falling back to localStorage for guests and anonymous users. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Guard the server-sync fetch in saveState() with a dedicatedtable.columns.sync flag injected by the plugin (admin context only), so the AJAX call never fires on the frontend even when a CSRF token is present. Also adds an explicit csrf.token empty-check as a secondary guard.
…to-dropdown Add 'Keep settings' checkbox to table columns dropdown
…to-dropdown Unused language string
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.
Adds plg_system_usercolumns (system plugin) that stores each logged-in user's hidden-column preferences in #__users.params (key: hidden_tablecolumns) - only active in the backend. The table-columns.es6.js saveState() now POSTs to com_ajax on every toggle (fire-and-forget), and loadState() reads server-injected state first so preferences follow the user across browsers and sessions, falling back to localStorage for guests and anonymous users.
Pull Request resolves # .
Summary of Changes
via com_ajax (fire-and-forget, no UX impact)
falls back to localStorage for guests
into the page via Document::addScriptOptions() — no extra request needed
token, sanitises input, and saves preferences to #__users.params
Testing Instructions
System – User Column Preferences)
AJAX call to complete
log in
Actual result BEFORE applying this Pull Request
Column visibility is stored in localStorage only. Preferences are lost when
switching browsers, clearing cache, switching devices, or using a private tab.
Expected result AFTER applying this Pull Request
Expected result AFTER applying this Pull Request
Column visibility is persisted in the user account. Preferences are consistent
across all browsers and sessions for the same user account.
Link to documentations
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed