Skip to content

Fix Spool Edit page Empty Weight and Initial Weight bug#717

Merged
Donkie merged 1 commit into
Donkie:masterfrom
ajford:spool_edit_weight_iss477
Jan 5, 2026
Merged

Fix Spool Edit page Empty Weight and Initial Weight bug#717
Donkie merged 1 commit into
Donkie:masterfrom
ajford:spool_edit_weight_iss477

Conversation

@ajford
Copy link
Copy Markdown
Contributor

@ajford ajford commented Jun 27, 2025

This work fixes #477 by defaulting to spool values first.

First foray into TypeScript after a long stretch away from React/JSX so I'm very open to addressing any style/best-practice issues.

After digging in locally, I noticed the issue appeared to be related to the useEffect hook at edit.tsx#L133. Upon loading the page it would initialize the form with the values from the selected filament, without first checking to see if there were already values present.

To resolve the issue I took advantage of the already defined getSpoolWeight() and getFilamentWeight() functions which already implement the desired behavior by returning the spool values, then filament values when the spool values are undefined, and finally falling back to 0.

@ajford
Copy link
Copy Markdown
Contributor Author

ajford commented Oct 16, 2025

Bump

@Donkie
Copy link
Copy Markdown
Owner

Donkie commented Jan 5, 2026

Thanks for the fix, sorry for the very slow response!

@Donkie Donkie merged commit 9baf913 into Donkie:master Jan 5, 2026
renovate Bot added a commit to sdwilsh/ansible-playbooks that referenced this pull request Jan 23, 2026
##### [\`0.23.0\`](https://github.com/Donkie/Spoolman/releases/tag/v0.23.0)

New year new update!

Spoolman development has slowed down considerably last year, due to multiple personal reasons from my side. Here is an update with all the things that have accumulated over the last months. Most of the updates are from contributions from the community, many thanks!

There's been many significant dependency version updates in this update. Please report any new issues you find. If anything is breaking your ability to use it, it's safe to go back to the previous version (22.1) until it has been addressed.

##### What's Changed

- Improved standalone install script. It now automatically downloads and installs the best Python version for you. This means Spoolman should now support a lot more distributions, and you don't need to fix any Python versions or other packages beforehand!
- Spoolman docker images are now officially published on [dockerhub](https://hub.docker.com/r/donkieyo/spoolman)!
- Spoolman now uses uv instead of pdm for backend package management.
- Updated all backend and client packages to their latest versions.
- Spoolman now requires at least Python 3.10, and defaults to Python 3.14 in both Docker and Standalone installation methods.
- Added adjust spool button by [@htsachakis](https://github.com/htsachakis) in [#626](Donkie/Spoolman#626)
- 🔨 Add pool\_recycle for MySQL by [@sinclairpaul](https://github.com/sinclairpaul) in [#668](Donkie/Spoolman#668)
- Add Measured Weight option to the filament adjustment modal  by [@spyder007](https://github.com/spyder007) in [#660](Donkie/Spoolman#660)
- Remade translation into Brazilian Portuguese by [@opastorello](https://github.com/opastorello) in [#694](Donkie/Spoolman#694)
- Add SPOOLMAN\_CORS\_ORIGIN variable by [@ecarjat](https://github.com/ecarjat) in [#605](Donkie/Spoolman#605)
- Add Spoolcount in Locations Page by [@JakobGue](https://github.com/JakobGue) in [#715](Donkie/Spoolman#715)
- Fix Spool Edit page Empty Weight and Initial Weight bug by [@ajford](https://github.com/ajford) in [#717](Donkie/Spoolman#717)
- Reduce Docker container size by [@Shadowsith](https://github.com/Shadowsith) in [#747](Donkie/Spoolman#747)
- Supports PWA. by [@sixiaolong1117](https://github.com/sixiaolong1117) in [#762](Donkie/Spoolman#762)
- Add support for Fedora to install.sh by [@mnebelung](https://github.com/mnebelung) in [#786](Donkie/Spoolman#786)
- All caps short QR codes for alphanumerical encoding by [@beikeland](https://github.com/beikeland) in [#777](Donkie/Spoolman#777)
- Bugfix for issue [#803](Donkie/Spoolman#803) and [#805](Donkie/Spoolman#805) by [@kaufi95](https://github.com/kaufi95) in [#811](Donkie/Spoolman#811)

##### Translations

- Updated Norwegian Bokmål translation by Vegard Fladby
- Updated Lithuanian translation by vjurka
- Updated French translation by Bazzofski
- Updated Hindi (Latin script) translation by Archit Jain
- Updated Italian translation by Giadej
- Updated Czech translation by Miloslav Kos and Marek Dvorný
- Updated Russian translation by dimquea and Dr\_Perry\_Coke
- Updated Romanian translation by Cristian
- Updated Turkish translation by Yücelen Gül
- Updated Spanish translation by Jose
- Updated Portuguese (Brazil) translation by KnightArch
- Updated Portuguese translation by rupefelo
- Updated German translation by Tobias Maschek, derSchreiber, Justus Kagerer and Ivo Grossen
- Updated Tamil translation by தமிழ்நேரம்
- Updated Polish translation by Julia 🌸🏳️‍⚧️
- Updated Chinese (Simplified Han script) translation by Samuel Wang
- Updated Estonian translation by Arvi Saluste

##### New Contributors

- [@htsachakis](https://github.com/htsachakis) made their first contribution in [#626](Donkie/Spoolman#626)
- [@sinclairpaul](https://github.com/sinclairpaul) made their first contribution in [#668](Donkie/Spoolman#668)
- [@opastorello](https://github.com/opastorello) made their first contribution in [#694](Donkie/Spoolman#694)
- [@ecarjat](https://github.com/ecarjat) made their first contribution in [#605](Donkie/Spoolman#605)
- [@JakobGue](https://github.com/JakobGue) made their first contribution in [#715](Donkie/Spoolman#715)
- [@ajford](https://github.com/ajford) made their first contribution in [#717](Donkie/Spoolman#717)
- [@Shadowsith](https://github.com/Shadowsith) made their first contribution in [#747](Donkie/Spoolman#747)
- [@sixiaolong1117](https://github.com/sixiaolong1117) made their first contribution in [#762](Donkie/Spoolman#762)
- [@mnebelung](https://github.com/mnebelung) made their first contribution in [#786](Donkie/Spoolman#786)
- [@beikeland](https://github.com/beikeland) made their first contribution in [#777](Donkie/Spoolman#777)
- [@kaufi95](https://github.com/kaufi95) made their first contribution in [#811](Donkie/Spoolman#811)

**Full Changelog**: <Donkie/Spoolman@v0.22.1...v0.23.0>
sdwilsh pushed a commit to sdwilsh/ansible-playbooks that referenced this pull request Jan 29, 2026
##### [\`0.23.0\`](https://github.com/Donkie/Spoolman/releases/tag/v0.23.0)

New year new update!

Spoolman development has slowed down considerably last year, due to multiple personal reasons from my side. Here is an update with all the things that have accumulated over the last months. Most of the updates are from contributions from the community, many thanks!

There's been many significant dependency version updates in this update. Please report any new issues you find. If anything is breaking your ability to use it, it's safe to go back to the previous version (22.1) until it has been addressed.

##### What's Changed

- Improved standalone install script. It now automatically downloads and installs the best Python version for you. This means Spoolman should now support a lot more distributions, and you don't need to fix any Python versions or other packages beforehand!
- Spoolman docker images are now officially published on [dockerhub](https://hub.docker.com/r/donkieyo/spoolman)!
- Spoolman now uses uv instead of pdm for backend package management.
- Updated all backend and client packages to their latest versions.
- Spoolman now requires at least Python 3.10, and defaults to Python 3.14 in both Docker and Standalone installation methods.
- Added adjust spool button by [@htsachakis](https://github.com/htsachakis) in [#626](Donkie/Spoolman#626)
- 🔨 Add pool\_recycle for MySQL by [@sinclairpaul](https://github.com/sinclairpaul) in [#668](Donkie/Spoolman#668)
- Add Measured Weight option to the filament adjustment modal  by [@spyder007](https://github.com/spyder007) in [#660](Donkie/Spoolman#660)
- Remade translation into Brazilian Portuguese by [@opastorello](https://github.com/opastorello) in [#694](Donkie/Spoolman#694)
- Add SPOOLMAN\_CORS\_ORIGIN variable by [@ecarjat](https://github.com/ecarjat) in [#605](Donkie/Spoolman#605)
- Add Spoolcount in Locations Page by [@JakobGue](https://github.com/JakobGue) in [#715](Donkie/Spoolman#715)
- Fix Spool Edit page Empty Weight and Initial Weight bug by [@ajford](https://github.com/ajford) in [#717](Donkie/Spoolman#717)
- Reduce Docker container size by [@Shadowsith](https://github.com/Shadowsith) in [#747](Donkie/Spoolman#747)
- Supports PWA. by [@sixiaolong1117](https://github.com/sixiaolong1117) in [#762](Donkie/Spoolman#762)
- Add support for Fedora to install.sh by [@mnebelung](https://github.com/mnebelung) in [#786](Donkie/Spoolman#786)
- All caps short QR codes for alphanumerical encoding by [@beikeland](https://github.com/beikeland) in [#777](Donkie/Spoolman#777)
- Bugfix for issue [#803](Donkie/Spoolman#803) and [#805](Donkie/Spoolman#805) by [@kaufi95](https://github.com/kaufi95) in [#811](Donkie/Spoolman#811)

##### Translations

- Updated Norwegian Bokmål translation by Vegard Fladby
- Updated Lithuanian translation by vjurka
- Updated French translation by Bazzofski
- Updated Hindi (Latin script) translation by Archit Jain
- Updated Italian translation by Giadej
- Updated Czech translation by Miloslav Kos and Marek Dvorný
- Updated Russian translation by dimquea and Dr\_Perry\_Coke
- Updated Romanian translation by Cristian
- Updated Turkish translation by Yücelen Gül
- Updated Spanish translation by Jose
- Updated Portuguese (Brazil) translation by KnightArch
- Updated Portuguese translation by rupefelo
- Updated German translation by Tobias Maschek, derSchreiber, Justus Kagerer and Ivo Grossen
- Updated Tamil translation by தமிழ்நேரம்
- Updated Polish translation by Julia 🌸🏳️‍⚧️
- Updated Chinese (Simplified Han script) translation by Samuel Wang
- Updated Estonian translation by Arvi Saluste

##### New Contributors

- [@htsachakis](https://github.com/htsachakis) made their first contribution in [#626](Donkie/Spoolman#626)
- [@sinclairpaul](https://github.com/sinclairpaul) made their first contribution in [#668](Donkie/Spoolman#668)
- [@opastorello](https://github.com/opastorello) made their first contribution in [#694](Donkie/Spoolman#694)
- [@ecarjat](https://github.com/ecarjat) made their first contribution in [#605](Donkie/Spoolman#605)
- [@JakobGue](https://github.com/JakobGue) made their first contribution in [#715](Donkie/Spoolman#715)
- [@ajford](https://github.com/ajford) made their first contribution in [#717](Donkie/Spoolman#717)
- [@Shadowsith](https://github.com/Shadowsith) made their first contribution in [#747](Donkie/Spoolman#747)
- [@sixiaolong1117](https://github.com/sixiaolong1117) made their first contribution in [#762](Donkie/Spoolman#762)
- [@mnebelung](https://github.com/mnebelung) made their first contribution in [#786](Donkie/Spoolman#786)
- [@beikeland](https://github.com/beikeland) made their first contribution in [#777](Donkie/Spoolman#777)
- [@kaufi95](https://github.com/kaufi95) made their first contribution in [#811](Donkie/Spoolman#811)

**Full Changelog**: <Donkie/Spoolman@v0.22.1...v0.23.0>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Edit spool - initial weight gets reset to filament default

2 participants