magento2-page-builder icon indicating copy to clipboard operation
magento2-page-builder copied to clipboard

Bug fixed when using the decimal number in slidesToShow.

Open nurullah opened this issue 2 years ago • 2 comments
trafficstars

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

  • [x] Pull request has a meaningful description of its purpose
  • [x] All commits are accompanied by meaningful commit messages
  • [ ] All new or changed code is covered with unit/integration tests (if applicable)
  • [ ] README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • [ ] All automated tests passed successfully (all builds are green)

nurullah avatar Feb 24 '23 08:02 nurullah

@magento run all tests

engcom-Hotel avatar Sep 13 '24 06:09 engcom-Hotel

@magento run Functional Tests B2B

engcom-Hotel avatar Sep 13 '24 10:09 engcom-Hotel

@magento run all tests

engcom-Hotel avatar Sep 26 '24 06:09 engcom-Hotel

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

engcom-Hotel avatar Sep 26 '24 09:09 engcom-Hotel

@magento run Functional Tests B2B

engcom-Hotel avatar Oct 01 '24 07:10 engcom-Hotel

:heavy_check_mark: QA Passed

Preconditions:

Implement Slick slider with Magento and enable PageBuilder

Manual testing scenario:

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

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

engcom-Hotel avatar Oct 01 '24 09:10 engcom-Hotel