Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Spoolman Widget #3959

Merged
merged 5 commits into from
Nov 21, 2024
Merged

Feature: Spoolman Widget #3959

merged 5 commits into from
Nov 21, 2024

Conversation

fgeck
Copy link
Contributor

@fgeck fgeck commented Sep 8, 2024

Proposed change

Adds a Spoolman widget. Each spool will be rendered into a dedicated <Block> showing the filament name and remaining filament in %.

Widget:

image

Spoolman:

image

Closes #3958

Type of change

  • New service widget

Checklist:

@shamoon

This comment was marked as resolved.

@shamoon shamoon closed this Sep 8, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 9, 2024
@shamoon shamoon reopened this Nov 20, 2024
@gethomepage gethomepage unlocked this conversation Nov 20, 2024
@shamoon shamoon changed the title Add Spoolman Widget Feature: Spoolman Widget Nov 20, 2024
Copy link
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great. A couple things, and this needs a re-base.

Screenshot 2024-11-20 at 6 58 32 AM

Comment on lines 7 to 9

Keep track of your inventory of 3D-printer filament spools.
Spoolman is a self-hosted web service designed to help you efficiently manage your 3D printer filament spools and monitor their usage. It acts as a centralized database that seamlessly integrates with popular 3D printing software like OctoPrint and Klipper/Moonraker. When connected, it automatically updates spool weights as printing progresses, giving you real-time insights into filament usage.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Keep track of your inventory of 3D-printer filament spools.
Spoolman is a self-hosted web service designed to help you efficiently manage your 3D printer filament spools and monitor their usage. It acts as a centralized database that seamlessly integrates with popular 3D printing software like OctoPrint and Klipper/Moonraker. When connected, it automatically updates spool weights as printing progresses, giving you real-time insights into filament usage.

src/widgets/spoolman/component.jsx Show resolved Hide resolved
@gethomepage gethomepage deleted a comment from github-actions bot Nov 20, 2024
@fgeck
Copy link
Contributor Author

fgeck commented Nov 21, 2024

started incorporating your feedback yesterday.
Need to test and will push again in the upcoming days.

@fgeck
Copy link
Contributor Author

fgeck commented Nov 21, 2024

Finally again ready for review @shamoon

I added an option to filter spools by their id.

Spoolman:

Screenshot 2024-11-21 at 21 15 46

Config:

widget:
          type: spoolman
          url: https://spoolsman.io
          spoolIds:
            - 2
            - 5       # does not exist, but is allowed

Result in homepage:

Screenshot 2024-11-21 at 21 21 18

Ps.:
I hope this will be a squash merge as the commit history of my branch is quite messy.

@shamoon
Copy link
Collaborator

shamoon commented Nov 21, 2024

Please have a read about git rebasing or merge commits. We squash commits anyway but this is a very messy history that makes life a bit more complicated for maintainers.

@shamoon shamoon enabled auto-merge (squash) November 21, 2024 23:02
@shamoon shamoon changed the base branch from main to dev November 21, 2024 23:02
Copy link
Collaborator

@shamoon shamoon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please see my code changes:

  1. Theres no need for a helper function that is very short, used once and is pretty clear in what it does.
  2. See updated syntax for them to be simpler.
  3. Better handle the loading blocks

Thanks for your contribution

@shamoon shamoon merged commit 94bbcbe into gethomepage:dev Nov 21, 2024
5 checks passed
@fgeck fgeck deleted the spoolman branch November 22, 2024 07:54
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.

3 participants