concept(fields): Pre-programmed Common Extra & Formula Fields Library#10
Draft
akira69 wants to merge 1 commit intobase/upstream-masterfrom
Draft
concept(fields): Pre-programmed Common Extra & Formula Fields Library#10akira69 wants to merge 1 commit intobase/upstream-masterfrom
akira69 wants to merge 1 commit intobase/upstream-masterfrom
Conversation
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.
Concept: Pre-programmed Common Extra & Formula Fields Library
This is a concept draft PR proposing a library of pre-built extra field definitions and formula field templates that users can install with one click instead of building manually.
Problem Statement
With PR Donkie#885's Formula Fields and the extra fields system, Spoolman can now express powerful derived values and custom data. But authoring these from scratch requires:
Most users want the same 10–20 fields: PA, flow rate, print temp, lot number, purchase price, drying schedule, etc. These are identical across installations.
This PR proposes: A curated library of ready-to-use definitions that users install rather than author.
Concept: "Common Fields" Library
What It Would Be
A settings area (or installable preset pack) offering pre-defined field definitions for:
Install Flow (Proposed UX)
Candidate Fields — Calibration (Filament entity)
Requested in Issue #415 (9 comments), Issue #11 (8 comments), PR #855 (SmoothBrainIT calibration wizard):
pressure_advanceflow_rate_multiplierprint_tempbed_tempretraction_distanceretraction_speedfan_speedmax_volumetric_speedFull Calibration Wizard Integration
PR #855 by SmoothBrainIT (community submission) implements a full guided calibration workflow: temperature tower, flow rate, Pressure Advance (Tower auto-compute:
PA = step × height; or Pattern/Line direct entry), VFA, Input Shaping, and more. It stores calibration data in newcalibration_sessionandcalibration_stepDB models.The Common Fields Library could act as a lightweight alternative for users who just want to store the results without the full wizard: install the calibration fields, enter values manually after running calibrations externally, done.
Candidate Fields — Physical Properties (Filament entity)
Requested in Issue #69 (10 comments), Issue #656 (4 comments):
densityglass_transition_tempdiameter_tolerancepigment_loadingCandidate Fields — Tracking & Inventory (Spool entity)
Requested in Issue #317 (6 comments), Issue #716 (5 comments):
purchase_pricepurchase_datelot_numberstorage_locationopen_dateprint_countCandidate Fields — NFC / RFID Integration (Spool entity)
Requested in Issue #799, Issue #776 (16 comments), Issue #723, PR #880 (goeland86 — NFC community submission):
PR #880 adds full NFC support (TigerTag + OpenPrintTag, Web NFC API, Klipper daemon). For users without a full NFC setup, simple extra fields provide the lightweight alternative.
nfc_uidtigertag_idopenprinttag_uuidrfid_uidCandidate Fields — Bambu / Printer Integration (Spool entity)
Requested in Issue #217 (38 comments — most-requested!), Issue #641 (8 comments):
bambu_ams_slotbambu_ams_unitbambu_filament_idprinter_nameklipper_var_nameSET_GCODE_VARIABLE.Candidate Formula Fields (derived, not stored)
These build on Formula Fields from PR #885. Requested in Issue #795, Issue #600, Issue #569:
remaining_pct(remaining_weight / initial_weight) * 100estimated_prints_remainingremaining_weight / avg_print_weight(requiresavg_print_weightextra field)days_since_openeddays_between(open_date, now())cost_per_grampurchase_price / initial_weightcost_at_remainingpurchase_price * (remaining_weight / initial_weight)color_hex_displaycolor_hexformatted as#RRGGBBuppercase — Issue #568days_to_dryopen_dateImplementation Sketch
Option A: JSON preset files (simplest)
A set of
.jsonfiles inclient/public/field-presets/defining field configs. Settings page loads them and shows an "Install" button per definition.Option B: Backend preset API
GET /api/v1/field/presetsreturns available definitions.POST /api/v1/field/from-presetinstalls one.Option C: Part of Applications Framework
Common field sets are bundled as applications in PR Donkie#878. Enabling
calibration_wizardauto-creates the calibration extra fields. This makes installation contextual — users enable the application, fields follow automatically.Option C is the most consistent with the Applications Framework direction.
Open Questions
pressure_advance? Offer to merge, skip, or rename?calibration_wizardapplication is enabled?Related Issues & PRs