Repository navigation
feat(notes): a slimmer roll-up bar that snaps to the bottom, and a one-row header - #19
Merged
Merged
Conversation
…e-row header Rolling a note up (issue #18) now leaves a 34pt bar instead of a tall title strip, and the note's header is a single row that the bar reuses. - The bar is the note's top row: its title, the open-task count, and on hover expand / pin / close. Rolling is a window shade: nothing moves, and the list leaves only once the window is shut. While rolled up the window is frameless and draws its own capsule, with no shadow (macOS rounds a titled window at 16pt, and a frameless window's shadow rims the capsule like a border). - A note whose bottom is within 48pt of the screen's bottom rolls from there, and a bar let go near the bottom glides down flush. Either way it expands upward and never runs off the screen. - The roll animates with animator() rather than the blocking setFrame(_:display:animate:), so the content keeps pace. The content has no minimum height (the hosting view jumped an expand to ~150pt); windowWillResize keeps an open note at least 160pt and a bar's height fixed. - Header: the title shares the top row with roll up, pin and close. Colors, glass, the completed-task options, New List, Clean Up and Rename live under ⋯. The title is part of the drag handle, so a double-click rolls the note up instead of letting macOS zoom it. Rename swaps in an outlined field: Return or clicking away saves, Esc restores. A new list starts with its name being typed. - Notes drag themselves (NotePanel.performDrag) instead of using the system window drag, which returns at once, settles windows let go at a screen edge, and swallowed a double-click's second click. The drag starts only once the pointer moves. - The hover reveal uses an AppKit tracking area (HoverArea), since SwiftUI's onHover often didn't show the header controls until the note had been clicked into. Every control darkens under the pointer.
|
|
Focus lands a few run-loop turns after a rename request; CI's slower runner hadn't got there yet.
Setting the focus during onAppear can be ignored (CI's macOS 15 runner never focused it); a .task runs once the field is on screen.
…f spinning the run loop The test's synchronous run-loop pump held the main actor, so the rename's main-actor tasks never ran on CI. The title field is AppKit, taking first responder itself, so it doesn't depend on SwiftUI focus behaviour per macOS version.
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.
Closes #18.
What changes
Roll-up bar (#18)
Header
onHover. Every control darkens under the pointer.Window handling
animator(), not the blockingsetFrame(_:display:animate:). The content has no minimum height, so the hosting view doesn't jump the window;windowWillResizekeeps open notes at least 160pt and locks a bar's height.NotePanel.performDrag). The system window drag returns at once, settles windows dropped at a screen edge, and swallowed a double-click's second click. A drag starts only once the pointer moves.Testing
swift test: 164 tests pass. New tests cover:swiftlint: no new warnings.