Devtools:-Removed unused CSS#27032
Conversation
| element.isStrictModeNonCompliant | ||
| ? styles.StrictModeNonCompliantComponent | ||
| : styles.Component | ||
| element.isStrictModeNonCompliant ? undefined : styles.Component |
There was a problem hiding this comment.
I believe there was a typo in #22886
so the right fix would be:
| element.isStrictModeNonCompliant ? undefined : styles.Component | |
| element.isStrictModeNonCompliant ? styles.StrictModeNonCompliant : styles.Component |
could you please update and verify that?
Other changes are fine, maybe we should explore supporting this eslint rule for react-devtools-* packages.
There was a problem hiding this comment.
@hoxyq i thought of supporting the same, but the library is an unmaintained one, the last update was 4 years ago.? is it fine to use such library ?
There was a problem hiding this comment.
yes you are correct, it was a small typo!
There was a problem hiding this comment.
What library are you referring to there? Sorry, didn't get that
There was a problem hiding this comment.
Oh, you mean eslint plugin. Maybe there is a maintained one, which has the same purpose?
There was a problem hiding this comment.
ok @hoxyq meanwhile we can merge this one if its okay and let me research if there is something similar :-)
List of changes: * Devtools:-Removed unused CSS ([Biki-das](https://github.com/Biki-das) in [#27032](#27032)) * fix[devtools/profilingCache-test]: specify correct version gate for test ([hoxyq](https://github.com/hoxyq) in [#27008](#27008)) * fix[devtools/ci]: fixed incorrect condition calculation for @reactVersion annotation ([hoxyq](https://github.com/hoxyq) in [#26997](#26997)) * fix[ci]: fixed jest configuration not to skip too many devtools tests ([hoxyq](https://github.com/hoxyq) in [#26955](#26955)) * fix[devtools/standalone]: update webpack configurations ([hoxyq](https://github.com/hoxyq) in [#26963](#26963)) * fix[devtools]: check if fiber is unmounted before trying to highlight ([hoxyq](https://github.com/hoxyq) in [#26983](#26983)) * feat[devtools]: support x_google_ignoreList source maps extension ([hoxyq](https://github.com/hoxyq) in [#26951](#26951)) * chore[devtools]: upgrade to webpack v5 ([hoxyq](https://github.com/hoxyq) in [#26887](#26887)) * fix[devtools]: display NaN as string in values ([hoxyq](https://github.com/hoxyq) in [#26947](#26947)) * fix: devtools cannot be closed correctly ([Jack-Works](https://github.com/Jack-Works) in [#25510](#25510)) * Fix:- Fixed dev tools inspect mode on Shadow dom ([Biki-das](https://github.com/Biki-das) in [#26888](#26888)) * Updated copyright text to Copyright (c) Meta Platforms, Inc. and its … ([denmo530](https://github.com/denmo530) in [#26830](#26830)) * Fix strict mode badge URL ([ibrahemid](https://github.com/ibrahemid) in [#26825](#26825))
Fixes #49409 ### React upstream changes - react/react#27045 - react/react#27051 - react/react#27032 - react/react#27031 - react/react#27029 - react/react#27028 - react/react#27027 - react/react#27019 - react/react#26954 - react/react#26987 - react/react#26985 - react/react#26933 - react/react#26625 - react/react#27011 - react/react#27008 - react/react#26997 - react/react#26989 - react/react#26955 - react/react#26963 - react/react#26983 - react/react#26914 - react/react#26951 - react/react#26977 - react/react#26958 - react/react#26940 - react/react#26939 - react/react#26887 - react/react#26947 - react/react#26945 - react/react#26942 - react/react#26938 - react/react#26844 - react/react#25510 - react/react#26932 - react/react#26896 - react/react#26913 - react/react#26888 - react/react#26827 - react/react#26889 - react/react#26877 - react/react#26873 - react/react#26880 - react/react#26842 - react/react#26858 - react/react#26754 - react/react#26753 - react/react#26881 --------- Co-authored-by: Jiachi Liu <inbox@huozhi.im>
I tried to check out for the CSS bundle using the [eslint-plugin-css-modules](https://www.npmjs.com/package/eslint-plugin-css-modules), and ran it locally , seems like There are lot of unused styles and classes present . I have attached the output below after running the lint command. https://gist.github.com/Biki-das/647ceb7383b43cca9c8619e1dc33fe0d All the shared.css files should not be touched i feel as they are being used randomly by some file Thoughts @hoxyq
List of changes: * Devtools:-Removed unused CSS ([Biki-das](https://github.com/Biki-das) in [react#27032](react#27032)) * fix[devtools/profilingCache-test]: specify correct version gate for test ([hoxyq](https://github.com/hoxyq) in [react#27008](react#27008)) * fix[devtools/ci]: fixed incorrect condition calculation for @reactVersion annotation ([hoxyq](https://github.com/hoxyq) in [react#26997](react#26997)) * fix[ci]: fixed jest configuration not to skip too many devtools tests ([hoxyq](https://github.com/hoxyq) in [react#26955](react#26955)) * fix[devtools/standalone]: update webpack configurations ([hoxyq](https://github.com/hoxyq) in [react#26963](react#26963)) * fix[devtools]: check if fiber is unmounted before trying to highlight ([hoxyq](https://github.com/hoxyq) in [react#26983](react#26983)) * feat[devtools]: support x_google_ignoreList source maps extension ([hoxyq](https://github.com/hoxyq) in [react#26951](react#26951)) * chore[devtools]: upgrade to webpack v5 ([hoxyq](https://github.com/hoxyq) in [react#26887](react#26887)) * fix[devtools]: display NaN as string in values ([hoxyq](https://github.com/hoxyq) in [react#26947](react#26947)) * fix: devtools cannot be closed correctly ([Jack-Works](https://github.com/Jack-Works) in [react#25510](react#25510)) * Fix:- Fixed dev tools inspect mode on Shadow dom ([Biki-das](https://github.com/Biki-das) in [react#26888](react#26888)) * Updated copyright text to Copyright (c) Meta Platforms, Inc. and its … ([denmo530](https://github.com/denmo530) in [react#26830](react#26830)) * Fix strict mode badge URL ([ibrahemid](https://github.com/ibrahemid) in [react#26825](react#26825))
I tried to check out for the CSS bundle using the [eslint-plugin-css-modules](https://www.npmjs.com/package/eslint-plugin-css-modules), and ran it locally , seems like There are lot of unused styles and classes present . I have attached the output below after running the lint command. https://gist.github.com/Biki-das/647ceb7383b43cca9c8619e1dc33fe0d All the shared.css files should not be touched i feel as they are being used randomly by some file Thoughts @hoxyq DiffTrain build for commit 53ac219.
List of changes: * Devtools:-Removed unused CSS ([Biki-das](https://github.com/Biki-das) in [#27032](react/react#27032)) * fix[devtools/profilingCache-test]: specify correct version gate for test ([hoxyq](https://github.com/hoxyq) in [#27008](react/react#27008)) * fix[devtools/ci]: fixed incorrect condition calculation for @reactVersion annotation ([hoxyq](https://github.com/hoxyq) in [#26997](react/react#26997)) * fix[ci]: fixed jest configuration not to skip too many devtools tests ([hoxyq](https://github.com/hoxyq) in [#26955](react/react#26955)) * fix[devtools/standalone]: update webpack configurations ([hoxyq](https://github.com/hoxyq) in [#26963](react/react#26963)) * fix[devtools]: check if fiber is unmounted before trying to highlight ([hoxyq](https://github.com/hoxyq) in [#26983](react/react#26983)) * feat[devtools]: support x_google_ignoreList source maps extension ([hoxyq](https://github.com/hoxyq) in [#26951](react/react#26951)) * chore[devtools]: upgrade to webpack v5 ([hoxyq](https://github.com/hoxyq) in [#26887](react/react#26887)) * fix[devtools]: display NaN as string in values ([hoxyq](https://github.com/hoxyq) in [#26947](react/react#26947)) * fix: devtools cannot be closed correctly ([Jack-Works](https://github.com/Jack-Works) in [#25510](react/react#25510)) * Fix:- Fixed dev tools inspect mode on Shadow dom ([Biki-das](https://github.com/Biki-das) in [#26888](react/react#26888)) * Updated copyright text to Copyright (c) Meta Platforms, Inc. and its … ([denmo530](https://github.com/denmo530) in [#26830](react/react#26830)) * Fix strict mode badge URL ([ibrahemid](https://github.com/ibrahemid) in [#26825](react/react#26825)) DiffTrain build for commit react/react@035a41c.
I tried to check out for the CSS bundle using the eslint-plugin-css-modules, and ran it locally , seems like There are lot of unused styles and classes present .
I have attached the output below after running the lint command.
https://gist.github.com/Biki-das/647ceb7383b43cca9c8619e1dc33fe0d
All the shared.css files should not be touched i feel as they are being used randomly by some file
Thoughts @hoxyq