Skip to content

feat(design-requirements): always show Winding 1 with a locked ratio and editable label#24

Open
gpitel wants to merge 1 commit into
OpenMagnetics:mainfrom
gpitel:feature/reference-winding-label
Open

feat(design-requirements): always show Winding 1 with a locked ratio and editable label#24
gpitel wants to merge 1 commit into
OpenMagnetics:mainfrom
gpitel:feature/reference-winding-label

Conversation

@gpitel

@gpitel gpitel commented Jun 28, 2026

Copy link
Copy Markdown

What

Single-winding (inductor) designs previously showed no winding row in Design Requirements → Turns Ratios — the section was hidden whenever there were zero ratios, so Winding 1's label could not be seen or edited.

This adds Winding 1 as a reference row: its turns ratio is fixed at 1 and is not editable, but its label is editable (persists to coil.functionalDescription[0].name). The section now renders even for a single winding. Transformers are unchanged — Winding 1 simply appears above the editable ratio rows for windings 2..N.

Implementation

  • ArrayDimensionWithTolerance.vue — opt-in referenceWinding prop renders the leading locked-ratio + editable-label row. The shared component is otherwise untouched, so the leakage-inductance / stray-capacitance usages are unaffected.
  • DesignRequirements.vue — show the turns-ratio block whenever turnsRatios != null (not only when length > 0), and pass :referenceWinding="true" to that instance only.
  • Also folds in the related winding-label work: new windings default to Winding N, and each ratio row is titled by the winding name.

Verification

Verified live on the dev stack with Playwright:

  • Inductor (1 winding): the Winding 1 row appears, the ratio is a locked 1 (a non-editable span), and editing the label persisted to the winding name.
  • Transformer (2 windings): the Winding 1 reference row plus exactly one editable ratio row (Winding 2).

🤖 Generated with Claude Code

…and editable label

Single-winding (inductor) designs showed no winding row in the Turns Ratios
section, so Winding 1 could not be seen or renamed. Render Winding 1 as a
reference row -- ratio fixed at 1 (not editable) with an editable label -- and
show the section even when there are no ratios. Also default new windings to
'Winding N' and use the winding name as each row's title.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

1 participant