Cleaned up gift subscription screens#27825
Conversation
|
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
WalkthroughThis PR adds two shared React components: GiftCard (renders a gift membership card with duration, tier, purchaser name/value, and site metadata) and GiftDetailsToggle (renders an expandable description and benefits list). It replaces inline gift-card and details markup across gift-page, gift-redemption-page, gift-success-page, and magic-link-page, updates CheckmarkIcon usage, and bumps the portal package version. Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Changelog for v2.68.37 -> 2.68.38:
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/portal/src/components/common/gift-details-toggle.js`:
- Line 24: The CheckmarkIcon SVGR component is using an invalid alt attribute;
update its usage in the render so it matches the accessible pattern used by
ChevronIcon: remove alt='' and add aria-hidden="true" and focusable="false" to
the CheckmarkIcon element to mark it decorative and hide it from assistive tech,
keeping the ChevronIcon pattern as the reference for the exact attributes to
apply.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 029f48cf-1cc0-4bca-942d-8051f97f2aec
📒 Files selected for processing (6)
apps/portal/src/components/common/gift-card.jsapps/portal/src/components/common/gift-details-toggle.jsapps/portal/src/components/pages/gift-page.jsapps/portal/src/components/pages/gift-redemption-page.jsapps/portal/src/components/pages/gift-success-page.jsapps/portal/src/components/pages/magic-link-page.js
|
|
||
| <GiftCard | ||
| cardRef={cardRef} | ||
| duration={getGiftDurationLabel({cadence: activeInterval, duration: 1})} |
There was a problem hiding this comment.
We have a few assumptions around duration being always 1 in Portal, which works at the moment (1 month / 1 year options only), but will break unexpectedly when introducing more gift durations in the future.
Not something we need to address in this PR, but would be good to clean up. I'll add a todo in the general cleanup task
ref https://linear.app/ghost/issue/BER-3605/design-cleanup
Follow-up cleanup from the gift subscription redesign (#27668).
getGiftDurationLabelutil instead of local copies.<GiftCard>and<GiftDetailsToggle>shared components, used across all four gift screens (selection, success, redemption, magic-link in gift mode).