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

FED-7 Move over uiJsComponent + tests #743

Merged
merged 31 commits into from
May 12, 2022
Merged

Conversation

sydneesampson-wk
Copy link
Contributor

Motivation

We want to expose uiJsComponent and an assortment of utilities so that other teams can easily wrap JS components.

Changes

Copy uiJsComponent and prop conversion utils to over_react
Copy tests to over_react

Release Notes

Review

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

Please review:

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

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

@aaronlademann-wf aaronlademann-wf marked this pull request as ready for review May 10, 2022 21:04
Co-authored-by: brianphillips-wk <brianphillips-wk@users.noreply.github.com>
@sydneesampson-wk sydneesampson-wk requested a review from a team May 10, 2022 21:07
@brianphillips-wk brianphillips-wk changed the title Fed-7 Move over uiJsComponent + tests FED-7 Move over uiJsComponent + tests May 10, 2022
@greglittlefield-wf
Copy link
Contributor

greglittlefield-wf commented May 11, 2022

I noted some weird test failures ultimately caused by WeakMap not initializing properly, causing issues where `_dartRefForJsRef` is used:
00:12 +1082 -1: [Chrome] test/over_react_util_test.dart: prop conversion utilities: jsifyRefProp converts Dart ref objects [E]                                                                         
  Error: object is not iterable (cannot read property Symbol(Symbol.iterator))
  unparsed                                                 at new WeakMap (<anonymous>)
  over_react_util_test.dart.browser_test.dart.js 60861:14  <fn>
  over_react_util_test.dart.browser_test.dart.js 107:35    Object.holder.<computed>
  over_react_util_test.dart.browser_test.dart.js 17124:16  Object.jsifyRefProp
  over_react_util_test.dart.browser_test.dart.js 51044:18  main____closure25.call$0
  over_react_util_test.dart.browser_test.dart.js 44088:53  <fn>
  over_react_util_test.dart.browser_test.dart.js 4446:15   _wrapJsFunctionForAsync_closure.$protected
  over_react_util_test.dart.browser_test.dart.js 22873:12  _wrapJsFunctionForAsync_closure.call$2
  over_react_util_test.dart.browser_test.dart.js 43094:21  StackZoneSpecification__registerBinaryCallback__closure.call$0
  over_react_util_test.dart.browser_test.dart.js 43014:16  StackZoneSpecification._stack_zone_specification$_run$1$2

Digging in...

Edit: fixed in 4329621

Also, cleanup: don't use `factory`, which doesn't seem to make a difference
but isn't what the docs say to use when instantiating non-anonymous objects.
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 thing around the use of style in tests (and some #nits, but don't forget that addressing those is optional), otherwise this looks good to go!

test/over_react/util/prop_conversion_test.dart Outdated Show resolved Hide resolved
test/over_react/util/prop_conversion_test.dart Outdated Show resolved Hide resolved
test/over_react/util/prop_conversion_test.dart Outdated Show resolved Hide resolved
lib/src/util/js_component.dart Show resolved Hide resolved
sydneesampson-wk and others added 3 commits May 11, 2022 10:38
Co-authored-by: Greg Littlefield <greg.littlefield@workiva.com>
Co-authored-by: Greg Littlefield <greg.littlefield@workiva.com>
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

@Workiva/release-management-p

Copy link
Contributor

@brianphillips-wk brianphillips-wk left a comment

Choose a reason for hiding this comment

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

+10

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

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.

6 participants