Skip to content

refactor(AFC): Updating tooltips in AFC Print Dialog to show more information - #2598

Draft
jimmyjon711 wants to merge 4 commits into
mainsail-crew:developfrom
jimmyjon711:afc_print_dialog_update
Draft

jimmyjon711 wants to merge 4 commits into
mainsail-crew:developfrom
jimmyjon711:afc_print_dialog_update

Conversation

@jimmyjon711

Copy link
Copy Markdown
Contributor

Description

Updating AFC Print Dialog to match fluidd update that shows users more information and adds checkmark so its clear to the end user what lane is currently assigned to the T(n) tool.

Changes:

  • Updated tooltips to show the same information as AfcPanelUnitLaneBody when hoving mouse over lane/spool
  • Added checkmark to lane thats currently selected when selecting the lane selection dropdown.
  • Added tooltip to show more information in the lane selection dropdown
  • Updated material checking so that PLA matches PLA+ and does not give warning.
  • Refactored code to use getAfcLaneInfo for both StartPrintDialogAfcTool.vue and AfcPanelUnitLaneBody.vue so that code was not duplicated since they both need the same information.

Note: Updates were done with help from claude and reviewed by me, please let me know if something was done wrong 😬

Related Tickets & Documents

None

Mobile & Desktop Screenshots/Recordings

Print Dialog Updates:

mainsail_print_dialog_update.mp4

Updates to AFC panel still look the same:

mainsail_afc_panel.mp4

[optional] Are there any post-deployment tasks we need to perform?

None

…ormation

- Updated tooltips to show the same information as AfcPanelUnitLaneBody
when hoving mouse over lane/spool
- Added checkmark to lane thats currently selected when selecting the lane
selection dropdown.
- Added tooltip to show more information in the lane selection dropdown
- Updated material checking so that PLA matches PLA+ and does not give
warning.
- Refactored code to use `getAfcLaneInfo` for both `StartPrintDialogAfcTool.vue` and `AfcPanelUnitLaneBody.vue` so that code was not duplicated since they both need the same information.

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 51cd19f8-6a87-4965-9281-04e4b388c00c

📥 Commits

Reviewing files that changed from the base of the PR and between 1dd308f and 8cad581.

⛔ Files ignored due to path filters (5)
  • src/components/dialogs/StartPrintDialogAfcTool.vue is excluded by none and included by none
  • src/components/mixins/afc.ts is excluded by none and included by none
  • src/components/panels/Afc/AfcPanelUnitLaneBody.vue is excluded by none and included by none
  • src/components/panels/Gcodefiles/GcodefilesPanelTableRowFileMetadataFilamentsBadge.vue is excluded by none and included by none
  • src/store/files/types.ts is excluded by none and included by none
📒 Files selected for processing (1)
  • src/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/locales/en.json

📝 Walkthrough

Walkthrough

The English AFC start-print localization block retains FilamentWeightNotEnough and adds NoLane, NoLaneMapped, and Unknown message entries.

Changes

AFC Start-Print Localization

Layer / File(s) Summary
Add AFC start-print messages
src/locales/en.json
The AFC localization block adds messages for missing lanes, unmapped lanes, and unknown states while retaining the existing filament-weight message.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise and matches the AFC print dialog tooltip-related changes.
Description check ✅ Passed The description is clearly related to the AFC print dialog and tooltip updates in the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
@meteyou

meteyou commented Jul 23, 2026

Copy link
Copy Markdown
Member

thx for your PR. why didnt you use the gcodefiles-panel-table-row-file-metadata-filaments-badge component?

@jimmyjon711

Copy link
Copy Markdown
Contributor Author

thx for your PR. why didnt you use the gcodefiles-panel-table-row-file-metadata-filaments-badge component?

@meteyou I guess it was more of I wasnt sure if you would be ok with me editing that since it seemed like a general component that could be used outside of AFC code, but if you would rather me edit it there(which makes sense to keep down on the redundant code) I can do that.

@meteyou

meteyou commented Jul 23, 2026

Copy link
Copy Markdown
Member

@jimmyjon711 sry, in the video it looks identical to me (the pill with the filament type below). did i miss something?

@jimmyjon711

jimmyjon711 commented Jul 23, 2026

Copy link
Copy Markdown
Contributor Author

@meteyou so the file filament pill on the left didn't change, it's the lane tooltip on the right that changed to add more information about the filament for the lane that's loaded in the first video

- Updating code to utilize gcodefiles-panel-table-row-file-metadata-filaments-badge
panel so that code is not duplicated.
- Fixed small bug with spool percentage when not using spoolman since AFC
currently does not return `initial_weight` for some reason.

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
@jimmyjon711

jimmyjon711 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor Author

@meteyou Went back though and put gcodefiles-panel-table-row-file-metadata-filaments-badge and just extended it to show more of the information. It still works the same to show just the filament name per tool and also shows more data for the lane information.

Also found a bug and fixed where spool percentage was not calculated correctly when not using spoolman as AFC does not expose initial_weight per lane, not sure if we ever exposed that variable but its something I will be adding to the AFC side.

Edit: not a bug, I just have not added these variables in yet... AFCProject/AFC-Klipper-Add-On#727

- Disabling tooltip when spoolId is set to 0
- Returning empty string instead of `Unknown` when filament name is not
set from AFC

Signed-off-by: Jim Madill <jcmadill1@gmail.com>
@kekiefer

Copy link
Copy Markdown

Just wanted to bump this PR in confirmation of the fix to print dialog, which with AFC on development was broken prior to the change:

image

@meteyou

meteyou commented Aug 27, 2026

Copy link
Copy Markdown
Member

I just merged & released the small bugfix. So you are save to release the new AFC update. The rest will come after my holidays... sry for the delay.

@jimmyjon711
jimmyjon711 marked this pull request as draft September 8, 2026 23:49
@jimmyjon711

Copy link
Copy Markdown
Contributor Author

Gonna break this PR into atleast two separate PRs

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