Skip to content

Rename module to HappyWhatsNew; fix one-shot "What's new" button - #1

Merged
simonweniger merged 1 commit into
mainfrom
feat/happywhatsnew
Oct 11, 2026
Merged

simonweniger merged 1 commit into
mainfrom
feat/happywhatsnew

Conversation

@simonweniger

Copy link
Copy Markdown
Collaborator

This makes the fork ours while keeping upstream Notelet easy to merge in.

Changes

  • Module rename: the package, product and module are now HappyWhatsNew (import HappyWhatsNew).
    • Public types and modifiers keep their Notelet… names, so upstream fixes still merge cleanly.
    • The UserDefaults key stays Notelet.LatestSeenAppVersion, so users don't see already-seen notes again after an app switches over. A test guards this.
  • "What's new" button fix: with the value API, a button doing presentedVersion = .current only worked once.
    • After dismissal the version was marked seen, so it was skipped from then on.
    • Setting the same value again didn't trigger onChange either.
    • New overload noteletSheet(notes:version: $binding): setting the binding presents the sheet (even for an already-seen version) and dismissing resets it to nil, so the button works every time.
    • The value API (version: .current auto-presentation) is unchanged.
  • Tests: presentation rules moved into a pure NoteletPresentation enum. First test target covers the presentation rules, note lookup, storage and Codable round-trip.
  • README:
    • Added attribution to Notelet.
    • Updated the install and import instructions.
    • Added the binding example for buttons and a "Migrating from Notelet" section.
    • Removed upstream's logo and promo.
  • CI: runs the tests on an iOS simulator.

Verified (Xcode 27, iOS simulator)

  • xcodebuild test -scheme HappyWhatsNew: 9 tests in 4 suites pass, no compiler warnings.
  • The binding sheet's present/dismiss cycle isn't covered by an automated UI test (package tests have no window to present a sheet in). Worth a quick tap-through in CookThis's developer settings.

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

…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
@simonweniger
simonweniger merged commit 07263f0 into main Oct 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants