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 Pro Dashboard: implement monitor notification settings modal #71373

Merged
merged 10 commits into from
Dec 23, 2022

Conversation

yashwin
Copy link
Contributor

@yashwin yashwin commented Dec 20, 2022

Proposed Changes

This PR implements monitor notification settings modal in the Jetpack Pro Dashboard.

Testing Instructions

Prerequisites

Since these changes are made specifically for agencies, you must set yourself(partner) as an agency - 2c49b-pb. Make sure to switch it back to the previous type.

NOTE: Changing the monitor status will not update the status immediately; we will have to debug this - 1203448324265423-as-1203576555374768. Validations & API integration to save the notification settings will be done in a separate PR.

Instructions

  1. Run git checkout add/implement-monitor-notification-settings-modal and yarn start-jetpack-cloud
  2. Open http://jetpack.cloud.localhost:3000/, and you'll be redirected to the /dashboard.
  3. Click the clock icon(which also shows the current notification schedule) or Enable the monitor for any site by clicking the toggle on the monitor column if you don't have monitor enabled on any of your sites.
  4. Please note the monitor will not be enabled immediately; you might have to wait for some time until it is enabled.
  5. Once clicked on the clock icon, verify that the notification settings popup is shown as below.

Screenshot 2022-12-21 at 12 47 46 PM

Screenshot 2022-12-21 at 12 48 43 PM

Screenshot 2022-12-21 at 12 48 58 PM

Mobile view

Screenshot 2022-12-21 at 12 50 56 PM

Tablet view

Screenshot 2022-12-21 at 12 59 43 PM

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)?

Related to 1203448324265423-as-1203507036638783

@yashwin yashwin self-assigned this Dec 20, 2022
@github-actions
Copy link

github-actions bot commented Dec 20, 2022

@yashwin yashwin changed the base branch from trunk to add/show-monitor-current-notification-schedule December 20, 2022 12:58
@yashwin yashwin changed the title DRAFT: Add/implement monitor notification settings modal DRAFT: Implement monitor notification settings modal Dec 20, 2022
@yashwin yashwin force-pushed the add/implement-monitor-notification-settings-modal branch from a3e020a to 99c8dee Compare December 21, 2022 06:55
@yashwin yashwin changed the title DRAFT: Implement monitor notification settings modal Jetpack Pro Dashboard: implement monitor notification settings modal Dec 21, 2022
@yashwin yashwin marked this pull request as ready for review December 21, 2022 07:46
@yashwin yashwin requested a review from a team December 21, 2022 07:48
@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 21, 2022
@yashwin yashwin added Jetpack Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) labels Dec 21, 2022
@DustinHartzler
Copy link
Contributor

Is the Save button in the modal supposed to work? I was able to interact with the elements in the modal, but the Save did nothing.

@yashwin
Copy link
Contributor Author

yashwin commented Dec 22, 2022

Is the Save button in the modal supposed to work? I was able to interact with the elements in the modal, but the Save did nothing.

@DustinHartzler - Thanks for your review on this PR. We will handle the API integration for Save in a different PR.

@madebynoam
Copy link

Thank you @yashwin! I just left two responses to the questions; otherwise, this LGTM!

Copy link

@madebynoam madebynoam left a comment

Choose a reason for hiding this comment

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

Lgtm!

@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:

App Entrypoints (~60 bytes removed 📉 [gzipped])

name                   parsed_size           gzip_size
entry-stepper               -610 B  (-0.0%)      -57 B  (-0.0%)
entry-main                  -610 B  (-0.0%)      -60 B  (-0.0%)
entry-login                 -434 B  (-0.0%)      -57 B  (-0.0%)
entry-gutenboarding         -434 B  (-0.0%)      -57 B  (-0.0%)
entry-domains-landing       -434 B  (-0.1%)      -57 B  (-0.0%)
entry-browsehappy           -434 B  (-0.4%)      -57 B  (-0.2%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~2044 bytes added 📈 [gzipped])

name                             parsed_size           gzip_size
jetpack-cloud-agency-dashboard      +20434 B  (+4.7%)    +5751 B  (+4.5%)
woocommerce-installation              -108 B  (-0.0%)      -21 B  (-0.0%)
woocommerce                           -108 B  (-0.0%)      -21 B  (-0.0%)
themes                                -108 B  (-0.0%)      -21 B  (-0.0%)
theme                                 -108 B  (-0.0%)      -21 B  (-0.0%)
stats                                 -108 B  (-0.0%)      -21 B  (-0.0%)
site-purchases                        -108 B  (-0.0%)      -16 B  (-0.0%)
settings-writing                      -108 B  (-0.0%)      -21 B  (-0.0%)
settings-security                     -108 B  (-0.0%)      -21 B  (-0.0%)
settings-reading                      -108 B  (-0.0%)      -21 B  (-0.0%)
settings-performance                  -108 B  (-0.0%)      -21 B  (-0.0%)
settings-jetpack                      -108 B  (-0.0%)      -21 B  (-0.0%)
settings-discussion                   -108 B  (-0.0%)      -21 B  (-0.0%)
settings                              -108 B  (-0.0%)      -21 B  (-0.0%)
scan                                  -108 B  (-0.0%)      -21 B  (-0.0%)
purchases                             -108 B  (-0.0%)      -16 B  (-0.0%)
promote-post                          -108 B  (-0.0%)      -21 B  (-0.0%)
preview                               -108 B  (-0.0%)      -21 B  (-0.0%)
posts-custom                          -108 B  (-0.0%)      -21 B  (-0.0%)
posts                                 -108 B  (-0.0%)      -21 B  (-0.0%)
plugins                               -108 B  (-0.0%)      -19 B  (-0.0%)
plans                                 -108 B  (-0.0%)      -21 B  (-0.0%)
people                                -108 B  (-0.0%)      -21 B  (-0.0%)
pages                                 -108 B  (-0.0%)      -21 B  (-0.0%)
migrate                               -108 B  (-0.0%)      -21 B  (-0.0%)
media                                 -108 B  (-0.0%)      -20 B  (-0.0%)
marketplace                           -108 B  (-0.0%)      -21 B  (-0.0%)
marketing                             -108 B  (-0.0%)      -21 B  (-0.0%)
jetpack-social                        -108 B  (-0.0%)      -21 B  (-0.0%)
jetpack-search                        -108 B  (-0.0%)      -21 B  (-0.0%)
jetpack-connect                       -108 B  (-0.0%)      -21 B  (-0.0%)
jetpack-cloud-settings                -108 B  (-0.0%)      -21 B  (-0.0%)
jetpack-cloud-pricing                 -108 B  (-0.0%)      -21 B  (-0.0%)
jetpack-cloud-plugin-management       -108 B  (-0.0%)      -21 B  (-0.0%)
jetpack-cloud                         -108 B  (-0.0%)      -21 B  (-0.0%)
import                                -108 B  (-0.0%)      -21 B  (-0.0%)
hosting                               -108 B  (-0.0%)      -21 B  (-0.0%)
home                                  -108 B  (-0.0%)      -21 B  (-0.0%)
gutenberg-editor                      -108 B  (-0.0%)      -21 B  (-0.0%)
google-my-business                    -108 B  (-0.0%)      -21 B  (-0.0%)
export                                -108 B  (-0.0%)      -21 B  (-0.0%)
email                                 -108 B  (-0.0%)      -21 B  (-0.0%)
earn                                  -108 B  (-0.0%)      -21 B  (-0.0%)
domains                               -108 B  (-0.0%)      -16 B  (-0.0%)
customize                             -108 B  (-0.0%)      -21 B  (-0.0%)
concierge                             -108 B  (-0.0%)      -21 B  (-0.0%)
comments                              -108 B  (-0.0%)      -21 B  (-0.0%)
checkout                              -108 B  (-0.0%)      -16 B  (-0.0%)
backup                                -108 B  (-0.0%)      -21 B  (-0.0%)
add-ons                               -108 B  (-0.0%)      -21 B  (-0.0%)
activity                              -108 B  (-0.0%)      -21 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.

Base automatically changed from add/show-monitor-current-notification-schedule to trunk December 23, 2022 03:58
@yashwin yashwin force-pushed the add/implement-monitor-notification-settings-modal branch from 5ba3e76 to 19ff752 Compare December 23, 2022 04:02
Copy link
Contributor

@vitozev vitozev left a comment

Choose a reason for hiding this comment

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

Awesome work, @yashwin! This PR looks and works great on all device sizes! I've left some minor feedback.

I also have one UX question: how easy would it be to allow Space as a delimiter? I think it's a pretty common UX pattern, and if we can easily integrate it, that would be great.

@yashwin
Copy link
Contributor Author

yashwin commented Dec 23, 2022

Thanks for your review, @vitozev. I have addressed all your comments.

I think it's a pretty common UX pattern, and if we can easily integrate it, that would be great.

Yes, agree. I have added this support too.

Copy link
Contributor

@vitozev vitozev left a comment

Choose a reason for hiding this comment

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

LGTM!

@yashwin yashwin force-pushed the add/implement-monitor-notification-settings-modal branch from 234cf01 to 2b7063e Compare December 23, 2022 14:03
@yashwin yashwin merged commit 0fc4e98 into trunk Dec 23, 2022
@yashwin yashwin deleted the add/implement-monitor-notification-settings-modal branch December 23, 2022 14:15
@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
@a8ci18n
Copy link

a8ci18n commented Dec 23, 2022

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

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

@a8ci18n
Copy link

a8ci18n commented Jan 12, 2023

Translation for this Pull Request has now been finished.

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.

6 participants