site-kit-wp: Update the Modal Dialog component for error and confirmation actions (Storybook)
Feature Description
Add the Error Modal to Storybook. See Error modal in design doc.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The existing
<ModalDialog>component should be modified to look as per the new Audience Segmentation Modals (Figma Mock). - When on mobile viewport, the corresponding mobile design should be followed.
- All existing uses of the
<ModalDialog>component mentioned below should be updated:- The Disconnect and Reset Site Kit Modals with the
dangerproperty should be styled exactly as per the new Error Modals. - The Additional Permissions Required modal should be updated as per this Figma mock.
- Note however that the primary CTA text should remain as it is, i.e. Proceed.
- The Confirm Disconnect module modal which has multiple feature lines should be designed as per this Figma mock.
- The Disconnect and Reset Site Kit Modals with the
- All Storybook stories for each of the above components should be updated. Any old v5 format stories should be migrated to Storybook v6 stories.
Implementation Brief
- As defined in AC, update the
assets/js/components/ModalDialog.jsto match the new design. Some of the points to apply:- Text alignment is on the left for title and content
- Buttons are grouped with the right alignment and new spacing between them
- Buttons order is reversed -
handleConfirmcomes afterhandleDialog - Modal title can include SVG icon
- Update the modal in components listed in AC, which can be edited respectively in:
assets/js/components/UserMenu/index.jsandassets/js/components/ResetButton.jsassets/js/components/PermissionsModal/AuthenticatedPermissionsModal.jsassets/js/components/settings/SettingsActiveModule/ConfirmDisconnect.js
Test Coverage
- Update the edited components stories as defined in AC
Additional Permissions Requireddoesn’t seem to have a story, it can be handy to use this issue to add itstories/reset-button.stories.jsuses the old storybook API. Move it to theassets/js/components/ResetButton.stories.jsand adapt to the v6 API
QA Brief
- Setup Site Kit
- Verify that modals mentioned in AC are matching the new Figma designs now, on desktop and mobile
- Note: font weight
500in figma is slightly different how it is rendered in the browser, so slight difference might be noticeable - To trigger
Disconnectmodal:- Click on the google account menu item in the top right user menu. From the drop down, select
Disconnect
- Click on the google account menu item in the top right user menu. From the drop down, select
- To trigger
Reset site kitmodal:- Go to
settings -> admin settings -> reset site kit link
- Go to
- To trigger
Additional Permissions Requiredmodal- Setup analytics, go to settings and change property to a -
setup a new propertyoption and click apply. It will trigger the modal
- Setup analytics, go to settings and change property to a -
- To trigger
Confirm Disconnect modulemodal:- Go to
settings -> connected servicesand edit any of the modules. Click on CTA to disconnect the module
- Go to
- Note, the default width of the modal in figma is
478px, but after discussion with Sigal regarding the icon alignment, it is agreed that it will590px
Changelog entry
- Implement refreshed UI for the modal dialog component.
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 15
@mohitwp Since the font is changed globally we should open a new issue in that case, instead of making a change here, as global edit will fix all CTA’s, and it is a different scope.
Can you please open an issue for this? Thanks.
I will wait for Sigal’s reply regarding your suggestion to increase the features font to 14px, that we can do as a follow up to this issue, if Sigal approves it
@mohitwp thank you for flagging this.
It is not, I just realised we actually use 2 fonts. Thanks, I should create a follow-up issue for this.
I will need to run this through SIgal, to see if it can be changed
AC LGTM. I had initially envisaged that we’d create the presentational versions of the modal in its three variants as part of this issue, but with the existing Modal Dialog styled appropriately via this issue, it should be straightforward to implement the error modal variants as part of https://github.com/google/site-kit-wp/issues/8134.
AC ✅