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

[@reach/tooltip] Simplify Tooltip statechart management #335

Merged

Conversation

Andarist
Copy link
Contributor

@Andarist Andarist commented Oct 24, 2019

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code (Compile and run).
  • Add or edit tests to reflect the change (Run with yarn test).
  • Add or edit Storybook examples to reflect the change (Run with yarn start).
  • Ensure formatting is consistent with the project's Prettier configuration.

This pull request:

  • Creates a new package
  • Fixes a bug in an existing package
  • Adds additional features/functionality to an existing package
  • Updates documentation or example code
  • Other

Description

By definition, statecharts ignore events for which they don't have defined transitions on the active state node. So it seems to me this is counterproductive to guard against "undefined" transitions at the event dispatch site. The main reason for that is that whenever you want to tweak your statechart definition you'd have to tweak your transition call sites too

This was previously submitted as #176 but that PR got closed because of housekeeping purposes. I still believe this change is valid and beneficial, so I'm resubmitting this.

@chaance chaance added the Type: Enhancement General improvements or suggestions label Oct 28, 2019
@Andarist
Copy link
Contributor Author

@chancestrickland friendly 🏓

@chaance chaance merged commit ddec7b3 into reach:master Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement General improvements or suggestions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants