Turn history retention into a discrete slider with named presets - #89
Open
alvst wants to merge 1 commit into
Open
Turn history retention into a discrete slider with named presets#89alvst wants to merge 1 commit into
alvst wants to merge 1 commit into
Conversation
Replaces the "remove clips older than" day-choice Picker with a 10-stop slider (1 Day through Forever) matching Alvie's Pesty's granularity, via a new HistoryRetentionPreset enum. Adds three new stops baseline didn't have (3 Weeks, 2 Months, Forever) - Forever is represented as historyRetentionDays == 0, meaning "no automatic pruning by age", with only the existing safety cap still applying. Keeps the confirm-before-apply destructive-change dialog baseline already had; only the presentation of the choice changes, not the safety UX around it. The slider itself needed a fix unrelated to its content: on macOS, Form(.formStyle(.grouped)) lays out every row in a Section's body on a shared label/control NSGridView, which clamps and right-shifts any bare control placed there regardless of SwiftUI-side frame modifiers. Moving the slider block into the Section's footer (plain full-width content, never part of that grid) fixes it - see the comment at the call site for how this was confirmed.
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.
The "remove clips older than" day picker offered a handful of choices and no way to say "keep everything". This replaces it with a 10-stop slider of named presets, adding 3 Weeks, 2 Months, and Forever.
What changed
HistoryRetentionPresetdrives a 10-stop slider from 1 Day through Forever, replacing the day-choice Picker.historyRetentionDays == 0— no automatic pruning by age; the existing safety cap still applies.Form(.formStyle(.grouped))puts every row in a Section's body onto a shared label/controlNSGridView, which clamps and right-shifts a bare control regardless of SwiftUI frame modifiers. The slider block moved into the Section's footer, which is plain full-width content.Screenshots
Before:

After:

Notes for review
This feature should be bundled into v2.
Part of #80.