Skip to content

[WNMGDS-2780] Implement stricter warnings when the isOpen prop isn't used #3121

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

Merged
merged 3 commits into from
Jun 12, 2024

Conversation

pwolfert
Copy link
Contributor

Background

In the Release 9.0 blog post, we announced that we were changing the way applications open and close dialogs and help drawers. Here is a code migration guide. We added a console warning for the old behavior in development mode, but after seeing that teams are still using the old API and running into issues, we decided it's time to increase the visibility of this change.

Summary

https://jira.cms.gov/browse/WNMGDS-2780

Implement stricter warnings when the isOpen prop isn't used (the new dialog API).

  • Require it in TypeScript
  • Up the dev warnings to throwing dev errors
  • Display a console error message in prod (previously silent in prod)

How to test

You can try it out manually if you want. Unit tests are testing for the error-throwing.

Checklist

  • Prefixed the PR title with the Jira ticket number as [WNMGDS-####] Title or [NO-TICKET] if this is unticketed work.
  • Selected appropriate Type (only one) label for this PR, if it is a breaking change, label should only be Type: Breaking
  • Selected appropriate Impacts, multiple can be selected.
  • Selected appropriate release milestone

pwolfert added 2 commits June 11, 2024 12:35
- Require it in TypeScript
- Up the dev warnings to throwing dev errors
- Display a console error message in prod (previously silent in prod)
@pwolfert pwolfert added Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Changed Indicates a change to an existing element of the DS. labels Jun 11, 2024
@pwolfert pwolfert added this to the 11.0.0-beta.1 milestone Jun 11, 2024
@pwolfert pwolfert requested a review from zarahzachz June 11, 2024 20:00
@pwolfert
Copy link
Contributor Author

Forgot to push my commit that fixes the tests

@pwolfert pwolfert merged commit 5e73fbf into main Jun 12, 2024
@pwolfert pwolfert deleted the pwolfert/enforce-new-dialog-api branch June 12, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Changed Indicates a change to an existing element of the DS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants