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

Hds::Modal – Prevent onClose callback function invocation when isDismissDisabled is true #1456

Merged
merged 3 commits into from
Jun 29, 2023

Conversation

alex-ju
Copy link
Member

@alex-ju alex-ju commented Jun 28, 2023

πŸ“Œ Summary

Hds::Modal – Prevent onClose callback function invocation when isDismissDisabled is true

πŸ› οΈ Detailed description

isDismissDisabled was introduced in the Modal component, based on ambassadors' feedback/request, as a method of preventing data loss in forms. In practice, this argument and the suggested implementation were never used for such a case.

Recent feedback from HCP Packer and Hermes flags that their expectation is that the onClose callback function is not invoked when isDismissDisabled is true, so we're updating the code to match this consumer expectation.

πŸ”— External links

Jira ticket: HDS-2146


πŸ‘€ Reviewer's checklist:

  • +1 Percy if applicable
  • Confirm that PR has a changelog update via Changesets if needed

πŸ’¬ Please consider using conventional comments when reviewing this PR.

Prevent invoking the callback function if `isDismissDisabled` is true
@vercel
Copy link

vercel bot commented Jun 28, 2023

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Updated (UTC)
hds-showcase βœ… Ready (Inspect) Visit Preview Jun 28, 2023 11:45am
hds-website βœ… Ready (Inspect) Visit Preview Jun 28, 2023 11:45am

@hashibot-hds hashibot-hds added docs-website Content updates to the documentation website packages/components labels Jun 28, 2023
@alex-ju alex-ju requested a review from a team June 28, 2023 11:35
Copy link
Contributor

@didoo didoo left a comment

Choose a reason for hiding this comment

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

I love it: the API and the code implementation for the consumers is so much neat now!
πŸ‘πŸ‘πŸ‘

packages/components/addon/components/hds/modal/index.js Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs-website Content updates to the documentation website packages/components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants