feat(design-requirements): always show Winding 1 with a locked ratio and editable label#24
Open
gpitel wants to merge 1 commit into
Open
Conversation
…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>
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.
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-inreferenceWindingprop 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 wheneverturnsRatios != null(not only whenlength > 0), and pass:referenceWinding="true"to that instance only.Winding N, and each ratio row is titled by the winding name.Verification
Verified live on the dev stack with Playwright:
1(a non-editable span), and editing the label persisted to the winding name.🤖 Generated with Claude Code