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

Jetpack Cloud: Add Retry Scan button. #41988

Merged
merged 3 commits into from
May 12, 2020
Merged

Conversation

enejb
Copy link
Member

@enejb enejb commented May 8, 2020

Changes proposed in this Pull Request

Add Scan Retry Button to the error page.

Before:
Screen Shot 2020-05-08 at 2 44 23 PM

After:
Screen Shot 2020-05-08 at 3 47 48 PM

Testing instructions

  • Create a scan error.
  • Or fake it.

@enejb enejb added Jetpack [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) labels May 8, 2020
@enejb enejb requested a review from a team May 8, 2020 14:01
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

matticbot commented May 8, 2020

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~33 bytes added 📈 [gzipped])

name  parsed_size           gzip_size
scan       +165 B  (+0.1%)      +33 B  (+0.1%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Contributor

@mattgawarecki mattgawarecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Behaves as expected. LGTM! :shipit:

@mattgawarecki mattgawarecki added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels May 8, 2020
@@ -205,6 +207,15 @@ class ScanPage extends Component< Props > {
) }
</p>
{ this.renderContactSupportButton() }
{ isEnabled( 'jetpack-cloud/on-demand-scan' ) && (
<Button
href={ `/scan/${ siteSlug }` }
Copy link
Contributor

@rcanepa rcanepa May 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the href here? It seems it makes this button being rendered as an a tag instead of a button so it looks a bit different from what we have in our style guide (a specific classes are being applied). I worry about how this can affect the accessibility because this CTA is triggering an action not moving the user to another page/location.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You make a good point here, @rcanepa -- I hadn't thought to check the style guide. I also wasn't aware that Button exposes an href property!

I agree that we're performing an action here, not moving to a different page. In light of this, maybe we can remove the href value all together since onClick is performing as expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that should be the way to go, but maybe there is a reason for this Button to have a href property that we aren't aware of. @ChaosExAnima is this normal in Calypso's codebase?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rcanepa - Not to my knowledge, no. I'd also say remove the href.

@mattgawarecki mattgawarecki added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] Ready to Merge labels May 8, 2020
@mattgawarecki mattgawarecki self-requested a review May 8, 2020 16:23
@enejb enejb force-pushed the add/scan-retry-button-on-scan-page branch from 3930d86 to ebe1a33 Compare May 11, 2020 11:12
@@ -97,7 +97,7 @@ class ScanPage extends Component< Props > {
} )
}
>
{ translate( 'Contact Support {{externalIcon/}}', {
{ translate( 'Contact support {{externalIcon/}}', {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ This change will be queued for retranslation. We'll display the English text until then.

Copy link
Contributor

@rcanepa rcanepa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see this working and looking great now!

image

@enejb enejb merged commit de598f7 into master May 12, 2020
@enejb enejb deleted the add/scan-retry-button-on-scan-page branch May 12, 2020 15:18
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 12, 2020
@a8ci18n
Copy link

a8ci18n commented May 13, 2020

This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/3554572

Thank you @enejb for including a screenshot in the description! This is really helpful for our translators.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) Jetpack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants