feat(vendors/logos): add GitHub logo-pack sync workflow (no bundled assets)#872
Open
akira69 wants to merge 24 commits intoDonkie:masterfrom
Open
feat(vendors/logos): add GitHub logo-pack sync workflow (no bundled assets)#872akira69 wants to merge 24 commits intoDonkie:masterfrom
akira69 wants to merge 24 commits intoDonkie:masterfrom
Conversation
2bdc861 to
7e5a737
Compare
12 tasks
9 tasks
9d16378 to
a336f20
Compare
0f1ba3e to
239cb83
Compare
- 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
e1ccf31 to
ca3f47a
Compare
- 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.
…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.
- Add GitHub sync settings to download and manage vendor logos from upstream - Bundle curated vendor logos (print and color profiles) for offline use - Support ZIP logo pack import and selective sync - Preserve custom vendor logo uploads across sync operations - Add i18n strings for GitHub sync UI This commit adds GitHub sync capabilities on top of the manufacturer logo and export workflows. GitHub-sourced logos are kept separate from custom uploads.
ee02871 to
6dbb827
Compare
- 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
e910b37 to
992a00e
Compare
…ort button in PR872 - Rename extraFormatSettings->extraExportSettings in QRCodeExportDialog (matches callers) - Declare and forward extraTitleSettings/extraInfoSettings in both QRCode dialogs - Add initialSelectedIds, onExport props and Export button to FilamentSelectModal
…s helper - manufacturerLogosSettings: merge two identical url imports into one line - filament.py: restore _build_search_filters as standalone helper (was inlined in PR872; canonical form existed in PR857 base). Also drop now-unused noqa: C901, PLR0912 from find() since complexity moved to the extracted helper.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the operator workflow on top of #857:
Stack Context
Restack Repairs In This Branch
Refresh Pack + Sync This ManufacturerUpload Web LogoUpload Print LogoMessageerrors on expected failuresValidation
Executed locally on PR872:
ppr 872env VITE_APIURL=/api/v1 npm run builduv run ruff check spoolman/api/v1/vendor.py spoolman/vendor_logos.pyhttp://127.0.0.1:9872curlpr872/.venv/bin/pythonExercised flows:
/settings/logos/vendor/show/1/vendor/edit/1/vendor/edit/2/vendor/edit/3/spool/show/1desktop + mobile/filament/show/1/spool/print?spools=1/filament/print?filaments=1/spool/export?spools=1/filament/export?filaments=1Exercised artifacts/repros:
Test Checklist
Sync Logo Pack from Repositoryrefreshes/checks the GitHub logo packSync Allapplies reviewed assignmentsSync Checkedapplies reviewed assignmentsRefresh Pack + Sync This Manufacturerpopulates blank fields on the edit page/vendor-logos/manifest.jsonNotes
onChangepath as clicking the native file-picker button./vendor/edit/sw.js) is still visible locally, but it predates this change and is unrelated to this workflow.