HomePhabricator
Diffusion Comm 121f30b84070

[web] introduce new redesigned modal component

Description

[web] introduce new redesigned modal component

Summary:
This diff updates the Modal component to follow the new style rules outlined by Ted in his web app redesign. Every modal should be following these new rules to create a more visually uniform look with our modals. The rules for the redesigned modals are outlined below

  • New modals will include an “button section” that will be present in all modals that need buttons.
  • The button section will always live on the bottom of the modal, and contain all the buttons needed.
  • If there is only one button for the modal, then the button will fill up the entire space of the section with 32px on the sides and 16px top/bottom.
  • All modals should have a 32px margin on the top and sides.

Here are some screenshots from the figma that help provide context for how the new modals should look visually

Screenshot 2023-12-07 at 2.19.09 PM.png (1×3 px, 669 KB)

Here is another example from Figma better showing what the button section looks like (has a different shade of black for the background)

Screenshot 2023-12-07 at 2.18.39 PM.png (1×1 px, 59 KB)

Please note that this diff will cause a bunch of regressions to our modals since pretty much all of our modals have their own one off spacing styles + buttons. This diff and subsequent diffs will not be landed until all modals are ready to be landed.

This diff just focuses on the new uniformed spacing + introducing the button container (with support for only a primary button). Subsequent diffs will handle extending the modal component props API to have support for secondary buttons, danger buttons, subheaders, etc.

Linear task: https://linear.app/comm/issue/ENG-5943/extendmodify-the-modal-props-api-to-follow-new-modal-designs

Test Plan:
Here is a an example of what the redesigned modal will look like

Screenshot 2023-12-07 at 2.15.20 PM.png (1×3 px, 795 KB)

Reviewers: atul, rohan, kamil

Reviewed By: rohan

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D10228

Details

Provenance
ginsuAuthored on Dec 6 2023, 8:51 PM
Reviewer
rohan
Differential Revision
D10228: [web] introduce new redesigned modal component
Parents
rCOMM4ff8492e42c9: [lib] introduce CommunityStore spec
Branches
Unknown
Tags
Unknown