-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: pass through functionality from react-responsive
and remove custom Responsive components BREAKING CHANGE: Custom Responsive components have been removed in favor of passing through components and functionality from react-responsive directly. Components that have been removed: - `ExtraSmall` - `Small` - `Medium` - `Large` - `ExtraLarge` - `ExtraExtraLarge` - `LargerThanExtraSmall` New passthroughs: - `MediaQuery` - `useMediaQuery` - `ResponsiveContext` Please refer to [react-responsive](https://www.npmjs.com/package/react-responsive) documentation for more information.
- Loading branch information
Showing
10 changed files
with
93 additions
and
393 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
docs/decisions/0014-removal-of-custom-responsive-components.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
14. Removal of Custom Responsive Components | ||
------------------------------------------- | ||
|
||
Status | ||
------ | ||
|
||
Accepted | ||
|
||
Context | ||
_______ | ||
|
||
Paragon utilizes the `react-responsive <https://www.npmjs.com/package/react-responsive>`_ | ||
NPM package in some components, as well as providing some helper components from | ||
react-responsive. However, often consumers of Paragon require additional responsive | ||
functionality than is offered through Paragon itself and as such resort to installing | ||
react-responsive as a standalone dependency in microfrontends. | ||
|
||
If Paragon instead makes react-responsive a passthrough library, consumers of Paragon will | ||
be able to use react-responsive directly (by importing it from Paragon) rather than needing | ||
to install it separately. This shouldn’t necessarily have any impact on Paragon’s bundle | ||
size since react-bootstrap already ships with Paragon; just not all its functionality is | ||
importable by its consumers. | ||
|
||
Decision | ||
________ | ||
|
||
We will remove the following components: | ||
|
||
- ExtraSmall | ||
- Small | ||
- Medium | ||
- Large | ||
- ExtraLarge | ||
- ExtraExtraLarge | ||
- LargerThanExtraSmall | ||
|
||
We will pass through the following components and functionality from react-responsive: | ||
|
||
- MediaQuery | ||
- useMediaQuery | ||
- Context (as ResponsiveContext) | ||
|
||
Consequences | ||
------------ | ||
|
||
- Consumers of the current `Responsive` components will need to refactor to the passthrough | ||
components from react-responsive. | ||
- Consumers of Paragon will be able to use components from react-responsive directly, without | ||
having to install it separately. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.