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

chore: Port smaller Antd.Modals to standard Hew Modal #8567

Merged
merged 14 commits into from
Dec 8, 2023

Conversation

julian-determined-ai
Copy link
Contributor

@julian-determined-ai julian-determined-ai commented Dec 8, 2023

Description

This PR updates our smaller and simpler modals to use the Hew Modal.

One Modal needed an update in Hew in order to expect the MouseEvent on the "Ok" button click the relevant PR is here determined-ai/hew#75.

Once the above PR is merged in I will properly update the Hew version in our packages.

Test Plan

  1. Open each modal in the ticket (besides the TextEditorModal) and ensure they work properly.

Commentary (optional)

Checklist

  • Changes have been manually QA'd
  • User-facing API changes need the "User-facing API Change" label.
  • Release notes should be added as a separate file under docs/release-notes/.
    See Release Note for details.
  • Licenses should be included for new code which was copied and/or modified from any external code.

Ticket

Copy link

netlify bot commented Dec 8, 2023

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit a42d94b
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/6573815bd6a7c50008e76f1b
😎 Deploy Preview https://deploy-preview-8567--determined-ui.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

handleError: () => {},
handler: () => {},
onComplete: onCancel,
text: 'Ok',
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this one should be Close

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mapmeld let me know if you had something else in mind, but I see an issue where we don't have "an informational / Close modal" variation and the "submit" is required. I can add the "cancel" here and have both submit and cancel do the same thing, or keep as is, I am fine with either. But I think the real solution is to add an "informational / Close modal" to Hew.

Copy link
Contributor

Choose a reason for hiding this comment

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

I got the idea from the GalleryModal. Is this modal different because it can make changes (handleTrialUnselect) ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@mapmeld I think I misunderstood what you were saying at first let me know if it looks better now.

submit={{
handleError: () => {},
handler: onOk,
text: 'Ok',
Copy link
Contributor

Choose a reason for hiding this comment

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

this would also be an informational / Close modal

Copy link
Contributor

@mapmeld mapmeld left a comment

Choose a reason for hiding this comment

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

✅ Thanks for the changes. LGTM

@julian-determined-ai julian-determined-ai merged commit 3371746 into main Dec 8, 2023
70 of 81 checks passed
@dannysauer dannysauer added this to the 0.26.7 milestone Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants