Skip to content

feat(manufacturers): **Logos for vendors** logo-aware UI and label workflows (core, no bundled assets)#857

Open
akira69 wants to merge 20 commits intoDonkie:masterfrom
akira69:feat/manufacturer-logo-upstream-split
Open

feat(manufacturers): **Logos for vendors** logo-aware UI and label workflows (core, no bundled assets)#857
akira69 wants to merge 20 commits intoDonkie:masterfrom
akira69:feat/manufacturer-logo-upstream-split

Conversation

@akira69
Copy link
Copy Markdown

@akira69 akira69 commented Feb 22, 2026

Summary

This PR adds logo-aware manufacturer workflow and logo-aware label behavior

Totally awesome looking logo-filled labels can now be printed/exported

image

Scope Boundary

Included here:

  • manufacturer logo fields/previews and local runtime logo usage
  • logo-aware spool/filament show pages
  • logo-aware spool/filament print flows
  • logo-aware spool/filament export flows
  • legacy-state hardening needed so the stacked logo flows still load on older saved settings/state

Not included here:

Stack Notes

  • Verified against open PR #857 on branch feat/manufacturer-logo-upstream-split targeting master
  • Verified lower PR heads referenced for the stack:
    • #846 head 4dd7808
    • #860 head 4caa688
  • Those lower heads are not literal ancestors of the current #857 branch anymore, so the remaining shared fixes were carried forward directly here
  • The intended stacking order to get the full feature set of labels and logos is :
  1. feat(printing): filament label printing foundation #846
  2. feat(manufacturers): **Logos for vendors** logo-aware UI and label workflows (core, no bundled assets) #857
  3. feat(export): add separate AML/PNG label export flows and improvements #860
  4. feat(vendors/logos): add GitHub logo-pack sync workflow (no bundled assets) #872

Screenshots and Visual Impact

Logos can be uploaded/defined on the manufacturer edit page and Black and White Print Logos can be auto-generated from Color source, or separately uploaded

image

Improved layout of spool page to incorporate the logos with hyperlink to the filament

image

Incorporation of separate logo section with individual controls using logo defined in manufacturing page (link or B&W converted print logo)

image

Separated label layout controls for QR code and information, with again individual controls

image

###Filtering enabled in Manufacturer section for those with or without logos
image

Validation Executed

Built and tested

  • cd client && VITE_APIURL=/api/v1 npm run build
  • Playwright validation on local PR857 app at http://127.0.0.1:9857

Playwright routes exercised in this pass:

  • /settings
  • /vendor/edit/1
  • /vendor/show/1
  • /spool/show/1 at desktop width
  • /spool/show/1 at mobile width
  • /filament/show/1
  • /spool/print?spools=1
  • /filament/print?filaments=1
  • /spool/export?spools=1
  • /filament/export?filaments=1
  • /vendor

Export download actions exercised in this pass:

  • spool export: AML download
  • spool export: PNG download
  • filament export: AML download

Test Checklist

  • Settings page loads with a legacy plain-string base_url value and shows the saved URL instead of crashing
  • Manufacturer edit page shows Logo URL and Print Logo URL fields and previews
  • Manufacturer show page renders both logo previews
  • Print-logo suggestions appear from the runtime manifest when available
  • Spool show page displays a responsive manufacturer/logo section (desktop + mobile)
  • Filament show page displays the manufacturer/logo section
  • Spool print dialog includes logo controls and the preview updates when Show Manufacturer Logo is toggled off
  • Filament print dialog includes logo controls and renders the manufacturer logo in preview
  • Manufacturer list Has Logo / No Logo filter path works in the UI and API against the current dataset
  • Spool export dialog includes logo/title controls, loads with the legacy base_url state fix, and downloads AML/PNG output
  • Filament export dialog includes logo/title controls, loads with the legacy base_url state fix, and downloads AML output
  • OS print dialog / real paper-output pass rerun

Testing exposed issues and resulting fixes incorporated:

  • harden label printing/export against legacy plain-string base_url settings and bad saved local state
  • restore the spool show-page manufacturer/logo section with responsive desktop/mobile layout
  • wire the shared QR print and export dialogs to render manufacturer logo, title, and info blocks for both spool and filament flows

Notes

  • The local Playwright seed data for this pass used one manufacturer with both web and print logos plus one linked filament/spool record so the print/show/export routes exercised real logo rendering.
  • The local settings database was seeded with a plain-string base_url to confirm the carried-forward compatibility fix on settings, print, and export routes.
  • Downloaded export artifacts were inspected after Playwright capture: spool AML (~47 KB), spool PNG (471x353, ~33 KB), and filament AML (~45 KB).

@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch from 81b4f74 to e61f2ad Compare February 22, 2026 15:45
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch from e61f2ad to 0419ce3 Compare February 22, 2026 16:01
@akira69 akira69 changed the title feat(vendors/labels): manufacturer logo workflows and logo-pack tooling feat(vendors): logo pack sync + logo-aware label workflows Feb 22, 2026
@akira69 akira69 marked this pull request as ready for review February 23, 2026 16:43
@akira69 akira69 marked this pull request as draft February 24, 2026 04:48
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch 2 times, most recently from eaf2375 to 8d294ac Compare February 24, 2026 06:56
@Donkie
Copy link
Copy Markdown
Owner

Donkie commented Feb 24, 2026

Are you vibe coding all these changes? Do you test them thoroughly?

I don't want to host any companies IP. We cannot have vendor logos in this repository.

@akira69
Copy link
Copy Markdown
Author

akira69 commented Feb 24, 2026

Are you vibe coding all these changes? Do you test them thoroughly?

I don't want to host any companies IP. We cannot have vendor logos in this repository.

First thing I'm doing here is breaking down the few of PRs I had made to individual and separated changes/features, to not overload review or testing- hence you'll see all the new PRs (draft) all of which need to be retested separately - this logo one included with non direct logo relevant changes moved to other PRs. I had to rely heavily on vibe coding to implement the featues quickly, so testing and review by humans will be essential - and hopefully much easier with the separated PRs. Prior to the PR simplification, I made tons of zip files and AML files, etc - all with various logos and styles. However I certainly didn't check all the corner cases of label sizing, etc - that's a to-do.

I agree with your point on the Logo files in the repository - In this implementation, vendor logos can be synced to the user's installation from https://github.com/MarksMakerSpace/filament-profiles upon click, by the user - not in this repository or hosted in this repository - at least that was my intention.
Nothing should be directly in this repository in this manner. Upon implementing this feature one could skip the sync and have no logos... or their own logos... or choose to sync with the github database mentioned, for those manufacturers created in the local database.

@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch from 8d294ac to 58761ad Compare February 25, 2026 23:23
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch from 58761ad to 4f03ada Compare February 26, 2026 13:15
@akira69 akira69 changed the title feat(vendors): logo pack sync + logo-aware label workflows feat(vendors): logo-aware label workflows (core, no bundled assets) Feb 26, 2026
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch 2 times, most recently from f091b0e to f4f6564 Compare February 26, 2026 16:31
Copy link
Copy Markdown
Author

@akira69 akira69 left a comment

Choose a reason for hiding this comment

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

I don't want to host any companies IP. We cannot have vendor logos in this repository.

@Donkie,
Images are now completely out - I realized it was grabbing all the files into this repository too, unintended. That's explicitly removed. And then some to reduce complexity of each change PR. As I noted earlier, I've split apart the large PRs into bite-size chunks and individual improvements.
And went even further with this now Logo specific PR: Splitting into two separate PR with different logo focus:
this PR #857 to build up all the infrastructure for logos. allowing HTML links to image files. and local files. Along with the improvements to print/export of label-aware labels with adjustable details.
then separately PR #872 for the sync with GitHub repository for logos.

I'm still testing many of the PRs and improving the comments/details, including this one. will get them squared away soon.

