Closed
Bug 1410119
Opened 7 years ago
Closed 7 years ago
Inspector needs to use ES6 classes so that we can switch it over to PureComponent
Categories
(DevTools :: Inspector, enhancement, P2)
DevTools
Inspector
Tracking
(firefox58 fixed)
RESOLVED
FIXED
Firefox 58
Tracking | Status | |
---|---|---|
firefox58 | --- | fixed |
People
(Reporter: miker, Assigned: miker)
References
Details
Attachments
(1 file, 1 obsolete file)
No description provided.
Assignee | ||
Updated•7 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•7 years ago
|
||
This was an excellent sanity test for mozclass.js... it threw a bunch of errors:
../firefox/devtools/client/inspector/extensions/components/ExtensionSidebar.js: `ExtensionSidebar` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/extensions/components/ObjectTreeView.js: `ObjectTreeView` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/fonts/components/App.js: `App` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/fonts/components/Font.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/fonts/components/FontList.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/boxmodel/components/BoxModel.js: `` was skipped because of inconvertible mixins.
ERR ../firefox/devtools/client/inspector/layout/components/Accordion.js Transformation error
TypeError: Cannot read property 'forEach' of undefined
at NodePath.<anonymous> (/Users/ratcliffes/Desktop/moz-codemod/transforms/mozclass.js:467:11)
at __paths.forEach (/Users/ratcliffes/.config/yarn/global/node_modules/jscodeshift/src/Collection.js:76:36)
at Array.forEach (<anonymous>)
at Collection.forEach (/Users/ratcliffes/.config/yarn/global/node_modules/jscodeshift/src/Collection.js:75:18)
at changeRequireProps (/Users/ratcliffes/Desktop/moz-codemod/transforms/mozclass.js:464:10)
at module.exports (/Users/ratcliffes/Desktop/moz-codemod/transforms/mozclass.js:1218:5)
../firefox/devtools/client/inspector/boxmodel/components/BoxModelApp.js: `BoxModelApp` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/layout/components/App.js: `App` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/boxmodel/components/BoxModelEditable.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/boxmodel/components/BoxModelInfo.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/grids/components/Grid.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/grids/components/GridDisplaySettings.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/grids/components/GridItem.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/grids/components/GridList.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/boxmodel/components/BoxModelMain.js: `` was skipped because of inconvertible mixins.
ERR ../firefox/devtools/client/inspector/local-toolbox.js Transformation error
TypeError: Cannot read property 'forEach' of undefined
at NodePath.<anonymous> (/Users/ratcliffes/Desktop/moz-codemod/transforms/mozclass.js:467:11)
at __paths.forEach (/Users/ratcliffes/.config/yarn/global/node_modules/jscodeshift/src/Collection.js:76:36)
at Array.forEach (<anonymous>)
at Collection.forEach (/Users/ratcliffes/.config/yarn/global/node_modules/jscodeshift/src/Collection.js:75:18)
at changeRequireProps (/Users/ratcliffes/Desktop/moz-codemod/transforms/mozclass.js:464:10)
at module.exports (/Users/ratcliffes/Desktop/moz-codemod/transforms/mozclass.js:1218:5)
../firefox/devtools/client/inspector/grids/components/GridOutline.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/boxmodel/components/BoxModelProperties.js: `` was skipped because of inconvertible mixins.
../firefox/devtools/client/inspector/boxmodel/components/ComputedProperty.js: `` was skipped because of inconvertible mixins.
This is because of two bugs that are reasonably easy to fix but for the moment I have just worked around the issues.
I will build and fix any errors and then send a try run.
Comment hidden (mozreview-request) |
Assignee | ||
Comment 3•7 years ago
|
||
mozreview-review |
Comment on attachment 8920267 [details]
Bug 1410119 - Inspector: Switch to ES6 classes
https://reviewboard.mozilla.org/r/191286/#review196448
I fully expect ESLint failures from the try run but this is fixed in the NetMonitor bug... I might move it out to another but it is only a one liner.
Comment 4•7 years ago
|
||
mozreview-review |
Comment on attachment 8920267 [details]
Bug 1410119 - Inspector: Switch to ES6 classes
https://reviewboard.mozilla.org/r/191288/#review196620
::: devtools/client/inspector/boxmodel/components/BoxModel.js:78
(Diff revision 1)
> null
> );
> - },
> -});
> + }
> +}
> +
> +BoxModel.displayName = "BoxModel";
While some of these changes look fine, I would prefer to keep the displayName and props inside the class.
Attachment #8920267 -
Flags: review?(gl)
Assignee | ||
Comment 5•7 years ago
|
||
(In reply to Gabriel [:gl] (ΦωΦ) from comment #4)
> Comment on attachment 8920267 [details]
> Bug 1410119 - Inspector: Switch to ES6 classes
>
> https://reviewboard.mozilla.org/r/191288/#review196620
>
> ::: devtools/client/inspector/boxmodel/components/BoxModel.js:78
> (Diff revision 1)
> > null
> > );
> > - },
> > -});
> > + }
> > +}
> > +
> > +BoxModel.displayName = "BoxModel";
>
> While some of these changes look fine, I would prefer to keep the
> displayName and props inside the class.
This is a "feature" of ES6 classes in the current version of Firefox.
It is an ES6 class and they need to be static properties... sadly, Firefox doesn't support ES6 static properties so we can't do that.
pbro mentioned that there is some minified the process affected and it did something to tests so I will take a look at that.
Assignee | ||
Comment 6•7 years ago
|
||
mozreview-review-reply |
Comment on attachment 8920267 [details]
Bug 1410119 - Inspector: Switch to ES6 classes
https://reviewboard.mozilla.org/r/191288/#review196620
> While some of these changes look fine, I would prefer to keep the displayName and props inside the class.
This is a "feature" of ES6 classes in the current version of Firefox.
It is an ES6 class and they need to be static properties... sadly, Firefox doesn't support ES6 static properties so we can't do that.
Comment hidden (mozreview-request) |
Assignee | ||
Updated•7 years ago
|
Attachment #8920267 -
Attachment is obsolete: true
Comment hidden (mozreview-request) |
Comment 9•7 years ago
|
||
mozreview-review |
Comment on attachment 8921550 [details]
"Bug 1410119 - Inspector: Switch to ES6 classes "
https://reviewboard.mozilla.org/r/192560/#review198160
Attachment #8921550 -
Flags: review?(gl) → review+
Comment 10•7 years ago
|
||
Pushed by gabriel.luong@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d4b244f094b6
Inspector: Switch to ES6 classes r=gl
Comment 11•7 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
status-firefox58:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Assignee | ||
Updated•7 years ago
|
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•