Bug 41439 - Column filtering on the circ rules table
Summary: Column filtering on the circ rules table
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Martin Renvoize (ashimema)
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-12 11:27 UTC by Martin Renvoize (ashimema)
Modified: 2025-12-15 11:11 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 41439: Add column visibility toggles to circulation rules table (10.43 KB, patch)
2025-12-12 11:30 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Proof of concept (232.38 KB, video/mp4)
2025-12-12 11:30 UTC, Martin Renvoize (ashimema)
Details
Bug 41439: Add column visibility toggles to circulation rules table (24.56 KB, patch)
2025-12-12 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Renvoize (ashimema) 2025-12-12 11:27:55 UTC
The Circulation Rules table is obscenely wide at this point. We've tried a number of approaches to a new UI in this area, and so far all have got stuck.

I'm proposing a smaller impact resolution of just having a set of column groups for display to allow limiting the width of the table to only those fields of interest at the moment you're working.
Comment 1 Martin Renvoize (ashimema) 2025-12-12 11:30:13 UTC
Created attachment 190455 [details] [review]
Bug 41439: Add column visibility toggles to circulation rules table

The circulation rules table has become excessively wide with 40+
columns, making it difficult to navigate and use. This patch adds
column visibility toggle buttons that allow users to focus on
specific rule categories.

Changes:
- Add toggle buttons for: Checkouts, Due dates, Fines, Renewals,
  Holds, Article requests, Recalls, and Show all
- Group columns into logical categories based on their function
- Default to showing only Checkout columns on page load for a
  cleaner initial view
- Highlight the active button to indicate current view
- Disable search functionality (not appropriate for this table)
- Calculate column indices dynamically based on enabled system
  preferences (UnseenRenewals, ArticleRequests, UseRecalls)

Test plan:
1. Navigate to Administration > Circulation and fine rules
2. Observe the table now shows only checkout-related columns by
   default with the "Checkouts" button highlighted
3. Click different category buttons (Fines, Renewals, Holds, etc.)
   and verify only relevant columns are shown
4. Verify the active button is highlighted in blue
5. Click "Show all" to display all columns
6. Verify the layout works with different system preference
   combinations (enable/disable ArticleRequests, UseRecalls,
   UnseenRenewals)
Comment 2 Martin Renvoize (ashimema) 2025-12-12 11:30:40 UTC
Created attachment 190456 [details]
Proof of concept
Comment 3 Martin Renvoize (ashimema) 2025-12-12 11:32:53 UTC
This is just a proof of concept for now and will need testing to ensure it fully works with form submission etc.. I've only quickly trials the 'look'.

Setting to Needs Signoff to trigger some feedback.. whilst I do want some feedback and any suggestions of other approaches, lets try to stick to simple solutions for now to limit the scope.. I still think longer term we'll want to re-write this page in Vue with a possibly very different overall UI but that's for another bug.
Comment 4 Martin Renvoize (ashimema) 2025-12-12 12:11:36 UTC
Created attachment 190459 [details] [review]
Bug 41439: Add column visibility toggles to circulation rules table

The circulation rules table has become excessively wide with 40+
columns, making it difficult to navigate and use. This patch adds
column visibility toggle buttons that allow users to focus on
specific rule categories.

Changes:
- Add data-colname attributes to all table headers and footers
  for robust column identification
- Add toggle buttons for: Checkouts, Due dates, Fines, Renewals,
  Holds, Article requests, Recalls, and Show all
- Group columns into logical categories based on their function
- Use column name selectors instead of fragile index-based
  selection for maintainability
- Default to showing only Checkout columns on page load for a
  cleaner initial view
- Highlight the active button to indicate current view
- Disable search functionality (not appropriate for this table)
- Handle dynamic column visibility based on system preferences
  (UnseenRenewals, ArticleRequests, UseRecalls)

Test plan:
1. Navigate to Administration > Circulation and fine rules
2. Observe the table now shows only checkout-related columns by
   default with the "Checkouts" button highlighted
3. Click different category buttons (Fines, Renewals, Holds, etc.)
   and verify only relevant columns are shown
4. Verify the active button is highlighted in blue
5. Click "Show all" to display all columns
6. Verify the layout works with different system preference
   combinations (enable/disable ArticleRequests, UseRecalls,
   UnseenRenewals)
7. Verify column visibility persists correctly when system
   preferences are changed