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

Responsive carousel component #1045

Closed
wants to merge 23 commits into from
Closed

Conversation

juliansotuyo
Copy link
Contributor

Closes Issues

Code review checklist

Reviewer 1

  • Functions properly
  • Good readability, clarity and overall quality
  • Has tests
  • Has docs

Reviewer 2

  • Functions properly
  • Good readability, clarity and overall quality
  • Has tests
  • Has docs

@juliansotuyo juliansotuyo requested a review from alcferreira May 5, 2021 14:21
@coveralls
Copy link

coveralls commented May 5, 2021

Coverage Status

Coverage decreased (-1.0%) to 97.826% when pulling 39c49e4 on responsive-carousel-component into 436207a on master.

@juliansotuyo juliansotuyo force-pushed the responsive-carousel-component branch from 9c37327 to bc03a14 Compare May 20, 2021 13:42
Copy link
Contributor

@alcferreira alcferreira left a comment

Choose a reason for hiding this comment

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

Cool! Here are some points that I found out while testing it... Worth mentioning that I haven't reviewed the code just yet

  1. we should add a default value for qtyOfSlidesPerSet so it won't break the app when it's undefined
    image
  2. qtyOfSlidesPerSet won't work with a number, it only works with an array. When we pass a number, it always renders 2 slides per set
    image
  3. qtyOfSlidesPerSet doesn't seem to be working with an array set as well.. It seems like it always get the second item from the array and use it disregarding the screen size
  4. We should be able to customize some slide props like border-radius
  5. The arrow buttons should be small by default, right?
  6. Should we be able pass along left/right button on our own? Say we would like to pass a different icon or different button, should we be able to?
  7. Something is off with the infiniteLoop
    2021-06-02 09 51 53

@juliansotuyo juliansotuyo requested a review from alcferreira June 9, 2021 14:48
Comment on lines 24 to 25
leftButton,
rightButton,
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove ambiguity with leftButtonProps and rightButtonProps

Comment on lines 150 to 151
{...leftButton}
icon={leftButton?.icon || <SmChevronLeft size={24} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

if we pass props after the default props, we don't have to to this condition icon={leftButton?.icon || <SmChevronLeft size={24} />}

infiniteLoop: PropTypes.bool,
style: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),
Copy link
Contributor

Choose a reason for hiding this comment

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

why do we need a prop called style? 🤔

@juliansotuyo juliansotuyo requested a review from alcferreira June 14, 2021 17:50
juliansotuyo and others added 21 commits June 15, 2021 14:36
affects: @crave/farmblocks-carousel

BREAKING CHANGE:
add infinite scroll option; add number of slides displayed; add number of slides displayed by
breakpoints; remove imageSet prop; add slides prop that accepts an array of nodes; modify carousel
layout; add dots to navigate through slides; add arrows to navigate through slides

ISSUES CLOSED: #1043
… components

affects: @crave/farmblocks-carousel
…eparate component

affects: @crave/farmblocks-carousel
affects: @crave/farmblocks-carousel
affects: @crave/farmblocks-carousel
affects: @crave/farmblocks-carousel
affects: @crave/farmblocks-carousel
affects: @crave/farmblocks-carousel
…window hook

affects: @crave/farmblocks-carousel
juliansotuyo and others added 2 commits June 15, 2021 14:36
affects: @crave/farmblocks-carousel
affects: @crave/farmblocks-carousel
@juliansotuyo juliansotuyo force-pushed the responsive-carousel-component branch from 4da8eb4 to 39c49e4 Compare June 15, 2021 17:37
@alcferreira
Copy link
Contributor

We will work on another version of this component soon

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.

Carousel component
3 participants