| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label. Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @alexWinterjuice. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. Unlinked contributors: alexWinterjuice. Co-authored-by: Trushiv04 <trushiv@git.wordpress.org> Co-authored-by: dkotter <dkotter@git.wordpress.org> Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org> To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## develop #669 +/- ##
=============================================
+ Coverage 74.57% 74.68% +0.10%
Complexity 1754 1754
=============================================
Files 85 85
Lines 7548 7549 +1
=============================================
+ Hits 5629 5638 +9
+ Misses 1919 1911 -8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
In testing, this does now allow you to change the order of these columns but unless I'm missing something, the order does not persist beyond the first page load. If I change the order and refresh, the order reverts back. Should we be trying to save the order for future page loads?
Sorry, something went wrong.
Hi @dkotter, I guess yes that's the ask in issue ticket. If we notice the DataViews in the Appearence --> Editor --> Pages, the column order you change and then reloads it would be persistent for that user on page loads. IMO, if we are providing this order, then we should same this somewhere else, we can remove the order field and make it fixed. The UX would be better either ways. |
Sorry, something went wrong.
|
thanks! @dkotter You're right the previous version only kept the order for the current page view. I've updated the PR to persist column order across page loads. The order is now saved to localStorage as part of logsQuery (the same mechanism that already persists filters and search), so it survives refreshes. Changes:
Tested by reordering columns, refreshing, and confirming the order persists. |
Sorry, something went wrong.
|
Hi @Trushiv04, Thanks for the PR. Can we also update the column visibility in the same PR? For example, please refer the screencast. When I update the column to hide, and refresh it again, the column is visible again. If we can land a fix within the scope of this PR would be good IMO. Because both are same issue and would use similar logic, so we can include this in PR. Before Fix (with this PR change)Screen.Recording.2026-06-05.at.11.32.02.AM.movAfter Fix (Just visibility change)Screen.Recording.2026-06-05.at.11.20.15.AM.movCan you please update the PR with a fix. This is because, if the user update any column to hide, then loads the page, the column order changes are lost they are not persisted. I would add the same thing in issue description, so issue author can update the description. Thanks, |
Sorry, something went wrong.
|
Thanks @hbhalodia! You're right they're the same underlying issue, so it made sense to handle both here. The root cause was in normalizeFields: it required the stored field list to match the full default length, otherwise it reset to all columns. When a user hid a column, the shorter list was treated as invalid and all columns came back on reload. I've updated it so a shorter field list is treated as valid (the user may have intentionally hidden columns). It now only falls back to the default order when the stored value is missing or contains nothing valid. So both column order and column visibility now persist across reloads. Tested:
|
Sorry, something went wrong.
Fixed - Column reordering and hiding in the AI Request Logs table now persists instead of resetting to the default. Unlinked contributors: alexWinterjuice. Co-authored-by: Trushiv04 <trushiv@git.wordpress.org> Co-authored-by: dkotter <dkotter@git.wordpress.org> Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org>
|
@alexWinterjuice if you're able to confirm your WordPress.org username (and ideally link it with your GitHub account), then I can ensure its properly credited in the AI plugin release (and associated AI Contributor badge)... thanks! |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
What?
Closes #667
Fixes the AI Request Logs table so that "move left / move right" column reordering persists instead of snapping back to the default order.
Why?
In LogsTable.tsx, onChangeView ran sortFieldsByCanonicalOrder() on every view update, which re-sorted the fields back to DEFAULT_VIEW_FIELDS immediately after the user reordered a column. As a result, column order changes had no effect.
How?
Removed the canonical resort from onChangeView so the user's chosen field order (nextView.fields) is preserved. The initial field order is already set to DEFAULT_VIEW_FIELDS when state is initialized, so canonical ordering on the first render is unaffected. The now-unused FIELD_ORDER map and sortFieldsByCanonicalOrder helper were removed.
Use of AI Tools
AI assistance: Yes
Tool(s): Claude
Used for: Locating the cause in onChangeView and drafting the fix. Final implementation and manual testing were done by me.
Testing Instructions
Screenshots or screencast
After the fix column reordering now persists:
Screen.Recording.2026-06-04.at.6.59.45.PM.movChangelog Entry