feat(shared): onboarding personas quick-start with tag pop animation#5939
Open
davidercruz wants to merge 9 commits intomainfrom
Open
feat(shared): onboarding personas quick-start with tag pop animation#5939davidercruz wants to merge 9 commits intomainfrom
davidercruz wants to merge 9 commits intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds an A/B-gated "persona" picker (Frontend, Backend, AI/ML, etc.) inside the onboarding tag step. Selecting a persona batch-follows ~10 curated tags and triggers a staggered pop animation on the corresponding tag chips so the selection feels intentional. Gated behind the new featureOnboardingPersonas GrowthBook flag. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Multi-select up to 3 personas (4th click no-ops, button looks disabled while at the cap). - Picking a persona now triggers the recommendedTags query for its tag list, with a soft-pruning rule: previous recommendation batch is evicted from the cache when a new one arrives, while curated and selected tags persist. - Extract useRecommendedTags hook so manual tag clicks and persona clicks share the same mutation, slicing, splice-at-anchor, and prune logic. Default to 2 recommended tags client-side. - Adds a spark-burst flourish (5 procedural sparks per chip) to the existing pop animation, lifted from the leaderboard crown-spark pattern. - Expose a recommend-request bus so PersonaSelector stays self-contained without prop-drilling through TagSelection. - Subtitle copy on the persona row to introduce the quick-start. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Recommendation calls now fan out per persona-tag (one parallel query per seed). Results are deduped and capped at 8 visible. - Curated baseline tags fade out once the user has selected REQUIRED_TAGS_THRESHOLD (5) or more tags. The transition is one-way: once gone, deselecting back below the threshold does not bring them back. - Recommendations that get superseded by a fresh batch now play the same fade-out animation before being removed from the grid, rather than disappearing instantly. - Adds the tag-fade-out keyframe and routes onAnimationEnd in TagElement to disambiguate pop, spark, and fade-out events via event.animationName. - TagSelection owns the exit lifecycle (exitingTags + removedTags) and useRecommendedTags now exposes onEvicting so the parent can drive the animation. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Picking a persona batch-follows ~10 tags in a single click, which previously tripped the curated-baseline fade-out instantly because the threshold was reading feedSettings.includeTags.size. Track a separate manualSelectCount that increments only inside handleClickTag (manual follow events). Personas don't count toward the threshold — the curated 25 stay visible until the user has expressed individual taste by clicking REQUIRED_TAGS_THRESHOLD (5) single tags. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ttle refresh Two bugs in the manual tag-click flow: 1. Clicking a recommended tag was wiping it from the screen along with its siblings. The eviction pass evicted any name that wasn't in the new batch, including the just-selected one. Now the hook accepts a selectedRef and excludes selected names from eviction. 2. Every manual click clobbered the entire recommendation batch, making them feel disposable. Throttle to fire at most once per 10 clicks (the very first click still fires so the user gets recommendations immediately). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Previously every manual tag click cleared the existing recommendation batch and replaced it with a fresh one, so recommendations felt like they were vanishing on every click. Adding was effectively gated by the same cadence as removal. Now adding is immediate and removing is throttled: - Every manual tag click fetches fresh recommendations and appends them to the screen. The recommendation ref accumulates names across clicks; new fetches dedupe against it so we don't add the same name twice. - The eviction sweep — fading out previously-shown recommendations the user didn't pick — only runs every 10th manual click. - Persona-driven recommendation requests (via the bus) are always additive; they never trigger eviction. - A new onFreshRecommendations callback drives the pop animation so only freshly-arrived tags pop, not the accumulated set. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- When the persona feature is on, the headline now reads "Tune your feed" instead of "Pick tags that are relevant to you" — the page shows both personas and tags, so framing it as feed tuning is clearer than naming the mechanic. - Subtitle becomes "Pick a role to start fast, then add tags you like." — the original "Quick start: pick up to 3 roles" phrasing was OK but didn't connect personas to tags. - The funnel-supplied headline prop still takes precedence; only the default fallback changed. - On mobile, the first persona click smooth-scrolls the viewport to the top of the tag area so the user sees their selection take effect instead of scrolling manually. Subsequent persona clicks don't re-scroll. Desktop layout fits both regions on screen, no scroll triggered. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The headline prop is supplied by Freyja funnel JSON and by the OnboardingV2 modal, so EditTag's default fallback never fired in practice. Override the caller-supplied headline with "Tune your feed" whenever the persona feature flag is on; otherwise keep the existing caller-supplied copy. A TODO comment marks this for removal once Freyja's persona-experiment variant ships the new headline directly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Two changes to widen the recommendation surface, especially for personas with heavily overlapping tag clusters like AI/ML: - Bump the default visible cap from 8 to 12. - Replace "first response wins" iteration with a round-robin walk: take the top recommendation from each seed in turn, then the second, and so on. Previously the first 4–5 seeds processed could fully fill the union (since their top recommendations overlap), starving later seeds like data-science, pytorch, algorithms of any contribution. Now every seed gets a turn before any seed's later results are picked. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
c84271f to
7e26f0f
Compare
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.
Changes
Adds an A/B-gated persona picker (Frontend, Backend, AI/ML, DevOps, etc.) inside the onboarding tag step. Selecting a persona batch-follows ~10 curated tags via the existing
useTagAndSource().onFollowTagspath, and a small staggered pop animation runs across the matching tag chips so the selection reads as intentional.PersonaSelectorrenders the API-backed persona list using existingButtonchip primitives (Float/Primary+Cabbage) so visual style stays consistent with the tag pickerrecommendedTagsrequest in parallel, results dedupe and cap at 8 visibleREQUIRED_TAGS_THRESHOLD(5) individual tags; persona clicks don't count toward the thresholdtag-popkeyframe + procedural spark burst lifted from the leaderboardcrown-sparkpatterntag-fade-outkeyframe for the eviction animation;onAnimationEndis routed byevent.animationNameso pop, spark, and fade-out events don't conflictonboardingPopBusmodule event bus letsTagElementreact to persona clicks (andTagSelectionreact to recommend requests) without prop-drillingonboardingPersonasquery) is already shipped in daily-apiPre-merge
Important
Update Freyja funnel JSON for the persona-experiment variant to set the EditTags step's
headlineparameter to"Tune your feed". Once Freyja serves the new copy, the in-code override inEditTag.tsx(search for theTODO: drop this override once Freyja's persona-experiment variant ships the new headline directlycomment) can be removed.Events
select onboarding personatarget_type: 'persona',target_id: <persona id>,extra: { action: 'select' | 'deselect', tags_count, active_count }Experiment
Yes — gated behind the new
onboarding_personasGrowthBook flag (featureOnboardingPersonas, defaultfalse). Slack#experimentsenrolment to be posted before merge.Important
Please do not merge the PR until the experiment enrolment is approved.
Manual Testing
On those affected packages:
Did you test the modified components media queries?
Did you test on actual mobile devices?
🤖 Generated with Claude Code
Preview domain
https://davidercruz-onboarding-personas.preview.app.daily.dev