Repository navigation
settings: say what the trial countdown means and what subscribing does - #54
Merged
Merged
Conversation
The trial branch of the Subscription card rendered only "Your shard will be deleted <date>." A reader could not tell whether that was a countdown to losing the shard or to being charged, and nothing named the terms. State the three things a reader is deciding on: doing nothing deletes the shard with no charge and nothing to cancel; subscribing is a separate step that keeps the shard and its data and removes the deletion date (the controller writes delete_after=None on activation); and the terms are monthly and cancellable. The price, plan, disk and VAT lines came with #52 and are left as they are. The terms line sits outside the price block so the card still says what the terms are when the price lookup failed, without claiming a price it does not have. Closes #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #53.
What changed
Content only, inside the
subscriptionState === 'trial'branch of the Subscription card insrc/views/Settings.vue. Nothing was moved, merged or restyled — the layout rework stays with #50.What #52 already provided vs. what this adds
#52already covers most of point 3 of the issue. It fetchesGET /core/protected/management/api/shards/self/pricesonce inmounted()and renders, in this same trial branch:Those two lines are left exactly as they are. No second fetch, no second price line, no reimplemented formatting. What point 3 was still missing is the terms, which this PR adds as one muted line.
Points 1 and 2 of the issue were not present at all and are new here.
The copy
With
delete_afterset, the card now reads:Reasoning per sentence:
delete_after=Noneon activation (api/paypal.py), so subscribing on the last day keeps the shard.activebranch uses for its VAT line, so the two states present price and terms the same way.Two judgement calls worth a reviewer's eye:
v-elsecase (a trial with nodelete_after) gets a shortened second sentence, "Subscribing keeps this shard and its data.", since there is no deletion date to remove there. Its first line, "Subscribe to keep your shard running.", is untouched.Degraded price lookup
#52established that a failed price fetch degrades silently:refreshPricing()catches, setspricing = null, and the price block is behindv-if="currentSizePriceCents !== null". That is preserved. The new terms line sits outside that block on purpose — "Billed monthly, cancel any time." is true regardless of whether the price loaded, and it claims no figure. So with the fetch failed the card still renders, still explains the countdown and what subscribing does, still names the terms, and simply shows no price.Verified
npm cinpx vue-cli-service lint --no-fixDONE No lint errors found!npx vue-cli-service test:unitNODE_OPTIONS=--openssl-legacy-provider npx vue-cli-service buildDONE Build complete.Not verified
This repo has no component-test harness for views, so the change itself has no automated coverage. The 28 passing tests cover
src/lib/pricing.js, the PayPal SDK loader and the store; none of them renderSettings.vue. What the build proves is that the template compiles, not that the branch renders as described. I introduced no new function, so there was nothing new to unit-test.The five subscription states and the two
delete_aftercases were read off the template, not clicked through against a live shard. Worth a look on a real trial shard before release.