Repository navigation
Conversation
|
👀 Review this PR in a CodeSee Review Map |
add the modal content add radix react dialog finish the styles for the content add modal header
|
@Sboonny, is this ready for review? let me know if you would like me to take it from here. |
|
Not yet, the styles need more fixing. BTW, take a look at 2178edf, because Radix dialog is different from the bootstrap, and will require refactoring in the codebase, the transition from the components isn't smooth, are you okay with that? |
|
The transition is fine, but the modal needs to have a way to open from the sagas as a lot of the logic lives there. |
|
there is a prop in the About the open sagas tho, my advice is to trim them, if you don't absolutely need them, so you can keep the context that related to the modal in your head as small as possible, and make changes to it later easier. They may be used them for something I am not aware of, so it's up to you. |
|
Refactoring the open modal logic from the sagas will take more time than creating a bootstrap modal clone. |
|
is the issue time? Btw, it's possible, idk if it's the right approach, idk what happens to the focus when lost, so this will need to tested as well. |
Essentially that is why we are using radix/headlessui.
Well noted. I can take a look into it. Focus might be tricky as you mentioned. |
|
if the issue is time, I will leave it to you how it is handled then, whether the refactoring is done in the following PR to reduce the complexity, or moved to contributors to handle it. |
|
I have misused |
|
So apparently the modal doesn't receive any custom CSS colors / classes, while Tailwind built-in classes are still working (see the border and the alignment):
What I've tried:
I think this has something to do with our Tailwind config. For some reason Tailwind cannot generate the colors we need if their corresponding classes are used in a React Portal. |
|
so the variables such as bg-background-secondary are defined within light-palette or dark-palette (theme-classes). To illustrate, add the following to line 45 of the preview.js file. document.body.classList.add('light-palette');To see the changes take effect better, change one of the modal elements background to --background-danger. |
|
@ahmaxed You just saved me hours of debugging, thank you! I knew something was wrong with the portal placement but didn't think of the
|
|
Glad to hear that. Looking forward to see how it looks in learn 🙌 |
|
This PR was closed in favor of #54044. I did my best trying to make @Sboonny Thank you again for the PR. Really appreciate the work you put in 🙂 |



Checklist:
mainbranch of freeCodeCamp.Closes #52922