Page MenuHomePhabricator

[web] introduce new redesigned modal component
ClosedPublic

Authored by ginsu on Dec 7 2023, 11:12 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 4:09 AM
Unknown Object (File)
Tue, Nov 12, 5:56 PM
Unknown Object (File)
Tue, Nov 12, 6:47 AM
Unknown Object (File)
Mon, Nov 11, 11:00 PM
Unknown Object (File)
Mon, Nov 11, 5:55 PM
Unknown Object (File)
Fri, Nov 8, 2:17 PM
Unknown Object (File)
Fri, Nov 8, 2:17 PM
Unknown Object (File)
Fri, Nov 8, 2:17 PM
Subscribers

Details

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)

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu requested review of this revision.Dec 7 2023, 11:33 AM
This revision is now accepted and ready to land.Dec 7 2023, 1:19 PM