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

loading modal #10

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

loading modal #10

wants to merge 5 commits into from

Conversation

yuenler
Copy link
Collaborator

@yuenler yuenler commented Jun 20, 2024

No description provided.

Copy link
Contributor

@gabeabrams gabeabrams left a comment

Choose a reason for hiding this comment

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

Just a few ideas for changes, then I'll publish a new version

@@ -15,6 +15,7 @@ import ReactDOM from 'react-dom';

// Import other components
import waitMs from '../../helpers/waitMs';
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you move this import to the right place? I think this issue was before you started, but let's fix it

@@ -495,7 +509,7 @@ const Modal: React.FC<ModalProps> = (props) => {
{title}
</h5>

{(onClose && !dontShowXButton) && (
{(onClose && !dontShowXButton && !(isLoading && !isLoadingCancelable)) && (
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's put this logic outside jsx and describe what's happening here, now that it's getting so complex

{isLoading ? (
<>
<LoadingSpinner />
<span className="sr-only">Content loading</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

If the programmer wants to create their own loading interface, let them. I think this should only be shown if children is undefined, null, an empty array, or falsy in some other way

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.

2 participants