Skip to content

Improve card grant modal behavior #10253

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

Luke-Oldenburg
Copy link
Contributor

@Luke-Oldenburg Luke-Oldenburg commented Apr 28, 2025

Switched from jquery refresh after doing turbo to using js to hide and reveal it with a back button. Works much smoother and faster. Only issue is the back button looks a little out of place.

@Luke-Oldenburg Luke-Oldenburg marked this pull request as ready for review May 8, 2025 23:05
@Luke-Oldenburg Luke-Oldenburg requested review from a team as code owners May 8, 2025 23:05
@sampoder
Copy link
Member

sampoder commented May 8, 2025

Screenshot 2025-05-08 at 4 10 40 PM

I would prefer if we went with this setup - any reason we can't?

@Luke-Oldenburg
Copy link
Contributor Author

I couldn't get the modal to close when opening the next one. closeExisiting just hides the entire div.

@sampoder
Copy link
Member

sampoder commented May 8, 2025

Can you send me the code you had? I can give it a shot

@Luke-Oldenburg
Copy link
Contributor Author

https://github.com/hackclub/hcb/tree/1bf6952679938c45a4553f00f3d40bb3ebee2f49 this is after the "Small tweaks" commit. It got it to a separate modal and form but they were stacking on top of each other.

@sampoder
Copy link
Member

sampoder commented May 9, 2025

I figured it out! It's a bug with jquery-modal.

The problem is we having fading setup - so when you call close(), it doesn't immediately close it but queues the close() function to run in 10 seconds, but the close function closes all modals. So once the new one is opened, they both get closed.

Here's how I fixed it: https://github.com/hackclub/hcb/tree/fix-jquery-modal

@Luke-Oldenburg
Copy link
Contributor Author

I figured it out! It's a bug with jquery-modal.

The problem is we having fading setup - so when you call close(), it doesn't immediately close it but queues the close() function to run in 10 seconds, but the close function closes all modals. So once the new one is opened, they both get closed.

Here's how I fixed it: https://github.com/hackclub/hcb/tree/fix-jquery-modal

It worked! Thank you!

@Luke-Oldenburg Luke-Oldenburg force-pushed the lro-improve-card-grant-modal-behavior branch from 9140307 to 02efd22 Compare May 9, 2025 19:34
Copy link
Member

@garyhtou garyhtou left a comment

Choose a reason for hiding this comment

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

great work here @Luke-Oldenburg and @sampoder !

@garyhtou garyhtou enabled auto-merge May 12, 2025 20:11
@garyhtou
Copy link
Member

It should auto merge after you resolve merge conflicts

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