Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix close modal with escape keydown and cleanup import react #218

Merged
merged 10 commits into from
Nov 28, 2022
Merged

Fix close modal with escape keydown and cleanup import react #218

merged 10 commits into from
Nov 28, 2022

Conversation

fouteox
Copy link
Contributor

@fouteox fouteox commented Nov 24, 2022

Hi, I fixed modal closing by adding "show" in useEffect dependency on DeleteUserForm page.

Then I cleaned up React calls that are no longer needed.

@fouteox
Copy link
Contributor Author

fouteox commented Nov 24, 2022

add fix for label input

Copy link
Member

@jessarcher jessarcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @fouteox,

Thanks for the PR. I've confirmed this fixes the close on escape and label behaviour, although I've left a comment regarding the latter.

As for the React import, I'm not super familiar with React and I appreciate any improvements that can be made.

I've tried your PR though, and I get the following warning during the SSR build:

image

You can see it in CI here as well.

And when I log in to the application, nothing renders on the dashboard route and I get this error in the browser console:

image

I would like to get the other changes merged so it might be better to move the import changes to a separate PR if you'd still like to pursue it.

Thanks again!

@fouteox
Copy link
Contributor Author

fouteox commented Nov 25, 2022

Strange, I tried to compile on my side and I don't have this error, I sent a new commit by deleting the last import remaining in ssr.jsx, can you try again please?

@fouteox fouteox requested a review from jessarcher November 25, 2022 08:23
@taylorotwell taylorotwell marked this pull request as draft November 25, 2022 15:10
@taylorotwell
Copy link
Member

@jessarcher please mark as ready for review once you take a look again

@fouteox
Copy link
Contributor Author

fouteox commented Nov 27, 2022

I finally found the problem with the React import, in the Dropdown file, so I fixed it.

I also refactored the Modal component using the power of headlessui which natively creates a portal and supports the keyboard.

@fouteox fouteox marked this pull request as ready for review November 27, 2022 08:51
Copy link
Member

@jessarcher jessarcher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @fouteox! This looks and works great!

You've improved the functionality and reduced the code 🎉

@taylorotwell taylorotwell merged commit 0c047d5 into laravel:1.x Nov 28, 2022
slimani-dev pushed a commit to slimani-dev/breeze that referenced this pull request Jan 21, 2023
…#218)

* React formatting

* Coherence type for input

* Fix close modal with escape key and cleanup import react

* fix label

* add id for label and try delete import react in ssr.jsx

* fix React import and refactor Modal with native Portal in headlessui

* fix space

* tiny fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants