Wildcard: `<Modal />`
Created by: umpox
Closes https://github.com/sourcegraph/sourcegraph/issues/27697
Description
Implements a simple styled wrapper around our @reach/dialog
Modal implementations. These are used extensively across the webapp so this component will help align our styles and ensure code is not repeated.
Reasoning for renaming Dialog
to Modal
:
-
Modal
is a more descriptive name for what this actually is. Dialog is how it can be used. - The vast majority of our files that wrap
Dialog
are actually named asModal
. See here - IMO there is a clearer distinction between
Popover
andModal
rather thanPopover
andDialog
. The latter confused me asPopover
s can appear quite similar to a typical dialog
Migration
The code migration will be done as part of https://github.com/sourcegraph/sourcegraph/issues/27698
It should look something like this:
- Move all
@reach/dialog
imports to Wildcard imports. Update props and remove any unnecessary styles. - Move all
reactstrap
Modal
imports to Wildcard imports and update as necessary - Migrate all usage of
modal-body
|modal-X
classes toModal
Wildcard component. - Remove Bootstrap import for modal styles