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-ci
Copy link

codesandbox-ci 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 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 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

Copy link
Contributor

@bvaughn bvaughn 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 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 March 5, 2020 17:20
@bvaughn
Copy link
Contributor

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.

This was referenced Mar 15, 2021
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.

4 participants