styleguide
styleguide copied to clipboard
Reimplement the modal component
Overview
Implement our own modal component with the same functionalities but without using external components.
Purpose
Currently, Styleguide Modal uses an external component which is not very well maintained and doesn't attend to all our requirements, such as:
- Not SSR Friendly
- Doesn't support multiple sizes
- We can't improve the modal easily because is not our implementation
- Accessibility problems
After we reimplement, we could work on new features such as these ones.
May I suggest following the same road as the Table? For example - create an EXPERIMENTAL_Modal which renders children on Portal, and enhance it until reach stability. This way you can work without restrictions to achieve a great Modal.
I don't like the idea of experimental, I think it's better to create the tests for the current modal and it works on a specific branch for the modal refactor without breaking the tests... And then when you have everything correctly (without breaking anything) then it starts incrementally add the new features that are desired.
Another change I want to suggest is to Modal Dialog and Modal be the same component in the future, I don't see a reason to exist both.
@emersonlaurentino What happens if we want to add breaking changes to the modal? :thinking:
Since there are already tests, you make your PR for the branch of features and then that branch will be rebased with the master.
The advantage of the experimental ones is that you can generate beta versions at any time.