[PR #1205] [MERGED] UI/multi color handling #1175

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

📋 Pull Request Information

Original PR: https://github.com/maziggy/bambuddy/pull/1205
Author: @maugsburger
Created: 5/3/2026
Status: Merged
Merged: 5/5/2026
Merged by: @maziggy

Base: devHead: ui/multi-color-handling


📝 Commits (10+)

  • 03a08f6 Improved Swatch Designs
  • 825f01a checkerboard and multi-gradient
  • 227235c Merge branch 'dev' into ui/multi-color-handling
  • b9b90a2 Merge branch 'dev' into ui/multi-color-handling
  • 1cad1e8 Merge branch 'dev' into ui/multi-color-handling
  • 8f5056e Add helper script for spool effect tests
  • 859df97 Fix sparkle counting, align pattern generation comment with the code
  • 0bde9be re-add random transparency to spark effect
  • 202dbd3 switch to own hash and mulberry implementation, require swatchType
  • cbbc1ad Use and cache buildFilamentBackground FilamentSwatch()

📊 Changes

10 files changed (+463 additions, -95 deletions)

View changed files

📝 frontend/src/__tests__/components/FilamentSwatch.test.tsx (+88 -18)
📝 frontend/src/components/ColorCatalogSettings.tsx (+1 -0)
📝 frontend/src/components/FilamentSwatch.tsx (+11 -25)
📝 frontend/src/components/filamentSwatchHelpers.ts (+74 -34)
📝 frontend/src/components/spool-form/ColorSection.tsx (+2 -0)
📝 frontend/src/pages/InventoryPage.tsx (+3 -0)
frontend/src/utils/random.ts (+80 -0)
scripts/fill_spool_effects.py (+204 -0)
test_backend.sh (+0 -11)
test_frontend.sh (+0 -7)

📄 Description

Description

Rework multi color swatch handling

https://github.com/maziggy/bambuddy/issues/1154

Documentation

Not done so far. I will update the documentation as soon as I know this PR is considererd mergeable.

Companion docs PRs (delete lines that don't apply):

  • Wiki: maziggy/bambuddy-wiki#___
  • Website: maziggy/bambuddy-website#___

Pick one:

  • Docs PR(s) linked above
  • No docs update required — reason: ___

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

Only UI rendering changes:

  • Fix that all swatch patterns were tiled.
  • Create unique but constant sparkle patterns
  • Different density presets per swatch type / header / …
  • More prominent checkerboard, works better on light and dark filaments
  • show multi-color in segments.

Screenshots

image

Testing

Looked at the changes in a browser, updated the automated tests.

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

Checklist

  • My code follows the project's coding style
  • I have commented my code where necessary
  • My changes generate no new warnings
  • I have tested my changes thoroughly

Additional Notes


🔄 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/1205 **Author:** [@maugsburger](https://github.com/maugsburger) **Created:** 5/3/2026 **Status:** ✅ Merged **Merged:** 5/5/2026 **Merged by:** [@maziggy](https://github.com/maziggy) **Base:** `dev` ← **Head:** `ui/multi-color-handling` --- ### 📝 Commits (10+) - [`03a08f6`](https://github.com/maziggy/bambuddy/commit/03a08f6dd0a205cce0750c9ccb7bd80dc5133855) Improved Swatch Designs - [`825f01a`](https://github.com/maziggy/bambuddy/commit/825f01ad2273084cc9e2a95f21e9dcb3be507f8e) checkerboard and multi-gradient - [`227235c`](https://github.com/maziggy/bambuddy/commit/227235ce1373f2df3c0a265ce31f78193ad5ed0e) Merge branch 'dev' into ui/multi-color-handling - [`b9b90a2`](https://github.com/maziggy/bambuddy/commit/b9b90a28861870fba45f29e2ef4171820938a585) Merge branch 'dev' into ui/multi-color-handling - [`1cad1e8`](https://github.com/maziggy/bambuddy/commit/1cad1e8717652d614f6e85e862e4c647a2a37b58) Merge branch 'dev' into ui/multi-color-handling - [`8f5056e`](https://github.com/maziggy/bambuddy/commit/8f5056e0f11e0deb81035601e717f9bddb565a3e) Add helper script for spool effect tests - [`859df97`](https://github.com/maziggy/bambuddy/commit/859df97e02d3d9d7ab8b5b77c4f1cceb3c898aa9) Fix sparkle counting, align pattern generation comment with the code - [`0bde9be`](https://github.com/maziggy/bambuddy/commit/0bde9be039051c1625ca7ea906af1f2a31c1ad24) re-add random transparency to spark effect - [`202dbd3`](https://github.com/maziggy/bambuddy/commit/202dbd3ca53be29cdd9d36b5e68af56d8e800eab) switch to own hash and mulberry implementation, require swatchType - [`cbbc1ad`](https://github.com/maziggy/bambuddy/commit/cbbc1ad817ca76c42a4963b5b223413d2007a3f1) Use and cache buildFilamentBackground FilamentSwatch() ### 📊 Changes **10 files changed** (+463 additions, -95 deletions) <details> <summary>View changed files</summary> 📝 `frontend/src/__tests__/components/FilamentSwatch.test.tsx` (+88 -18) 📝 `frontend/src/components/ColorCatalogSettings.tsx` (+1 -0) 📝 `frontend/src/components/FilamentSwatch.tsx` (+11 -25) 📝 `frontend/src/components/filamentSwatchHelpers.ts` (+74 -34) 📝 `frontend/src/components/spool-form/ColorSection.tsx` (+2 -0) 📝 `frontend/src/pages/InventoryPage.tsx` (+3 -0) ➕ `frontend/src/utils/random.ts` (+80 -0) ➕ `scripts/fill_spool_effects.py` (+204 -0) ➖ `test_backend.sh` (+0 -11) ➖ `test_frontend.sh` (+0 -7) </details> ### 📄 Description ## Description Rework multi color swatch handling ## Related Issue https://github.com/maziggy/bambuddy/issues/1154 ## Documentation Not done so far. I will update the documentation as soon as I know this PR is considererd mergeable. **Companion docs PRs** (delete lines that don't apply): - Wiki: maziggy/bambuddy-wiki#___ - Website: maziggy/bambuddy-website#___ **Pick one**: - [ ] Docs PR(s) linked above - [ ] No docs update required — reason: ___ ## Type of Change <!-- Mark the relevant option with an "x" --> - [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 Only UI rendering changes: - Fix that all swatch patterns were tiled. - Create unique but constant sparkle patterns - Different density presets per swatch type / header / … - More prominent checkerboard, works better on light and dark filaments - show multi-color in <color-count> segments. ## Screenshots <img width="1102" height="1096" alt="image" src="https://github.com/user-attachments/assets/2c7faa63-443e-4c5c-bfc5-5bc6cdfab6d1" /> ## Testing Looked at the changes in a browser, updated the automated tests. - [X] I have tested this on my local machine - [ ] I have tested with my printer model: <!-- e.g., X1C, P1S, A1 --> ## Checklist - [X] My code follows the project's coding style - [X] I have commented my code where necessary - [X] My changes generate no new warnings - [X] I have tested my changes thoroughly ## Additional Notes --- <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:31 +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#1175
No description provided.