Repository navigation
Rename module to HappyWhatsNew; fix one-shot "What's new" button - #1
Merged
Merged
Conversation
…uttons Make the fork ours while staying easy to sync with upstream Notelet: - Package, product and module are now `HappyWhatsNew` (`import HappyWhatsNew`). Public types and modifiers keep their Notelet… names, and the UserDefaults key stays "Notelet.LatestSeenAppVersion", so users don't see notes again. - New `noteletSheet(notes:version: Binding<NoteletPresentedVersion?>)` for on-demand presentation. It presents whenever the binding is set (even for an already-seen `.current`) and resets it to nil on dismiss. With the value API a "What's new" button using `.current` only worked once: after dismissal the version was marked seen, and setting the same value again didn't trigger onChange. The value API is unchanged. - Presentation rules moved into `NoteletPresentation` (pure, tested). - First test target: presentation rules, note lookup, storage (incl. a guard on the storage key), Codable round-trip. - README: attribution, install/import, binding example, migration note; dropped upstream's logo and promo. CI runs tests on an iOS simulator. BREAKING CHANGE: `import Notelet` becomes `import HappyWhatsNew`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01REcE23dqGbT3sKxx2GYPgA
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.
This makes the fork ours while keeping upstream Notelet easy to merge in.
Changes
HappyWhatsNew(import HappyWhatsNew).Notelet…names, so upstream fixes still merge cleanly.Notelet.LatestSeenAppVersion, so users don't see already-seen notes again after an app switches over. A test guards this.presentedVersion = .currentonly worked once.onChangeeither.noteletSheet(notes:version: $binding): setting the binding presents the sheet (even for an already-seen version) and dismissing resets it tonil, so the button works every time.version: .currentauto-presentation) is unchanged.NoteletPresentationenum. First test target covers the presentation rules, note lookup, storage and Codable round-trip.Verified (Xcode 27, iOS simulator)
xcodebuild test -scheme HappyWhatsNew: 9 tests in 4 suites pass, no compiler warnings.Release
After merging, tag 2.0.0. The module rename is breaking for
import Notelet; the version also sits clearly above upstream's 1.x tags.🤖 Generated with Claude Code
https://claude.ai/code/session_01REcE23dqGbT3sKxx2GYPgA
Generated by Claude Code