Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NO JIRA]: Updating propTypes package and fixing incorrect proptypes #2261

Merged
merged 4 commits into from Sep 10, 2021

Conversation

olliecurtis
Copy link
Member

This PR solves two things:

  • Upgrades propTypes to latest version to allow use of elementType prop (see more)
  • Fixed an issue where component props were being set as just func but in newer React versions its not strictly the case

Remember to include the following changes:

@github-actions
Copy link

github-actions bot commented Sep 8, 2021

Warnings
⚠️

Package source files (e.g. packages/package-name/src/Component.js) were updated, but snapshots weren't. Have you checked that the tests still pass?

Browser support

If this is a visual change, make sure you've tested it in multiple browsers,
particularly IE11.

Generated by 🚫 dangerJS against 06b40d7

@github-actions
Copy link

github-actions bot commented Sep 8, 2021

Visual regression tests passed 😎. Bear in mind that they only run in Chromium on static components – they aren't perfect.

@github-actions
Copy link

github-actions bot commented Sep 8, 2021

Visit https://backpack.github.io/storybook-prs/2261 to see this build running in a browser.

UNRELEASED.md Outdated Show resolved Hide resolved
@@ -75,8 +75,8 @@ const propTypes = {
loaderIntersectionTrigger: PropTypes.oneOf(['small', 'half', 'full']),
onScroll: PropTypes.func,
onScrollFinished: PropTypes.func,
renderLoadingComponent: PropTypes.func,
Copy link
Contributor

Choose a reason for hiding this comment

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

Both of these are actually treated as functions, not React components so this is not correct. That said I don't think there's a down side to start treating them as components

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yes I see, maybe it does make sense to keep it as that given how its used in comparios to other things

olliecurtis and others added 2 commits September 8, 2021 22:16
Co-authored-by: Hugo Tunius <h@tunius.se>
@@ -170,8 +170,8 @@ Updates the internal array and triggers all listeners.
| loaderMinDisplay | oneOf(['small', 'half', 'full']) | false | 'full' |
| onScroll | func | false | null |
| onScrollFinished | func | false | null |
| renderLoadingComponent | func | false | null |
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be changed back to func too

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Solved!

@olliecurtis olliecurtis merged commit 8d8e38b into main Sep 10, 2021
@olliecurtis olliecurtis deleted the no-jira-updating-proptypes branch September 10, 2021 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants