Repository navigation
Add user option to rotate table column headers - #12837
SchrodingersGat merged 6 commits into
Conversation
Wide column titles (e.g. "Temperature coefficient [±ppm/°C]") take a lot of horizontal space for narrow data. Add a ROTATE_TABLE_HEADERS user setting (Display Options) which renders table header titles vertically via a scoped CSS class, following the implementation sketch from the issue discussion.
✅ Deploy Preview for inventree-web-pui-preview canceled.
|
matmair
left a comment
There was a problem hiding this comment.
LGTM; I think this would be worth a changelog entry
|
Two CI notes for reviewers:
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #12837 +/- ##
==========================================
- Coverage 87.15% 87.06% -0.10%
==========================================
Files 1487 1500 +13
Lines 101500 101900 +400
Branches 11640 11547 -93
==========================================
+ Hits 88463 88715 +252
- Misses 12974 13122 +148
Partials 63 63
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
@wyyd-yxc please add an entry into the |
|
Done — added a changelog entry for the |
|
@wyyd-yxc thanks for the contribution |
Problem
All table headers render horizontally, so a long column title like
Temperature coefficient [±ppm/°C]consumes a lot of width even when the data below it is tiny (100). For parameter-heavy tables this wastes a large part of the screen (#12558, includes before/after screenshots).Solution
Adds a user setting (
Display Options → Rotated Table Headers, keyROTATE_TABLE_HEADERS, default off) which renders table column header titles vertically:ROTATE_TABLE_HEADERSadded toUSER_SETTINGS(common/setting/user.py), next to the existingSTICKY_TABLE_HEADERInvenTreeTableapplies arotate-table-headersclass to the table when enabledsrc/styles/overrides.cssrotates the header title text (writing-mode: vertical-rl+ 180° rotation, bottom-aligned cells) - following the implementation sketch from the issue discussionThe option is fully user-configurable and off by default, so existing tables are unchanged unless the user opts in.
Testing
yarn run build(fulltsctypecheck + vite build) passesfalse)Closes #12558