fix: Fix template creation form alignment and growth#637
Merged
yazins-ai merged 4 commits intoMay 23, 2026
Conversation
The DisclosureGroup label only registered taps on the text and chevron. Added a full-width HStack with Spacer and used the padding/-padding trick to extend contentShape into the Form row's vertical insets, making the entire light-colored rectangle tappable. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The borderlessButton menu style renders its own indicator chevron, while the label already contained an explicit chevron.down icon, resulting in two chevrons appearing side by side. Added .menuIndicator(.hidden) to suppress the automatic one. Affects all three Ollama model pickers: Notes Generation, Knowledge Base Retrieval, and Classic Suggestions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…owth The creation form was inside a Form with .formStyle(.grouped), which applied column layout causing right-aligned text fields and auto-growing row heights that couldn't be overridden with SwiftUI modifiers. Changes: - Move creation VStack outside the Form into the ScrollView directly - Upgrade Name/Icon/Notes Prompt labels to size 13 semibold - Place "e.g. Sprint Planning" hint inline with the Name label - Add Spacer(minLength: 20) to slightly reduce the text field width - Replace TextEditor with FixedLeftTextEditor (NSViewRepresentable) for reliable left alignment and fixed height via sizeThatFits Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
9fe1478 to
cb69a7f
Compare
Collaborator
|
Thanks @jasnoorgill. Moving the template editor out of the grouped Form fixes the alignment and prompt growth issues cleanly, and the fixed-height text editor keeps the form stable. |
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
The new template creation form (Settings → Templates → New Template) had two layout bugs caused by being nested inside a
Form { .formStyle(.grouped) }:.multilineTextAlignment(.leading)and.environment(\.multilineTextAlignment, .leading)cannot override it from within.frame(height:)and.clipped()constraintsFix: Moved the creation
VStackout of theFormentirely, rendering it directly in theScrollView. This removes Form's layout engine from the picture entirely.Additional improvements while here:
size 13, semiboldfor clearer visual hierarchy"e.g. Sprint Planning"hint inline with the Name label instead of as a separate rowSpacer(minLength: 20)TextEditorwith a customFixedLeftTextEditor(NSViewRepresentable) that setsNSTextView.alignment = .leftdirectly and implementssizeThatFitsto pin height at 100pt regardless of contentHow to test