1
0
Fork 0
mirror of https://github.com/maziggy/bambuddy.git synced 2026-05-09 08:25:54 +02:00

[PR #580] [MERGED] [Fix]: AMS slot modal infinite scroll loop on Windows #1077

Closed
opened 2026-05-07 00:15:52 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/580
Author: @aneopsy
Created: 3/3/2026
Status: Merged
Merged: 3/4/2026
Merged by: @maziggy

Base: 0.2.2b1Head: fix-ams-slot


📝 Commits (9)

  • 5785395 Fix AMS slot modal not scrolling to preselected filament
  • 1e09471 Merge branch '0.2.2b1' into fix-ams-slot
  • 5d4f2db Restore scrolledToRef lost during merge
  • b96e44d Merge remote-tracking branch 'upstream/0.2.2b1' into fix-ams-slot
  • bb65355 Merge branch '0.2.2b1' into fix-ams-slot
  • d0a6e4b Fix preset scroll loop and wire up useEffect scroll logic
  • eb47397 Merge remote-tracking branch 'upstream/0.2.2b1' into fix-ams-slot
  • b56d43d Merge branch '0.2.2b1' into fix-ams-slot
  • 1544b52 Adjust scroll behavior in ConfigureAmsSlotModal

📊 Changes

1 file changed (+32 additions, -10 deletions)

View changed files

📝 frontend/src/components/ConfigureAmsSlotModal.tsx (+32 -10)

📄 Description

Fixes #575

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

Inline callback refs on preset buttons called scrollIntoView on every
re-render, creating a scroll → re-render → scrollIntoView loop on
Windows.
Replace with a useEffect + data attribute approach that only
scrolls when the selected preset actually changes.

Preselect filament for printer-configured AMS slots

When an AMS slot was configured directly on the printer (no
savedPresetId), the modal didn't preselect the filament even though
it was in the list. Add a third fallback that matches trayInfoIdx
against the full filteredPresets list (cloud and builtin sources).

Testing

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

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

🔄 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/580 **Author:** [@aneopsy](https://github.com/aneopsy) **Created:** 3/3/2026 **Status:** ✅ Merged **Merged:** 3/4/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `0.2.2b1` ← **Head:** `fix-ams-slot` --- ### 📝 Commits (9) - [`5785395`](https://github.com/maziggy/bambuddy/commit/578539539662bec240b7761b6a35df221cfd222b) Fix AMS slot modal not scrolling to preselected filament - [`1e09471`](https://github.com/maziggy/bambuddy/commit/1e094717caa86a59f050f4319bfcdebd906ec2db) Merge branch '0.2.2b1' into fix-ams-slot - [`5d4f2db`](https://github.com/maziggy/bambuddy/commit/5d4f2db5fa3b42223c0cca9c536688f6b7720f5e) Restore scrolledToRef lost during merge - [`b96e44d`](https://github.com/maziggy/bambuddy/commit/b96e44d487535de172e2420b4ef26b7381e9e87d) Merge remote-tracking branch 'upstream/0.2.2b1' into fix-ams-slot - [`bb65355`](https://github.com/maziggy/bambuddy/commit/bb6535582026ab3ddca57a218fe792b9203a9b5f) Merge branch '0.2.2b1' into fix-ams-slot - [`d0a6e4b`](https://github.com/maziggy/bambuddy/commit/d0a6e4ba5db50a47f257b552e593c7a2f71842ff) Fix preset scroll loop and wire up useEffect scroll logic - [`eb47397`](https://github.com/maziggy/bambuddy/commit/eb47397fbd7d3fd4cb57047231d5c880c770edd8) Merge remote-tracking branch 'upstream/0.2.2b1' into fix-ams-slot - [`b56d43d`](https://github.com/maziggy/bambuddy/commit/b56d43df60a57c504f545ac237b86621c10d73d1) Merge branch '0.2.2b1' into fix-ams-slot - [`1544b52`](https://github.com/maziggy/bambuddy/commit/1544b52f37ba5ab94d452a6ac67720f886a5ec44) Adjust scroll behavior in ConfigureAmsSlotModal ### 📊 Changes **1 file changed** (+32 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/components/ConfigureAmsSlotModal.tsx` (+32 -10) </details> ### 📄 Description ## Related Issue Fixes #575 ## Type of Change - [X] 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 Inline callback refs on preset buttons called scrollIntoView on every re-render, creating a scroll → re-render → scrollIntoView loop on Windows. Replace with a useEffect + data attribute approach that only scrolls when the selected preset actually changes. **Preselect filament for printer-configured AMS slots** When an AMS slot was configured directly on the printer (no savedPresetId), the modal didn't preselect the filament even though it was in the list. Add a third fallback that matches trayInfoIdx against the full filteredPresets list (cloud and builtin sources). ## Testing - [X] I have tested this on my local machine - [X] I have tested with my printer model: WINDOWS ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [X] I have updated the documentation (if needed) - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:15:52 +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-maziggy-1#1077
No description provided.