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

feat: honor displayName of context types #18224

Merged
merged 3 commits into from Mar 5, 2020

Conversation

@eps1lon
Copy link
Collaborator

@eps1lon eps1lon commented Mar 5, 2020

Summary

New iteration of #18035 which had to be reverted (#18223) since setting Context.Consumer.displayName would throw.

Setting Context.Consumer.displayName ignores the given value but emits warning. As far as I can tell this doesn't do anything on master: https://codesandbox.io/s/priceless-hooks-lm0ky

Test Plan

@trueadm should sign this off since this affects internal tests. If a warning is still too loud we could put it behind a flag that we turn off for the fb builds.

@codesandbox
Copy link

@codesandbox codesandbox bot commented Mar 5, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2176e6d:

Sandbox Source
ancient-breeze-vjpd0 Configuration
Context.Consumer.displayName PR
@sizebot
Copy link

@sizebot sizebot commented Mar 5, 2020

Details of bundled changes.

Comparing: 3ee812e...2176e6d

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js +0.7% +0.5% 99.63 KB 100.31 KB 24.51 KB 24.65 KB UMD_DEV
react.production.min.js 0.0% 0.0% 11.59 KB 11.59 KB 4.56 KB 4.56 KB UMD_PROD
react.profiling.min.js 0.0% 0.0% 15.13 KB 15.13 KB 5.67 KB 5.68 KB UMD_PROFILING
react.development.js +1.1% +0.8% 61.49 KB 62.14 KB 16.79 KB 16.92 KB NODE_DEV
react.production.min.js 0.0% 0.0% 6.53 KB 6.53 KB 2.65 KB 2.65 KB NODE_PROD
React-dev.js +0.9% +0.6% 74.61 KB 75.3 KB 18.95 KB 19.07 KB FB_WWW_DEV
React-prod.js 0.0% 0.0% 17.69 KB 17.69 KB 4.56 KB 4.56 KB FB_WWW_PROD
React-profiling.js 0.0% 0.0% 17.69 KB 17.69 KB 4.56 KB 4.56 KB FB_WWW_PROFILING

React: size: 0.0%, gzip: 0.0%

Size changes (stable)

Generated by 🚫 dangerJS against 2176e6d

@sizebot
Copy link

@sizebot sizebot commented Mar 5, 2020

Details of bundled changes.

Comparing: 3ee812e...2176e6d

react

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react.development.js +0.6% +0.5% 107.52 KB 108.2 KB 25.72 KB 25.85 KB UMD_DEV
react.production.min.js 0.0% 0.0% 12.45 KB 12.45 KB 4.8 KB 4.8 KB UMD_PROD
react.profiling.min.js 0.0% 0.0% 15.98 KB 15.98 KB 5.88 KB 5.88 KB UMD_PROFILING
react.development.js +0.9% +0.6% 69.02 KB 69.67 KB 18 KB 18.11 KB NODE_DEV
react.production.min.js 0.0% 0.0% 7.5 KB 7.5 KB 2.9 KB 2.9 KB NODE_PROD
React-dev.js +0.9% +0.7% 73.93 KB 74.62 KB 18.77 KB 18.89 KB FB_WWW_DEV
React-prod.js 0.0% 0.0% 17.63 KB 17.63 KB 4.55 KB 4.55 KB FB_WWW_PROD
React-profiling.js 0.0% 0.0% 17.63 KB 17.63 KB 4.55 KB 4.55 KB FB_WWW_PROFILING

React: size: 0.0%, gzip: 0.0%

Size changes (experimental)

Generated by 🚫 dangerJS against 2176e6d

@bvaughn
bvaughn approved these changes Mar 5, 2020
Copy link
Contributor

@bvaughn bvaughn left a comment

This looks better to me, but cc @trueadm to make sure I'm not overlooking something about this internal case.

@bvaughn bvaughn requested a review from trueadm Mar 5, 2020
@bvaughn
Copy link
Contributor

@bvaughn bvaughn commented Mar 5, 2020

I ran a local sync on this version and verified that the internal test the previous PR broke passes now.

@bvaughn bvaughn merged commit d35f8a5 into facebook:master Mar 5, 2020
23 checks passed
23 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: build_devtools_and_process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: build_experimental Your tests passed on CircleCI!
Details
ci/circleci: flow Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: lint_build Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts Your tests passed on CircleCI!
Details
ci/circleci: process_artifacts_experimental Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: sizebot Your tests passed on CircleCI!
Details
ci/circleci: sizebot_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_build Your tests passed on CircleCI!
Details
ci/circleci: test_build_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod Your tests passed on CircleCI!
Details
ci/circleci: test_build_prod_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_devtools Your tests passed on CircleCI!
Details
ci/circleci: test_dom_fixtures Your tests passed on CircleCI!
Details
ci/circleci: test_source Your tests passed on CircleCI!
Details
ci/circleci: test_source_experimental Your tests passed on CircleCI!
Details
ci/circleci: test_source_persistent Your tests passed on CircleCI!
Details
ci/circleci: test_source_prod Your tests passed on CircleCI!
Details
ci/circleci: test_source_prod_experimental Your tests passed on CircleCI!
Details
ci/codesandbox Building packages succeeded.
Details
@eps1lon eps1lon deleted the eps1lon:fix/context-displayname branch Mar 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.