Automattic / Automattic/wp-calypso
Plans: Special Offers affect plan layout even when hidden
Nobody has claimed this yet.
- 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.
Steps to reproduce
- Switch to currency with special offer
- Navigate to
/start/plans?intervalType=yearly - Verify that the special offer UI is shown for plans
- Switch to 2yr or 3yr terms when selecting a different option in the billing term dropdown
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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