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:
-
Modalis a more descriptive name for what this actually is. Dialog is how it can be used. - The vast majority of our files that wrap
Dialogare actually named asModal. See here - IMO there is a clearer distinction between
PopoverandModalrather thanPopoverandDialog. The latter confused me asPopovers 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/dialogimports to Wildcard imports. Update props and remove any unnecessary styles. - Move all
reactstrapModalimports to Wildcard imports and update as necessary - Migrate all usage of
modal-body|modal-Xclasses toModalWildcard component. - Remove Bootstrap import for modal styles
