feat: add pin groups for organizing pinned items#1423
Open
zyuanyuz wants to merge 4 commits into
Open
Conversation
- Add PinGroup model with SwiftData persistence - Add PinGroupsManager for group CRUD and expand/collapse state - Add PinGroupPickerView for assigning items to groups when pinning - Add PinGroupHeaderView for collapsible group headers in popup - Update PinsView to render items grouped with expand/collapse - Add group management UI in PinsSettingsPane (create/rename/delete) - Add Sorter with group-based sort priority - Add localization for all group-related strings (41 languages) - Update README with pin groups documentation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Add expandPinGroupsByDefault setting (Defaults.Key<Bool>, default: true) - PinGroupsManager.load() and createGroup() respect the preference - Add toggle in PinsSettingsPane under Groups section - Add English and Simplified Chinese localization Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Add Defaults.observe in PinGroupsManager so that toggling "Expand groups by default" in Preferences immediately expands or collapses all groups instead of requiring an app restart. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
English, Simplified Chinese, and Traditional Chinese have proper translations; other 38 languages fall back to English text (to be translated via Weblate). Co-Authored-By: Claude Fable 5 <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.
✨ Pin Groups — Organize Pinned Items into Collapsible Folders
Summary
This PR adds pin groups to Maccy, allowing users to organize their pinned clipboard items into named, collapsible folders. A global preference controls whether groups start expanded or collapsed.
Motivation
Pinned items accumulate over time. Without grouping, the pinned section becomes a long flat list that is hard to navigate. Groups bring structure — users can categorize pins by project, type, or any scheme that fits their workflow.
Features
Group Management
Pinning Flow
⌥P), a group picker overlay appearsPopup Display
Global Preference
Data Model
PinGroupname,sortOrder,createdAt,items(relationship)HistoryItempinGroup(optional relationship),pin(unchanged)Code Changes
PinGroup.swift,HistoryItem.swift,Storage.xcdatamodelPinGroupsManager.swiftPinGroupHeaderView.swift,PinGroupPickerView.swift,PinsView.swift,ContentView.swiftPinsSettingsPane.swiftSorter.swiftDefaults.Keys+Names.swiftexpandPinGroupsByDefaultkeyPinsSettings.strings(41 languages),PinGroups.strings(41 languages)README.mdBackward Compatibility
pinGroup = niland display as "ungrouped"Screenshots
Group picker when pinning:

Collapsible group headers in popup:

Group management in Preferences: