styleguide icon indicating copy to clipboard operation
styleguide copied to clipboard

Reimplement the modal component

Open thayannevls opened this issue 5 years ago • 5 comments

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.

thayannevls avatar Mar 18 '20 18:03 thayannevls

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.

matheusps avatar Mar 18 '20 19:03 matheusps

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.

emersonlaurentino avatar Mar 18 '20 19:03 emersonlaurentino

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.

thayannevls avatar Mar 18 '20 19:03 thayannevls

@emersonlaurentino What happens if we want to add breaking changes to the modal? :thinking:

thayannevls avatar Mar 18 '20 19:03 thayannevls

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.

emersonlaurentino avatar Mar 18 '20 19:03 emersonlaurentino