Skip to content

Admin Page: Run class codemod on the admin page codebase#8714

Merged
oskosk merged 3 commits intomasterfrom
update/react-createclass
Feb 23, 2018
Merged

Admin Page: Run class codemod on the admin page codebase#8714
oskosk merged 3 commits intomasterfrom
update/react-createclass

Conversation

@oskosk
Copy link
Copy Markdown
Contributor

@oskosk oskosk commented Feb 1, 2018

Fixes more warnings about createclass usage.

Changes proposed in this Pull Request:

  • Runs the class codemod over _inc/client making 63 components not depend on React.createClass
  • Runs eslint --fix on the files

For simplicity, files unprocessed will be addressed by another PR.

Testing instructions:

  1. Check this branch
  2. Build the Admin Page (yarn build)
  3. Expect it to build properly.
  4. Visit the Admin Page. Expect to see no warnings about using createClass from the main React package. Accessing createClass via the main React package is deprecated, and will be removed in React v16.0. Use a plain JavaScript class instead. If you're not yet ready to migrate, create-react-class v15.* is available on npm as a temporary, drop-in replacement

Skipped files

_inc/client/components/gridicon/index.jsx: `Gridicon` was skipped because of inconvertible mixins.
_inc/client/components/info-popover/index.jsx: `` was skipped because of deprecated API calls. Remove calls to getDOMNode, isMounted, replaceProps, replaceState, setProps in your React component and re-run this script.
_inc/client/components/chart/legend.jsx: `LegendItem` was skipped because of inconvertible mixins.
_inc/client/components/count/index.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/external-link/index.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/form/input-checkbox-multiple.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/form/input-checkbox.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/form/input-hidden.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/form/input-radio.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/form/input-select.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/form/input-text.js: `` was skipped because of inconvertible mixins.
_inc/client/components/section-nav/index.jsx: `SectionNav` was skipped because `arguments` was found in your functions. Arrow functions do not expose an `arguments` object; consider changing to use ES6 spread operator and re-run this script.
_inc/client/components/button-group/docs/example.jsx: `Buttons` was skipped because of inconvertible mixins.
_inc/client/components/count/docs/example.jsx: `` was skipped because of inconvertible mixins.
_inc/client/components/section-nav/item.jsx: `NavItem` was skipped because of inconvertible mixins.
_inc/client/components/info-popover/docs/example.jsx: `InfoPopoverExample` was skipped because of inconvertible mixins.
_inc/client/components/popover/docs/example.jsx: `Popovers` was skipped because of inconvertible mixins.
_inc/client/components/search/docs/example.jsx: `SearchDemo` was skipped because of inconvertible mixins.
_inc/client/components/select-dropdown/docs/example.jsx: `SelectDropdownDemo` was skipped because of inconvertible mixins.
_inc/client/components/section-nav/docs/example.jsx: `SectionNavigation` was skipped because of inconvertible mixins.
_inc/client/components/spinner/docs/example.jsx: `` was skipped because of inconvertible mixins.

Changelog entry
We made Jetpack's Admin Page javascript code be fully compatible with React 16.
(this changelog entry will be shared among a few PRs.)

@oskosk oskosk force-pushed the update/react-createclass branch from df2c203 to b27c691 Compare February 16, 2018 20:27
@oskosk oskosk force-pushed the update/react-createclass branch from 65a13de to e706366 Compare February 16, 2018 20:58
@oskosk oskosk added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Feb 16, 2018
@oskosk oskosk added this to the 5.9 milestone Feb 16, 2018
Copy link
Copy Markdown
Contributor

@dereksmart dereksmart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected!

No problems building from scratch, and no warnings in the admin.

@dereksmart dereksmart added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Feb 21, 2018
@oskosk oskosk merged commit 6ea0464 into master Feb 23, 2018
@oskosk oskosk deleted the update/react-createclass branch February 23, 2018 13:10
oskosk added a commit that referenced this pull request Feb 27, 2018
oskosk added a commit that referenced this pull request Feb 27, 2018
* update changelog.txt

* Update readme.txt with scaffolding for 5.9 changelog and release draft shortlink

* Add changelog entry for #8243

* Add changelog entry for #8296

* Add changelog entry for #8367

* Add changelog entry for #8686

* Add changelog entry for #8707

* Add changelog entry for #8709 and #8714

* Add changelog entry for #8729

* Add changelog entry for #8777

* Add changelog entry for #8780

* Add changelog entry for #8786

* Add changelog entry for #8787

* Add changelog entry for #8801 #8805 #8832 #8865 and #8804

* Add changelog entry for #8817

* Add changelog entry for #8822

* Add changelog entry for #8823

* Add changelog entry for #8829

* Add changelog entry for #8834

* move some items to major enhancements

* Add changelog entry for #8836

* Add changelog entry for #8839

* Add changelog entry for #8861

* Add changelog entry for #8862

* Add changelog entry for #8863

* Add changelog entry for #8866

* Add changelog entry for #8870

* Add changelog entry for #8874

* Add changelog entry for #8875

* Add changelog entry for #8881

* Add changelog entry for #8890

* Add changelog entry for #8911

* Add changelog entry for #8927

* Add changelog entry for #8931

* Add changelog entry for #8933

* Add changelog entry for #8930

* fix wording

* typo

* minor fixes

* replace partner scripts for Jetpack Start in changelog entry

* Update to-test.md

* Update to-test.md

* minor style fixes to to-test.md

* minor style fixes to to-test.md

* minor fixes on to-test.md

* Add changelog entry for #8868

* Add changelog entry for #8844

* Add changelog entry for #8664

* Add changelog entry for #8935

* Add changelog entry for #8425

* Add changelog entry for #8625
@kraftbj kraftbj removed the [Status] Ready to Merge Go ahead, you can push that green button! label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Admin Page React-powered dashboard under the Jetpack menu [Type] Janitorial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants