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-9691 Improve HOC Errors #469

Merged
merged 8 commits into from
Feb 28, 2020
Merged

Conversation

joebingham-wk
Copy link
Contributor

@joebingham-wk joebingham-wk commented Feb 25, 2020

Motivation

Currently, wrapping a UiComponent in one of our HOC utilities (forwardRef, connect, connectFlux) will throw a cryptic error, and there's no mention of that on the utility doc comments.

Changes

  • Update the doc comments for connect, connectFlux, and forwardRef noting that the component being wrapped should extend Component2.
  • Add a utility that throws when a Component is passed in
  • Add tests

Release Notes

  • Ensure connect, connectFlux, and forwardRef fail gracefully when an invalid component gets passed in.

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:
@aaronlademann-wf @greglittlefield-wf @sydneyjodon-wk @willdrach-wk

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Client Platform member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

@joebingham-wk joebingham-wk changed the title Cplat 9691 improve hoc errors v2 CPLAT-9691 Improve HOC Errors Feb 25, 2020
@aviary-wf
Copy link

Security Insights

No security relevant content was detected by automated scans.

Action Items

  • Review PR for security impact; comment "security review required" if needed or unsure
  • Verify aviary.yaml coverage of security relevant code

Questions or Comments? Reach out on Slack: #support-infosec.

Copy link
Contributor

@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 one question

// original Dart component via the 'WrappedComponent` property.
if (instance.type != null && getProperty(instance.type, 'WrappedComponent') != null) {
instanceType = getProperty(instance.type, 'WrappedComponent');
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm, I just took this out; was this a bad merge conflict, or was this added back in intentionally?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, I definitely didn't mean to add that back in. Sorry about that!

Copy link
Contributor

@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.

+10

@joebingham-wk
Copy link
Contributor Author

@Workiva/release-management-p

Copy link

@rmconsole-wf rmconsole-wf left a comment

Choose a reason for hiding this comment

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

+1 from RM

@rm-astro-wf rm-astro-wf merged commit d8195eb into master Feb 28, 2020
@rm-astro-wf rm-astro-wf deleted the CPLAT-9691-improve-hoc-errors-v2 branch February 28, 2020 17:20
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.

5 participants