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

CPLAT-12688 Add synthetic Event Utils to master #282

Merged
merged 17 commits into from
Nov 6, 2020

Conversation

joebingham-wk
Copy link
Collaborator

@joebingham-wk joebingham-wk commented Nov 5, 2020

To prepare for React 17, there needs to be APIs that abstract the creation of SyntheticEvents so that we can remove dependence on the event class constructors.

Changes

  • Add a createSynthetic{eventClass} function for every synthetic event type that allows consumers to create an empty instance, set specific properties on an instance, or merge an instance with new properties
  • Add a simple test for every API to ensure that the getters / setters and merge logic is working as expected

QA

  • Review that tests correctly test getting and setting
  • Verify consumer examples of using the APIs work as expected (passing CI should be sufficient)

lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
@joebingham-wk joebingham-wk changed the title CPLAT-12665 Add synthetic Event Utils to master CPLAT-12688 Add synthetic Event Utils to master Nov 6, 2020
@joebingham-wk
Copy link
Collaborator Author

joebingham-wk commented Nov 6, 2020

For CI, Dart 2.10.x fails on the formatting step - my understanding is that this was known and ignored for now. Let me know if there is something to do there though!

Copy link
Collaborator

@greglittlefield-wf greglittlefield-wf 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 couple more small things; this is looking great!

lib/react.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
lib/src/react_client/event_helpers.dart Outdated Show resolved Hide resolved
Copy link
Collaborator

@sydneyjodon-wk sydneyjodon-wk 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 couple small questions.

test/react_client/event_helpers_test.dart Outdated Show resolved Hide resolved
test/react_client/event_helpers_test.dart Outdated Show resolved Hide resolved
test/react_client/event_helpers_test.dart Outdated Show resolved Hide resolved
Copy link
Collaborator

@sydneyjodon-wk sydneyjodon-wk left a comment

Choose a reason for hiding this comment

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

+1 on 25718c7 and 02e3b49

QA in progress..

@sydneyjodon-wk
Copy link
Collaborator

QA+1 Everything looks great!

  • Review that tests correctly test getting and setting
  • Verify consumer examples of using the APIs work as expected (passing CI should be sufficient)

@joebingham-wk
Copy link
Collaborator Author

Verified CI failed due to that same Dart 2.10.x formatting step!

@joebingham-wk joebingham-wk marked this pull request as ready for review November 6, 2020 22:48
@joebingham-wk joebingham-wk merged commit 6285464 into master Nov 6, 2020
@joebingham-wk joebingham-wk deleted the CPLAT-12665-synthetic-event-utils branch November 6, 2020 22:48
@joebingham-wk joebingham-wk mentioned this pull request Nov 9, 2020
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.

3 participants