Changes proposed in this Pull Request
This PR updates the conditions to show the auto-renew toggle and renew button for registered domains. This is part of an effort to fix and standardize the conditions in which some domain actions are shown or hidden in the domain management pages in Calypso.
Two places were updated:
The auto-renew toggle should only appear if you’re the owner of the domain and the renew/redeem notices should appear only if the domain has the isRenewable
/isRedeemable
properties. Until now, the renew notice would appear if the domain had expired between 1 and 43 days ago and the redemption notice if the domain expired more than 43 days ago, regardless of the actual renewal and redemption periods for the domain’s specific TLD (some TLDs have different grace periods).
The renew/redeem notices and the auto-renew toggle here should follow the same logic as in the domains list, as described above. The renew button should appear while the domain is still renewable or redeemable – when a domain enters the redemption grace period, the button should have the “Redeem now” label.
Testing instructions
The best way to test this would be to have expired domains, one in the renewal period and one in the redemption period. If you don’t, you can follow the instructions in D70509-code to enable mocked domains.
- Build this branch locally or open the live Calypso link
- Visit the domains list page (Upgrades > Domains) and ensure the domains in renewal and redemption periods are showing the correct notices and auto-renew toggle
- Visit the domain management pages for these domains and ensure the renew/redemption notice is correct, the auto-renew toggle is shown and the “Renew now” button works as expected
- For the domain in redemption, ensure the “Redeem now” button works as expected: it should take you to the checkout page with the registration + redemption products in the cart
Unfortunately, no screenshots were provided by the developer.