feat(insights): Conversion Journeys config matrix + leg empty states (NPPD-1742)#371
Merged
kmwilkerson merged 3 commits intoJun 20, 2026
Conversation
…PPD-1742) Apply the empty-state pattern to the Conversion Journeys subscription and donation legs. A per-leg visibility gate hides a conversion endpoint when the publisher doesn't run that reader-revenue stream (config matrix); configured- but-quiet legs get funnel-shaped no_opportunity / no_conversions treatments. The registration leg is left as-is (NPPD-1743). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…PPD-1742) Code-review follow-up: the subscription/donation no_conversions note fired on conversion===0 alone, so a leg with registered readers but zero prior-stage base (e.g. no prompt shown) rendered "{0} saw a prompt, but none converted" next to a funnel showing readers entering — self-contradicting, and counter to the ticket's "prior stage HAS a base" definition. Guard on priorStage > 0; that case now falls through to the normal funnel. Adds an edge-case test. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…D-1742) PHPCS (workspace-root standard, stricter than the plugin lint) flagged the $donation_leg_configured property's @var-only docblock as missing a short description. Add one. Co-Authored-By: Claude Opus 4.8 <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.
What & why
Applies the empty-state pattern (NPPD-1694) to the Conversion Journeys tab, scoped (per NPPD-1742) to the parts with no upstream dependency: the configuration matrix (which legs render) and the subscription / donation conversion legs. The registration leg is left exactly as-is — its treatment needs hub-side registration counts and is tracked in NPPD-1743.
Behavior
Config matrix — each conversion-endpoint leg renders only when that stream is configured:
visibility: 'hidden'(reason: 'not_configured') → the component omits the whole cell (registrations-only publishers see just the registration + cross-upsell cells, never zero funnels). No BQ query is issued for a hidden leg.Per-leg states (configured legs) — funnel-shaped, since these are funnels not scorecards:
no_opportunitynote (nothing to draw).no_conversionsannotation,{N}= prior-stage base.Testing
Test_Conversion_Metric79/79,Test_Conversion_REST_Controller15/15. New: leg hidden-when-unconfigured (+ asserts no query issued), visibility stamping; existing leg tests updated for the new config-gate precondition.PerJourneyConversionFunnelsSection.test.tsx.tscclean for the conversion files.conversion_registrations_only(both conversion legs omitted), andempty(funnel-shapedno_opportunityin both configured legs). The.test.tsxNPPD-1683 caveat applies but is fixed, so these run in CI.