@akira69 akira69 changed the title feat(vendors): logo-aware label workflows (core, no bundled assets) feat(manufacturers): **Logos for vendors** logo-aware UI and label workflows (core, no bundled assets) Mar 2, 2026
@akira69 akira69 marked this pull request as ready for review March 2, 2026 05:07
@akira69 akira69 closed this Mar 2, 2026
@akira69 akira69 reopened this Mar 2, 2026
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch from af29177 to 51204c5 Compare March 10, 2026 06:18
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch 2 times, most recently from b555eaa to 9eddfa1 Compare March 13, 2026 22:11
@akira69 akira69 marked this pull request as draft March 14, 2026 07:00
- Extract _build_search_filters() helper to reduce McCabe complexity
- Reduces find() complexity from 13 → ~8 (under 10 limit)
- Reduces branch count from 13 → acceptable levels
- Resolves Ruff linting errors C901 + PLR0912
- Pure refactoring: behavior unchanged
- Also fixes Prettier formatting on filamentSelectModal and qrCodePrintingDialog
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch 2 times, most recently from 0c959fa to 8a294cd Compare March 16, 2026 20:48
akira69 added 10 commits March 16, 2026 21:33
- Wrap selectUnselectFiltered, handleSelectItem callbacks in useCallback
- Wrap handlePageChange, handlePageSizeChange, applySearchFilter in useCallback
- Reduces unnecessary re-renders of child components (pagination, checkboxes, buttons)
- Stable function references now persist across renders
…ack PR773)

- Fetch extra field definitions once at endpoint entry instead of per-request
- Eliminates redundant database calls for extra field validation
- Applies feedback from PR 773: 'get_extra_fields only needs to be run max at once per call'
- Affected endpoints: create/update for filament, spool, and vendor resources
- Reduces API layer complexity and improves performance
(cherry picked from commit dc11b7bdae1777a70a68bedfe503f988e96acd13)
…ase URL handling

Harden QR export base URL parsing to prevent template injection attacks

Per https://github.com/Donkie/Spoolman/wiki/Contribute#style
- ESLint (frontend) ✓ Fixed: control character regex
- Prettier (frontend) ✓ Fixed: 7 files formatting
- Ruff (backend) ✓
- Pre-commit hooks validated ✓
- Wrap selectUnselectFiltered, handleSelectItem callbacks in useCallback
- Reduces unnecessary re-renders of table and checkboxes
- Consistent with filament selector optimization pattern
- Stable function references improve React.memo effectiveness
…export

- Add manufacturer logo management (upload, delete, organization)
- Integrate logos into label print dialogs (positioning, sizing)
- Add vendor logo components and utilities
- Support logo source toggle (color/print profile)
- Add i18n strings for logo UI elements
- Extend vendor database with logo support

This commit layers vendor logo features on top of the export workflow.
All export functionality is preserved; logos are optional additions to print/export dialogs.
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch from e5873c9 to f20897d Compare March 17, 2026 02:56
- Use single debounced ?search= call, consistent with spool modal and PR846
- Remove 4-field parallel fetch loop, getAPIURL import, allSearchResults state
- Fix Ruff violations in vendor.py and vendor_logos.py
@akira69 akira69 force-pushed the feat/manufacturer-logo-upstream-split branch from 6f61439 to d127692 Compare March 17, 2026 13:17
akira69 added 2 commits March 18, 2026 11:47
- Add useSpoolmanVendorExternalIds and useVendorLogoManifest to otherModels
- Declare and forward extraTitleSettings/extraInfoSettings in QRCodePrintingDialog
- Add initialSelectedIds, onExport props and Export button to FilamentSelectModal
- qrCodePrintingDialog: 5 spread fixes (identical to PR846)
- filamentQrCodePrintingDialog: 4 spread fixes (3 original + titleTemplate)
- spoolQrCodePrintingDialog: 4 spread fixes (same as filament)
- qrCodeExportDialog: 5 spread fixes (identical to PR860)
- spoolSelectModal: selectedSet useMemo + .has() for O(1) checks
- exportDialog: move PNG helpers to module scope (same as PR860)
@akira69 akira69 marked this pull request as ready for review March 19, 2026 14:43
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.

2 participants