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
gpitel
force-pushed
the
feature/reference-winding-label
branch
2 times, most recently
from
July 7, 2026 03:37
efc9886 to
90c4c2a
Compare
…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>
gpitel
force-pushed
the
feature/reference-winding-label
branch
from
July 8, 2026 05:50
90c4c2a to
29d888f
Compare
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.Before / After
Design Requirements → Turns Ratios (2-winding transformer). Before, Winding 1 wasn't shown; after, it appears as a reference row — ratio locked at 1, label editable — using the same row layout as the ratio rows below. It omits the Min/Max tolerance fields, since a reference winding has no tolerance.
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
Merge order / dependencies
Hard dependency: OpenMagnetics/WebSharedComponents#15. This PR imports
renameWindingfromWebSharedComponents/assets/js/utils.js, which does not exist on currentmain- merging this without that PR (and aWebSharedComponentssubmodule bump onto it) breaks the app at load time (SyntaxError: ... does not provide an export named 'renameWinding').Also overlaps #23 (same files); suggest merging #23 first.