feat(snapshot): put the Snapshot control on the real status moments - #6603
Draft
tomeredlich wants to merge 2 commits into
Draft
feat(snapshot): put the Snapshot control on the real status moments#6603tomeredlich wants to merge 2 commits into
tomeredlich wants to merge 2 commits into
Conversation
The control existed only on the /dev/status-moments review page. This wires it into the surfaces that page argues for, behind snapshot_share (default off, control hides it entirely). - NewStreakModal: labelled Primary under the freeze upsell. - AchievementCard: XSmall icon beside the points, unlocked cards only. - UserTopList: XSmall Float on the row, revealed on hover or focus. - posts/[id]/analytics: labelled Primary under the discovery stats, where the numbers have just made the case. Capture is not built — rasterizing a surface lands with #6426 — so the button takes an onClick seam and does nothing until that arrives. ListAwardsModal is left alone: it fails the strict-mode guard on its own pre-existing errors as soon as it is touched, and fixing those is unrelated to this change. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The Snapshot control had no payload — pressing it did nothing. This brings the share-image cards across from #6544, including the layout that lands there now: the surface label rides the logo row on the far right via the frame's logoAside slot, rather than sitting above the content as a headline. - StreakSnapshotCard on the streak milestone popup. - AchievementSnapshotCard on an unlocked achievement. - LeaderboardSnapshotCard on a leaderboard row. - SnapshotButton rasterizes the card off-screen on press, then hands the PNG to the native share sheet, the clipboard, or a download. Only the three cards these surfaces use are copied, with the frame, eyebrow, identity, level ring, stats and gradient they depend on. The other eleven cards on #6544 have no surface here. Adds @zumer/snapdom and lib/imageShare, also from #6544. The post analytics control goes: #6544 has no card for that surface, so there is nothing for it to capture yet. Co-Authored-By: Claude Opus 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.
Stacked on #6581 — base retargets to
mainonce that merges.#6581 draws the status moments on a review page and argues where the Snapshot control belongs. This puts it on the real surfaces.
Changes
Behind
snapshot_share, defaultfalse, so control hides it entirely.NewStreakModal— labelled Primary under the freeze upsell.AchievementCard— XSmall icon beside the points, on unlocked cards only. The flag is evaluated withshouldEvaluate={isUnlocked}, so locked cards never enroll a viewer.UserTopList— XSmall Float on the row, revealed on hover or keyboard focus.posts/[id]/analytics— labelled Primary under the discovery stats, where the numbers have just made the case. Not in the header, per the review.features/snapshot/:SnapshotButtonand theuseSnapshotSharegate.Not in this PR
Capture is not built. Rasterizing a surface to an image lands with #6426, which is still open, so
SnapshotButtontakes anonClickseam and does nothing when pressed. This PR is the placement and the flag; the payload plugs into that seam.ListAwardsModalis left alone. The review argues for a control in its header, but the file failstypecheck:strict:changedon pre-existing errors the moment it is touched (nevertypes around the awards query, a nullable header element). Fixing those is unrelated to this change — worth its own PR.One design caveat worth a decision: the leaderboard control is hover-gated, so it does not exist on touch. #6581 flags this in its own copy. A rank band above the board would work everywhere; that is a design call, not a code one.
Events
None yet — the control has no action to log until capture lands.
Experiment
snapshot_share, defaultfalse. Flip it in GrowthBook to preview.Testing
typecheck:strict:changedclean.🤖 Generated with Claude Code
Preview domain
Not published for review — run Storybook locally instead.