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

SSO: Show modal on disconnection #88552

Merged
merged 9 commits into from
Mar 15, 2024
Merged

SSO: Show modal on disconnection #88552

merged 9 commits into from
Mar 15, 2024

Conversation

heavyweight
Copy link
Contributor

@heavyweight heavyweight commented Mar 15, 2024

This PR adds SurveyModal component and uses that to display a modal when users disable sso

Related to #

Proposed Changes

  • Add SurveyModal component
  • Wire it to be used in sso

Testing Instructions

  • Build the PR or use the live link
  • Go to /settings/security/{someAtomicSite}
  • Disable sso
  • You should see a modal that leads to the sso survey

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

@heavyweight heavyweight marked this pull request as ready for review March 15, 2024 11:07
@matticbot
Copy link
Contributor

matticbot commented Mar 15, 2024

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

Sections (~716 bytes added 📈 [gzipped])

name               parsed_size           gzip_size
settings-security      +2392 B  (+0.5%)     +716 B  (+0.5%)

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.

import classNames from 'classnames';
import cookie from 'cookie';
import PropTypes from 'prop-types';
import { useState } from 'react';
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use the one from @WordPress?

@escapemanuele
Copy link
Contributor

This is great, thanks!

Let's show the modal only for en users for now (as the CrowdSignal survey will be in English)! And create the survey on Crowdsignal before shipping this :D

@escapemanuele escapemanuele changed the title Setup SSO disable modal SSO: Show modal on disconnection Mar 15, 2024
@escapemanuele escapemanuele requested a review from a team March 15, 2024 13:42
@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 Mar 15, 2024
@matticbot
Copy link
Contributor

matticbot commented Mar 15, 2024

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/sso-survey-modal on your sandbox.

@javierarce
Copy link

javierarce commented Mar 15, 2024

It looks very nice, @heavyweight, just two things.

The "Remind later" should also appear in blue.

Screenshot 2024-03-15 at 15 14 37

A few hours ago, we made some changes to the design of those pop-ups so that when they display an image, we don't include the top header. Sorry for this last-minute change!

image

Link to the design: eqlepL7MHifK8Bgr1OWqLr-fi-15013_60324

@heavyweight
Copy link
Contributor Author

heavyweight commented Mar 15, 2024

It looks very nice, @heavyweight, just two things.

The "Remind later" should also appear in blue.

Screenshot 2024-03-15 at 15 14 37 A few hours ago, we made some changes to the design of those pop-ups so that when they display an image, we don't include the top header. Sorry for this last-minute change!

image

Link to the design: eqlepL7MHifK8Bgr1OWqLr-fi-15013_60324

Hi Javier,
Fixed the cancel link now. Had a typo.

@escapemanuele escapemanuele self-requested a review March 15, 2024 16:05
Copy link
Contributor

@escapemanuele escapemanuele left a comment

Choose a reason for hiding this comment

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

LGTM!

@agrullon95 agrullon95 merged commit 1f28ae9 into trunk Mar 15, 2024
12 checks passed
@agrullon95 agrullon95 deleted the add/sso-survey-modal branch March 15, 2024 16:23
@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 Mar 15, 2024
@a8ci18n
Copy link

a8ci18n commented Mar 15, 2024

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

Some locales (Hebrew, Japanese) have been temporarily machine-translated due to translator availability. All other translations are usually ready within a few days. Untranslated and machine-translated strings will be sent for translation next Monday and are expected to be completed by the following Friday.

Hi @heavyweight, could you please edit the description of this PR and add a screenshot for our translators? Ideally it'd include all of the following strings:

  • SSO Survey
  • Spare a moment? We'd love to hear why you want to disable SSO in a quick survey.

Thank you in advance!

@a8ci18n
Copy link

a8ci18n commented Mar 18, 2024

Translation for this Pull Request has now been finished.

billrobbins pushed a commit that referenced this pull request Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

6 participants