Closed Bug 1411904 Opened 2 years ago Closed 2 years ago

[meta] Move tools from createClass to ES6 classes, PropTypes, dom-factories and React.TestUtils so that we can switch to React 16

Categories

(DevTools :: General, enhancement, P2)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: miker, Assigned: miker)

References

(Blocks 1 open bug)

Details

(Keywords: meta)

Aside from the benefits that PureComponent would bring us, this will move us much closer to being able to use React 16, which brings large performance gains (it renders 30% - 300% faster).
Folders containing old style components:

  - devtools/client/aboutdebugging/components/tabs/
  - devtools/client/aboutdebugging/components/
  - devtools/client/aboutdebugging/components/addons/
  - devtools/client/aboutdebugging/components/workers/

  - devtools/client/memory/components/
  - devtools/client/memory/

  - devtools/client/framework/components/

  - devtools/client/shared/components/
  - devtools/client/shared/components/tabs/
  - devtools/client/shared/components/tree/
  - devtools/client/shared/components/test/mochitest/
  - devtools/client/shared/components/splitter/
  - devtools/client/shared/components/reps/

  - devtools/client/dom/content/components/
  - devtools/client/performance/components/
  - devtools/client/jsonview/components/
  - devtools/client/jsonview/components/reps/
  - devtools/client/responsive.html/components/
  - devtools/client/responsive.html/

  - devtools/client/inspector/test/browser_inspector_addSidebarTab.js
  - devtools/client/debugger/new/debugger.js

Github repos that still contain old components (or references to those components):

  - https://github.com/devtools-html/debugger.html
  - https://github.com/devtools-html/devtools-core
Current Peers for review:

    about:debugging: jdescottes, ochameau
    Animation Inspector: gl, pbro, daisuke
    Canvas Debugger: <unmaintained>
    Console: bgrins, nchevobbe
    Debugger: jlast
    Developer Toolbar: jwalker, mikeratcliffe
    DOM: honza
    Framework: Browser integration, toolbox and test infrastructure: jryans, bgrins, ochameau, honza
    Inspector: gl, pbro, zer0, jdescottes, tromey
    JSON Viewer: honza
    Memory: gregtatum
    Network Monitor: honza, rickychien, gasolin
    Performance: gregtatum
    Remote protocol and server infrastructure: jryans, ochameau
    Responsive Design Mode: jryans, zer0
    Scratchpad: jdescottes
    Shader Editor: <unmaintained>
    Style Editor: gl
    Storage Inspector: mikeratcliffe
    Themes: bgrins, ntim
    Web Audio Editor: <unmaintained>
    WebIDE: jryans, ochameau
getInitialState() is not allowed in ES6 React Components and if it is called explicitly from another method the conversion will fail.

It is simple to workaround but for the sake of consistency I think this is our best option:

```
constructor(props) {
  super(props);

  this.state = this.initialState;
}

get initialState() {
  return {
    workers: {
      service: [],
      shared: [],
      other: []
    },
    processCount: 1,
  };
}

someOtherMethod() {
  let workers = this.initialState.workers;
  ...
}
```
No longer depends on: 1419487
Summary: [meta] Move tools from createClass to ES6 classes so that we can switch it over to PureComponent → [meta] Move tools from createClass to ES6 classes, PropTypes and dom-factories so that we can switch to React 16
Summary: [meta] Move tools from createClass to ES6 classes, PropTypes and dom-factories so that we can switch to React 16 → [meta] Move tools from createClass to ES6 classes, PropTypes, dom-factories and React.TestUtils so that we can switch to React 16
All dependencies satisfied.
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
No longer depends on: 1420130
where are the commits for this bug?
(In reply to Jens Hausdorf from comment #5)
> where are the commits for this bug?

Meta bugs are for tracking other bugs but the do not contain any commits.
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.