Skip to content

FED-3283: React 18 js files #414

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 58 commits into from
Apr 17, 2025
Merged

FED-3283: React 18 js files #414

merged 58 commits into from
Apr 17, 2025

Conversation

kealjones-wk
Copy link
Collaborator

@kealjones-wk kealjones-wk commented Mar 25, 2025

aaronlademann-wf and others added 30 commits April 1, 2022 08:30
NOTES: Context’s calculateChangedBits was removed or altered… not sure which.
 Conflicts:
	build.yaml
	example/test/unmount_test.dart
	lib/react_client/react_interop.dart
	lib/react_test_utils.dart
	lib/src/react_client/dart2_interop_workaround_bindings.dart
	lib/src/react_client/private_utils.dart
Remove/repurpose console.warning wrapper that's no longer needed
(see previous commit).
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.

This looks amazing! Just one tiny comment on the README.

Didn't get a chance to QA, but I can do that next week!

Comment on lines -4 to -7
mockito:mockBuilder:
# Scope only to files declaring mocks, for performance.
generate_for:
- test/mockito.dart
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like this got left behind from when we switched to mocktail; thanks for cleaning this up!

@@ -57,7 +57,7 @@ void validateJsApi() {
registerComponent2(() => _DummyComponent2());
_isJsApiValid = true;
Copy link
Collaborator

Choose a reason for hiding this comment

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

#idea One thing I was thinking of that would be helpful for QAing this PR, but also would be helpful in consumer repos. While we have this dual-version setup, it might be nice to log the version of React being used so we can easily validate what tests are running with

Unfortunately just a console.log in the JS bundle won't make its way to the Dart test output, and it needs to be a print statement triggered from a test Zone.

I was just thinking, that most usages of this package indirectly call this function pretty early on, and this might actually be a good place to stick it... For example:

    if (inReactDevMode) print('React version: ${React.version}');
    _isJsApiValid = true;

That might need a little more discovery and could be done in a follow-up though. Hmm yeah and thinking about it, one downside is it would get logged for every test file that gets run, which might not be ideal...

Yeahh maybe we do that as a follow-up haha

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.

  • Changes look good
    • React-redux version matches between yarn.lock/pnpm.lock - upgrading this requires a separate effort
    • No changes to existing (React 17) JS files
  • JS assets and lockfile are up to date
  • Dual version-testing setup
    • Verified tests run with the correct versions
    • Verified test presets work and fail correctly when the wrong version is being used
  • over_react CI passes when consuming React 18 assets (along with RTL dual-support branch): Test consume react-dart dual support (force React 18) over_react#977
  • Examples look good

+10

Copy link

@mitchellsharma-wk mitchellsharma-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

@greglittlefield-wf
Copy link
Collaborator

@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

@btr-rmconsole-3 btr-rmconsole-3 bot merged commit 203659a into master Apr 17, 2025
6 checks passed
@btr-rmconsole-3 btr-rmconsole-3 bot deleted the FED-3283-dual-support branch April 17, 2025 22:25
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.

7 participants