Skip to content

Conversation

@redallen
Copy link
Contributor

@redallen redallen commented Mar 11, 2019

What:

  • Upgrade and lock to React 16.8 across all projects.
  • Upgrade and lock to Enzyme 3.9.0.
  • Remove broken commitlint package since we no longer enforce semantic commits
  • Update some test selectors for new Enzyme-react adapter
  • Fix Gatsby by making it ignore *.d.ts files
  • Huge yarn.lock bump
  • Fix Avatar in Gatsby docs

Additional issues: Pf4 doc build is broken. Working with @jschuler to fix. Fixed

@codecov-io
Copy link

codecov-io commented Mar 11, 2019

Codecov Report

Merging #1541 into master will increase coverage by 0.2%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1541     +/-   ##
=========================================
+ Coverage   83.62%   83.82%   +0.2%     
=========================================
  Files         552      556      +4     
  Lines        5751     5856    +105     
  Branches       12       12             
=========================================
+ Hits         4809     4909    +100     
- Misses        940      945      +5     
  Partials        2        2
Flag Coverage Δ
#patternfly3 84.89% <ø> (ø) ⬆️
#patternfly4 81.4% <ø> (ø) ⬆️
#patternflymisc 95.65% <ø> (?)
Impacted Files Coverage Δ
test.env.js 100% <ø> (ø) ⬆️
...y-3/patternfly-react/src/common/closestPolyfill.js 81.81% <0%> (-9.1%) ⬇️
packages/react-icons/src/common.js 100% <0%> (ø)
packages/react-icons/src/createIcon.js 100% <0%> (ø)
packages/react-codemods/transforms/pf3-pf4.js 94.04% <0%> (ø)
packages/react-codemods/componentConfig.js 100% <0%> (ø)
...ernfly-3/patternfly-react/src/common/controlled.js 75% <0%> (+5%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4edacf0...db56c96. Read the comment docs.

@dgutride
Copy link
Member

@redallen - we'd like to get this tested with two other products to ensure there are no breaking changes. Also - what is left to get the do not merge label removed?

@redallen
Copy link
Contributor Author

All that's left is getting gatsby doc generation working. Weird typescript-related errors are occurring.

@redallen redallen changed the title [WIP] Update React 16.4 (mixed versions) to React 16.8 Update React 16.4 (mixed versions) to React 16.8 Mar 11, 2019
@patternfly-build
Copy link
Collaborator

PatternFly-React preview: https://1541-pr-patternfly-react-patternfly.surge.sh

@redallen redallen requested review from dlabaj and dmiller9911 March 11, 2019 21:21
@dgutride dgutride removed the request for review from dmiller9911 March 12, 2019 13:00
Copy link
Member

@dgutride dgutride left a comment

Choose a reason for hiding this comment

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

Generally - I think this looks good, mostly snapshot updates. In the future, it would be good to break these into much smaller PR's to ease reviewing. For instance - could we have only updated PF4 at this time - should we make sure any react dependencies are decoupled between pf3 and pf4 to allow them to move independently?

@patternfly-build
Copy link
Collaborator

PatternFly-React preview: https://1541-pr-patternfly-react-patternfly.surge.sh

dgutride
dgutride previously approved these changes Mar 12, 2019
/>
>
<Component />
</GenerateId>
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is a pre-existing problem, but we should probably revisit these snapshot tests later. A snapshot of a shallow render of something wrapped by GenerateId or ContextConsumer isn't accomplishing anything.

</Table>
</Section>
);
// {props.map(prop => (
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should avoid committing commented-out code, right?

Also, when trying to check the effects of removing this, I went to look at the props table for Avatar and on https://1541-pr-patternfly-react-patternfly.surge.sh/patternfly-4/components/avatar I'm getting a blank page with console errors:

TypeError: Cannot read property 'name' of null
    at getEnumValue (propsTable.js:68)
    at propsTable.js:53
    at Array.map (<anonymous>)
    at PropsTable (propsTable.js:49)
    at hg (react-dom.production.min.js:150)
    at Tg (react-dom.production.min.js:178)
    at bi (react-dom.production.min.js:232)
    at ci (react-dom.production.min.js:233)
    at Di (react-dom.production.min.js:249)
    at Yh (react-dom.production.min.js:248)
qh @ react-dom.production.min.js:198
react-dom.production.min.js:248 Uncaught TypeError: Cannot read property 'name' of null
    at getEnumValue (propsTable.js:68)
    at propsTable.js:53
    at Array.map (<anonymous>)
    at PropsTable (propsTable.js:49)
    at hg (react-dom.production.min.js:150)
    at Tg (react-dom.production.min.js:178)
    at bi (react-dom.production.min.js:232)
    at ci (react-dom.production.min.js:233)
    at Di (react-dom.production.min.js:249)
    at Yh (react-dom.production.min.js:248)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, that's a problem. @jschuler has found a way around it in #1539. For now I'll find a way to disable more functionality for the time being.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in latest commit by changing a little bit of Gatsby logic. New preview should deploy shortly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

New preview doesn't seem to have console errors for Avatar: https://1541-pr-patternfly-react-patternfly.surge.sh/patternfly-4/components/avatar

Copy link
Collaborator

@mturley mturley left a comment

Choose a reason for hiding this comment

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

This is great work @redallen, I especially love the scripts for converting components to TS! Just left a couple of minor comments.

Copy link
Contributor

@dlabaj dlabaj left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@mturley mturley left a comment

Choose a reason for hiding this comment

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

LGTM 🎉
Can't wait to build some stuff with Hooks.

@dgutride dgutride merged commit 86a4715 into master Mar 13, 2019
@redallen redallen deleted the chore/react-16.8 branch March 18, 2019 13:17
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.

7 participants