[PR #889] [MERGED] [Feature] Improve AssignSpoolModal filtering logic #1123

Closed
opened 2026-05-06 12:35:11 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/889
Author: @Keybored02
Created: 4/4/2026
Status: Merged
Merged: 4/8/2026
Merged by: @maziggy

Base: devHead: feature/fil_sel_fix_2


📝 Commits (10+)

  • be4f72a Improve filtering logic, add localised field (en), add toggle for view all
  • dc05d9c AssignSpoolModal fit to display
  • f3d042e Merge branch 'dev' into feature/fil_sel_fix_2
  • af202db Merge branch 'dev' into feature/fil_sel_fix_2
  • 18f2f1f Add locales, fix filter
  • 38f1e9a Merge branch 'feature/fil_sel_fix_2' of https://github.com/Keybored02/bambuddy into feature/fil_sel_fix_2
  • 4bc71a2 Merge branch 'dev' into feature/fil_sel_fix_2
  • 149fb5c Merge branch 'dev' into feature/fil_sel_fix_2
  • 245743b Reset selected spool ID on filtering toggle
  • c2f2e64 Remove duplicate state declaration for selectedSpoolId

📊 Changes

8 files changed (+77 additions, -34 deletions)

View changed files

📝 frontend/src/components/AssignSpoolModal.tsx (+70 -34)
📝 frontend/src/i18n/locales/de.ts (+1 -0)
📝 frontend/src/i18n/locales/en.ts (+1 -0)
📝 frontend/src/i18n/locales/fr.ts (+1 -0)
📝 frontend/src/i18n/locales/it.ts (+1 -0)
📝 frontend/src/i18n/locales/ja.ts (+1 -0)
📝 frontend/src/i18n/locales/pt-BR.ts (+1 -0)
📝 frontend/src/i18n/locales/zh-CN.ts (+1 -0)

📄 Description

Description

This PR improves Assign Spool usability in kiosk mode and tightens the spool filtering flow. It adds a viewport-safe modal layout so the Assign Spool dialog fits on smaller screens, and it refines the filtering logic with localized fields plus a “view all” toggle.

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test addition or update

Changes Made

  • The old logic always narrowed the list by tray profile when profile data existed, which was good for safety but too strict when the metadata was incomplete or when one needed to browse more broadly. The new logic keeps the search filter, but makes the tray/profile filter optional behind a “Show all spools” toggle, so you can still fall back to the full manual spool list without changing the underlying assignment rules.
  • Now the modal is capped to 90vh, the body scrolls internally, and the footer stays available, which keeps the Assign / Cancel actions accessible on small screens.

Screenshots

image

Testing

  • I have tested this on my local machine
  • I have tested with my printer model: H2C

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • I have updated the documentation (if needed)
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes

Tested on SpoolBuddy too.
-->


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/maziggy/bambuddy/pull/889 **Author:** [@Keybored02](https://github.com/Keybored02) **Created:** 4/4/2026 **Status:** ✅ Merged **Merged:** 4/8/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `dev` ← **Head:** `feature/fil_sel_fix_2` --- ### 📝 Commits (10+) - [`be4f72a`](https://github.com/maziggy/bambuddy/commit/be4f72a005285b2ab26819a0a68ba5ceb7ea57f9) Improve filtering logic, add localised field (en), add toggle for view all - [`dc05d9c`](https://github.com/maziggy/bambuddy/commit/dc05d9cbe3d04edd3031b8e455b4f572829f671c) AssignSpoolModal fit to display - [`f3d042e`](https://github.com/maziggy/bambuddy/commit/f3d042edda45f037a9d04361ac24ccf9ba8645ab) Merge branch 'dev' into feature/fil_sel_fix_2 - [`af202db`](https://github.com/maziggy/bambuddy/commit/af202db9ff3a449e0ecc5ece6d73c4f5499c284e) Merge branch 'dev' into feature/fil_sel_fix_2 - [`18f2f1f`](https://github.com/maziggy/bambuddy/commit/18f2f1f6e7d43180f2473b4a153292cbcb57057a) Add locales, fix filter - [`38f1e9a`](https://github.com/maziggy/bambuddy/commit/38f1e9aecd4d6901298180c45ee7b216616ccc36) Merge branch 'feature/fil_sel_fix_2' of https://github.com/Keybored02/bambuddy into feature/fil_sel_fix_2 - [`4bc71a2`](https://github.com/maziggy/bambuddy/commit/4bc71a241f6f11994f97a86385fd8fcb79a80b0d) Merge branch 'dev' into feature/fil_sel_fix_2 - [`149fb5c`](https://github.com/maziggy/bambuddy/commit/149fb5c4b76f314ac012928ecec1c70b5d8375ca) Merge branch 'dev' into feature/fil_sel_fix_2 - [`245743b`](https://github.com/maziggy/bambuddy/commit/245743bc39b54ffd57f153562d1ccd2aae028fb8) Reset selected spool ID on filtering toggle - [`c2f2e64`](https://github.com/maziggy/bambuddy/commit/c2f2e64df2f3dc7a2350fbad294fde335ab15e23) Remove duplicate state declaration for selectedSpoolId ### 📊 Changes **8 files changed** (+77 additions, -34 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/AssignSpoolModal.tsx` (+70 -34) 📝 `frontend/src/i18n/locales/de.ts` (+1 -0) 📝 `frontend/src/i18n/locales/en.ts` (+1 -0) 📝 `frontend/src/i18n/locales/fr.ts` (+1 -0) 📝 `frontend/src/i18n/locales/it.ts` (+1 -0) 📝 `frontend/src/i18n/locales/ja.ts` (+1 -0) 📝 `frontend/src/i18n/locales/pt-BR.ts` (+1 -0) 📝 `frontend/src/i18n/locales/zh-CN.ts` (+1 -0) </details> ### 📄 Description ## Description This PR improves Assign Spool usability in kiosk mode and tightens the spool filtering flow. It adds a viewport-safe modal layout so the Assign Spool dialog fits on smaller screens, and it refines the filtering logic with localized fields plus a “view all” toggle. ## Type of Change <!-- Mark the relevant option with an "x" --> - [ ] Bug fix (non-breaking change that fixes an issue) - [x] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test addition or update ## Changes Made <!-- List the specific changes made in this PR --> - The old logic always narrowed the list by tray profile when profile data existed, which was good for safety but too strict when the metadata was incomplete or when one needed to browse more broadly. The new logic keeps the search filter, but makes the tray/profile filter optional behind a “Show all spools” toggle, so you can still fall back to the full manual spool list without changing the underlying assignment rules. - Now the modal is capped to 90vh, the body scrolls internally, and the footer stays available, which keeps the Assign / Cancel actions accessible on small screens. ## Screenshots <img width="1107" height="783" alt="image" src="https://github.com/user-attachments/assets/f9e79c93-7dd7-4ddd-b6ab-ab58615ffbb1" /> ## Testing <!-- Describe how you tested your changes --> - [x] I have tested this on my local machine - [x] I have tested with my printer model: H2C ## Checklist - [x] My code follows the project's coding style - [x] I have commented my code where necessary - [ ] I have updated the documentation (if needed) - [x] My changes generate no new warnings - [x] I have tested my changes thoroughly ## Additional Notes Tested on SpoolBuddy too. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:35:11 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/bambuddy#1123
No description provided.