mirror of
https://github.com/maziggy/bambuddy.git
synced 2026-05-09 08:25:54 +02:00
[PR #968] [MERGED] Feature: Collapsible folders for printer filters #1148
Labels
No labels
A1
automated
automated
bug
bug
Closed due to inactivity
contrib
dependencies
dependencies
duplicate
enhancement
feedback
hold
invalid
Notes
P1S
pull-request
security
ThumbsUp
user-report
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/bambuddy-maziggy-1#1148
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/maziggy/bambuddy/pull/968
Author: @cadtoolbox
Created: 4/14/2026
Status: ✅ Merged
Merged: 4/15/2026
Merged by: @maziggy
Base:
dev← Head:feature_printer-folders📝 Commits (10+)
9ab8ffdFeature: Collapsible folders for printer filtersfd9d42cFeature: Collapsible folders for printer filtersd4b0524Rebased + PR commentsa401620Feature: Collapsible grouped sections for printer filtersf5929e0Merge branch 'dev' into feature_printer-folders20518d0Merge branch 'dev' into feature_printer-folders9d7b393Merge branch 'dev' into feature_printer-folders812d965Merge branch 'dev' into feature_printer-foldersa90f628Updated for PR #968 Commentsa6af07cMerge branch 'dev' into feature_printer-folders📊 Changes
3 files changed (+198 additions, -82 deletions)
View changed files
📝
frontend/src/components/BulkPrinterToolbar.tsx(+1 -1)📝
frontend/src/components/Collapsible.tsx(+34 -12)📝
frontend/src/pages/PrintersPage.tsx(+163 -69)📄 Description
Description
Name sort: flat grid (unchanged)
Status/Model/Location sort: grouped sections with chevron toggle, click header to collapse/expand
Collapse state persists across page refreshes via localStorage
All sections start expanded by default
Related Issue
Fixes #966
Documentation
Companion docs PRs (delete lines that don't apply):
Pick one:
Type of Change
Changes Made
[Collapsible.tsx] — Added controlled mode support:
New optional open and onToggle props
When open is provided, parent controls the state; otherwise uses internal state (backwards-compatible)
[PrintersPage.tsx] — Four changes:
Constants (line ~990): STATUS_GROUP_ORDER (priority order for status groups) and STATUS_GROUP_META (maps each status to its i18n label key and dot color class)
State & callbacks (line ~5647, ~6101):
collapsedSections state persisted to localStorage (printerCollapsedSections)
toggleSectionCollapse() to toggle a section's collapsed state
selectByModel() for bulk-selecting all printers in a model group
Generalized groupedPrinters useMemo (line ~6119): Now activates for status, model, and location sorts (not just location). Status grouping reads from the query cache using the same classification logic as the existing status sort.
Unified grouped rendering (line ~6381): All three group types use with controlled open/close. Status groups appear in fixed priority order (error, printing, paused, finished, idle, offline) with matching colored dots. "Select All" buttons use e.stopPropagation() to avoid toggling collapse.
Screenshots
Testing
Checklist
Additional Notes
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.