Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addresses messaging for #2076. #2079

Merged
merged 17 commits into from
Jul 7, 2022
Merged

addresses messaging for #2076. #2079

merged 17 commits into from
Jul 7, 2022

Conversation

scottjehl
Copy link
Contributor

Instructions:

  1. Before merging this PR, the relevant index.php markup needs to be populated with php values and made the same.
  2. For sake of example, there are two variations in the markup currently which show the two possible states of the "runs left" message. These are just before the submit inputs in the SIMPLE and ADVANCED groups. Again, they should be the same once implemented in PHP.
  • When there are more than 30 runs remaining, we can show this markup just before the inputs:
    <small class="test_runs"><span>45 Runs Left</span> | <a href="/account">Upgrade</a></small>
    image
  • When there are fewer than 30 runs left, we can change the markup slightly to add this warn class, and also add an aria-disabled attribute to the input that follows the small element:
    <small class="test_runs test_runs-warn"><span>15 Runs Left</span> | <a href="/account">Upgrade</a></small>
    <input 
    image Small note on the `aria-disabled`: I've used that attr alone to allow focus to still occur, which `disabled` would otherwise block. There's CSS included to set opacity and pointer-events to avoid click, but it may still need an onsubmit prevent default on the form.

Beyond all this, if the form is submitted to runtest and there aren't enough runs, we should use our standard error template to note that.

@deathbearbrown
Copy link
Contributor

//TODO

  • update userDetails query to contain the remainingRuns and monthlyRuns
  • set remaining and monthly runs on the user (it's in the braintreeCustomerDetails query)
  • add conditionals to show this messaging

@deathbearbrown deathbearbrown force-pushed the runs-left-messaging branch 2 times, most recently from f34248f to 7878a67 Compare July 5, 2022 18:33
@deathbearbrown
Copy link
Contributor

this is deployed here https://wptqa.webpagetest.org/

@deathbearbrown
Copy link
Contributor

sure approving this is maybe sneaky, but I am sneaky.

@deathbearbrown deathbearbrown merged commit 7fd8433 into master Jul 7, 2022
@scottjehl scottjehl deleted the runs-left-messaging branch December 2, 2022 15:12
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.

None yet

2 participants