Skip to content

Cleaned up gift subscription screens#27825

Merged
minimaluminium merged 4 commits into
mainfrom
sodo-ber-3605-design-cleanup
May 12, 2026
Merged

Cleaned up gift subscription screens#27825
minimaluminium merged 4 commits into
mainfrom
sodo-ber-3605-design-cleanup

Conversation

@minimaluminium
Copy link
Copy Markdown
Member

ref https://linear.app/ghost/issue/BER-3605/design-cleanup

Follow-up cleanup from the gift subscription redesign (#27668).

  • BER-3607 — gift selection and success screens now use the shared getGiftDurationLabel util instead of local copies.
  • BER-3606 — extracted <GiftCard> and <GiftDetailsToggle> shared components, used across all four gift screens (selection, success, redemption, magic-link in gift mode).

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 12, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 14f35c66-d0b1-4272-82bf-02b608ebb111

📥 Commits

Reviewing files that changed from the base of the PR and between c5899e3 and 4eae14d.

📒 Files selected for processing (2)
  • apps/portal/src/components/common/gift-details-toggle.js
  • apps/portal/src/components/pages/gift-page.js
🚧 Files skipped from review as they are similar to previous changes (2)
  • apps/portal/src/components/common/gift-details-toggle.js
  • apps/portal/src/components/pages/gift-page.js

Walkthrough

This 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

  • TryGhost/Ghost#27668: Related redesign introducing shared GiftCard and GiftDetailsToggle components and replacing inline gift-card markup across pages.

Suggested labels

preview

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: extracting and reusing gift subscription UI components across multiple screens for code cleanup.
Description check ✅ Passed The description is directly related to the changeset, referencing specific linear issues (BER-3607, BER-3606) and clearly explaining the two main cleanup objectives: shared utility adoption and component extraction.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sodo-ber-3605-design-cleanup

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Changelog for v2.68.37 -> 2.68.38:
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 39ee9fb and 90ac692.

📒 Files selected for processing (6)
  • apps/portal/src/components/common/gift-card.js
  • apps/portal/src/components/common/gift-details-toggle.js
  • apps/portal/src/components/pages/gift-page.js
  • apps/portal/src/components/pages/gift-redemption-page.js
  • apps/portal/src/components/pages/gift-success-page.js
  • apps/portal/src/components/pages/magic-link-page.js

Comment thread apps/portal/src/components/common/gift-details-toggle.js Outdated
@minimaluminium minimaluminium requested a review from sagzy May 12, 2026 04:14

<GiftCard
cardRef={cardRef}
duration={getGiftDurationLabel({cadence: activeInterval, duration: 1})}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@minimaluminium minimaluminium merged commit 966c1ba into main May 12, 2026
41 checks passed
@minimaluminium minimaluminium deleted the sodo-ber-3605-design-cleanup branch May 12, 2026 08:23
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