magento / magento2-page-builder

Magento2 PageBuilder
Other
79 stars 59 forks source link

Bug fixed when using the decimal number in slidesToShow. #845

Open nurullah opened 1 year ago

nurullah commented 1 year ago

Description (*)

Slick slider unofficially enables the use of decimal point in the slidesToShow attribute. When we define the 5.2 to the slidesToShow attribute, slick slider will show the 5 items and the 20 percent of 6 item. But we need to use undecimal number in the slidesToScroll parameter. Otherwise, the slider will miscalculate. This pull request aims to solve this problem.

image

Manual testing scenarios (*)

  1. Set the default slidesToShow variable 4.5 in the view.xml (https://developer.adobe.com/commerce/frontend-core/page-builder/viewports/use-breakpoints/)
  2. See the products slider will show the 4 product items and half of 5 product item.
  3. Make sure it looks right when the slider moves to the next element.

Checklist

engcom-Hotel commented 3 weeks ago

@magento run all tests

engcom-Hotel commented 3 weeks ago

@magento run Functional Tests B2B

engcom-Hotel commented 1 week ago

@magento run all tests

engcom-Hotel commented 1 week ago

@magento run Functional Tests B2B, Integration Tests, Performance Acceptance Tests, Static Tests, Unit Tests

engcom-Hotel commented 3 days ago

@magento run Functional Tests B2B

engcom-Hotel commented 3 days ago

:heavy_check_mark: QA Passed

Preconditions:

Implement Slick slider with Magento and enable PageBuilder

Manual testing scenario:

Actual Result: :heavy_check_mark: The slider should accept and show the allowed number of images in the slider.

After: :heavy_check_mark:
According to changes in this PR, this will accept only integer values not decimal values.

Before: :heavy_multiplication_x: The slick slider unofficially enables decimal points in the slidesToShow attribute. When we define the 5.2 to the slidesToShow attribute, the slick slider will show 5 items and 20 percent of 6 items. But we need to use undecimal numbers in the slidesToScroll parameter. Otherwise, the slider will miscalculate. This pull request aims to solve this problem.

The Failed B2B test is flaky, past 2 consecutive runs, the build failures are different:

image

image

Hence moving to merge in progress.

Thanks