Automattic / Automattic/wp-calypso

Plans: Special Offers affect plan layout even when hidden

Open
#97,145 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

[Experiment] AI labels added [Feature Group] Plans & Upgrades [Feature] Pricing [Feature] Purchase Management [Pri] Low Bug Quality Sprint: Week 2
Dominant language
TypeScript
Stars
12.6k
Forks
2k
Avg merge
1d 17h
Merged PRs (30d)
552

Description

Quick summary

Context in https://github.com/Automattic/wp-calypso/pull/96631#issuecomment-2518748215

I spotted a visual bug unrelated to this PR ( it's present in production ). For the currency based discount ( MXN, INR, PHP ), there's an excessive amount of space between the plan title and header pricing when switching between 1 year and multi-year term views. This does not happen if the page is initially rendered on a multi-year view.

2024-12-04 15 37 31

Steps to reproduce
  1. Switch to currency with special offer
  2. Navigate to /start/plans?intervalType=yearly
  3. Verify that the special offer UI is shown for plans
  4. Switch to 2yr or 3yr terms when selecting a different option in the billing term dropdown
  5. Verify that the special offer UI still affects layout, even though no special offers are present
What you expected to happen

Special offers shouldn't continue to affect plan layout if no special offers are present

What actually happened

There was excessive whitespace between the plan title and header price

Impact

Some (< 50%)

Available workarounds?

Yes, easy to implement

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue at /start/plans?intervalType=yearly with MXN, INR, or PHP, then switch to the 2yr or 3yr billing term. Trace the plan layout and special-offer UI involved in that route. Done means the excessive whitespace no longer appears when the selected term has no special offers, while the offer layout still appears when offers are present.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.