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

Update types and documentation regarding isIntrinsicHeight #358

Closed
wants to merge 2 commits into from
Closed

Update types and documentation regarding isIntrinsicHeight #358

wants to merge 2 commits into from

Conversation

ppozniak
Copy link

@ppozniak ppozniak commented Apr 6, 2021

What:
#356

Update types to make naturalSlideWidth and height optional when isIntrensicHeight is true

Why:
To avoid confusion and do not force user to set props that are not needed in certain situations.

How:
Changes to documentation, TS typings and PropTypes

Additionally I've deleted unused custom prop type height

Checklist:

  • Documentation added/updated
  • Typescript definitions updated
  • Tests added and passing
  • Ready to be merged

@@ -15,8 +15,10 @@ const Slide = class Slide extends React.PureComponent {
index: PropTypes.number.isRequired,
innerClassName: PropTypes.string,
innerTag: PropTypes.string,
naturalSlideHeight: PropTypes.number.isRequired,
naturalSlideWidth: PropTypes.number.isRequired,
/* eslint-disable react/require-default-props */
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a question, is there a way to accomplish this without ignoring the rule?

Copy link
Author

Choose a reason for hiding this comment

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

Not sure to be honest. I am pretty sure I tried, but basically CarouselPropTypes.slideSize can be either optional or required and eslint struggles with that.
But the main takeaway is that:

  • If it's required, then it doesn't need default props
  • If it's optional, then default doesn't need to be anything as it can be undefined (it doesn't matter)

@stale
Copy link

stale bot commented Jun 11, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issues that became stale label Jun 11, 2021
@stale
Copy link

stale bot commented Jun 26, 2021

This issue has been automatically closed becuase it has not had recent activity.

@stale stale bot closed this Jun 26, 2021
@ppozniak
Copy link
Author

ppozniak commented Jul 2, 2021

Could we reopen? :) Don't want my work to go for nothing please

@Conor-Hinchee
Copy link
Collaborator

@ppozniak Thanks for the call out. I am re-opening this PR and it is on my to-do list. Sorry for the delays.

@Conor-Hinchee Conor-Hinchee reopened this Jul 2, 2021
@stale stale bot removed the stale Issues that became stale label Jul 2, 2021
@stale
Copy link

stale bot commented Jul 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issues that became stale label Jul 21, 2021
@stale
Copy link

stale bot commented Sep 22, 2021

This issue has been automatically closed becuase it has not had recent activity.

@stale stale bot closed this Sep 22, 2021
@kilinkis
Copy link

should this be re opened? @captnstarburst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issues that became stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants