question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Card section carousel] Discuss how to avoid adoptors setting too large number of cards per page

See original GitHub issue

The problem

While <dds-carousel> sets the default number of cards per page that best suits the available viewport width, <dds-carousel> also allows our adaptors to specify arbitrary number of cards per page, via page-size attribute. It caused weird UI caused by extreme page-size, as #4918 and #4919 reports.

The solution

This issue is to discuss how to prevent such misconfiguration. A couple of options I can rattle off are:

  1. Define the maximum number of cards per page for different breakpoints, and ignore any page-size attribute value that exceeds that maximum number
  2. Define several sets of number of cards per page (see below) and have adaptors use such set instead of having them directly set the page size

(Just example of 2., the actual numbers should be determined by design team)

Configuration Number of cards per page for sm breakpoint md lg
SMALL 2 4 6
DEFAULT 1 2 3
LARGE 1 1 2

CC @jeffchew @kennylam @oliviaflory

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
oliviaflorycommented, Jan 21, 2021

I think so @asudoh, and based on our explorations above, the maximum number or cards per page doesn’t exceed 4 (in desktop) at this point.

1reaction
JennySanchezcommented, Mar 1, 2021

FYI: @asudoh Adding this conversation to the “DDS Team Huddle 2021-03-02” for group discussion

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web & React: Card Carousel - On Mobile, "Page size" as 6 ...
On Mobile, "Page size" as 6, user can not see all the cards and ... [Card section carousel] Discuss how to avoid adoptors...
Read more >
Card Carousel Bootstrap 5 - YouTube
This video shows how to create a Bootstrap 5 carousel /slider with multiple items.Timestamps:0:00 - Final Output0:09 - Channel Intro0:13 ...
Read more >
Sizing - Lightning Design System
This will make each card take up 33.333% of containing section. Our sizing helpers have the option to be responsive. By pre-pending a...
Read more >
Creating slider or carousel sections | Acquia Cohesion Docs
Using cards within the Slider sections ... To use Card components within the Slider sections, you first need to add a Card slide...
Read more >
Why don't the Homepage Carousel images display properly?
You have uploaded images to your Homepage Carousel, but they are not displaying on the home page. You might see the transition indicator...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found