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

Disable the pre-sales chat on the Cloud pricing page for the Holidays. #71390

Merged
merged 5 commits into from
Dec 23, 2022

Conversation

elliottprogrammer
Copy link
Contributor

@elliottprogrammer elliottprogrammer commented Dec 20, 2022

Proposed Changes

This PR disables the Zendesk pre-sales Chat interface on the Jetpack Cloud pricing page automatically between the dates of Dec 23, 2022 midnight UTC thru Jan 3, 2023 midnight UTC.

Related to: p1671473237696439-slack-C04BZQFCWE9

Testing Instructions

Note: The pre-sales chat does not run on weekends (UTC), so if you're testing this PR on a weekend day and the chat is not showing, this is why. You'll need to change your local computer date/time to a non-weekend day.

  • Do any one of these
    • Click on Jetpack Cloud live link below and wait for the redirect to complete, then goto /pricing
    • or boot up this PR
  • Assuming you are not testing this between the shutdown dates (listed above), verify you see the chat box in the lower right corner of the page.
  • Now change your local computer's clock to some time(s) between the shutdown dates (listed above).
    • One way to test would be to go to worldtimebuddy.com and create a row with your own location and then create another row with UTC location. Then find what time it is for you at Dec 23, 2022 midnight UTC and also at Jan 2, 2023 midnight UTC. Write down or keep note of these local date/times.
    • Then change your local computer time to a time just after the start shutdown time for you locally. Reload the page and verify the chat is not showing.
    • set your local computer date/time to a time just before the end shutdown time, and verify the chat is still not showing.
    • Then set your local computer date/time to a time just after the end shutdown time for you locally. Verify the chat is now showing again.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-ajp-p2)?

@elliottprogrammer elliottprogrammer added Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) [Feature] Pricing Feedback related to the pricing structure of WordPress.com's plans and services. labels Dec 20, 2022
@elliottprogrammer elliottprogrammer self-assigned this Dec 20, 2022
@github-actions
Copy link

github-actions bot commented Dec 20, 2022

@elliottprogrammer elliottprogrammer requested a review from a team December 20, 2022 20:31
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 20, 2022
Copy link
Contributor

@TheSteveK TheSteveK left a comment

Choose a reason for hiding this comment

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

I was having some issues with the chat still appearing, so I logged the variables for isWithinShutdownDates and got something unexpected:

Screenshot 2022-12-21 at 7 00 04 AM

@mattgawarecki
Copy link
Contributor

mattgawarecki commented Dec 21, 2022

I was having some issues with the chat still appearing, so I logged the variables for isWithinShutdownDates and got something unexpected:

Screenshot 2022-12-21 at 7 00 04 AM

Ah, nice catch! Though I'll call it out explicitly, because it took me a minute to find: the start time is set to January of next year, rather than December of this year.

@matticbot
Copy link
Contributor

matticbot commented Dec 22, 2022

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

Sections (~54 bytes added 📈 [gzipped])

name                   parsed_size           gzip_size
plans                       +142 B  (+0.0%)      +54 B  (+0.0%)
jetpack-connect             +142 B  (+0.0%)      +54 B  (+0.0%)
jetpack-cloud-pricing       +142 B  (+0.0%)      +54 B  (+0.0%)

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.

@elliottprogrammer
Copy link
Contributor Author

Thanks @TheSteveK and @mattgawarecki for catching this. 👍

It's strange.. I actually encountered this bug already when I was coding it.. (it's when I was reminded/re-learned that JavaScript months go from 0 to 11). I could swear I fixed both the startTime and endTime, but apparently I did something whereas the startTime didn't get fixed properly. 🤷‍♂️ Anyway, thanks again, got it all fixed now.

Also I fixed the endTime to match the end date on Jetpack.com (Jan 2).

@elliottprogrammer
Copy link
Contributor Author

Wait a minute.. I just realized a problem with this PR.. I need to move the holiday shutdown logic out from this component because I realize this component is used elsewhere also, I believe.. I'm labeling this PR "in progress" for the moment.

@elliottprogrammer elliottprogrammer added [Status] In Progress and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Dec 22, 2022
@elliottprogrammer
Copy link
Contributor Author

elliottprogrammer commented Dec 23, 2022

Wait a minute.. I just realized a problem with this PR.. I need to move the holiday shutdown logic out from this component because I realize this component is used elsewhere also, I believe.. I'm labeling this PR "in progress" for the moment.

No, I was wrong about this.. ^^ The component is not used elsewhere.. It is a component specifically for the Jetpack product store and located in the product store directory.
This is good. It needs to be deployed.

@elliottprogrammer elliottprogrammer added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Dec 23, 2022
Copy link
Contributor

@andrii-lysenko andrii-lysenko left a comment

Choose a reason for hiding this comment

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

LGTM! If the timeframes what we desire, the code looks good.

@andrii-lysenko andrii-lysenko dismissed TheSteveK’s stale review December 23, 2022 15:43

Dismissing, as I re-reviewed it and Steve is AFK. We need to deliver ASAP

@elliottprogrammer elliottprogrammer merged commit d581895 into trunk Dec 23, 2022
@elliottprogrammer elliottprogrammer deleted the update/disable-presales-chat-for-holidays branch December 23, 2022 15:59
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Pricing Feedback related to the pricing structure of WordPress.com's plans and services. Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants