-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add a grid mode to the carousel macro #8369
add a grid mode to the carousel macro #8369
Conversation
Awesome! Thanks for this @davidscotson . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested IE and iOS 9 and flex-wrap fixed the non-grid support. Used https://testing.openlibrary.org/collections/tv-people-books
I think @cdrini wants to take this one. A few points to consider:
|
@mekarpeles and @cdrini There are definitely series that have more than 20 books in them, so a load more or the ability to adjust how many are displayed would be great. Thanks |
Regarding the load_more stuff, is there really any notable performance difference if you load 40 or even 60 or 80 items from a list? My gut reaction is there isn't likely to be. So if there is a default for when load_more kicks in I'd assume it should be higher than the carousel default (where multiple carousels per page are common and only 6 are viewable until the user interacts). I'm assuming it's the equivalent of a single DB call on the server side, though that is just an assumption. The images are already marked as I'm assuming the main use of this is for individual pages with long lists, but my gut is feeling like a default limit of 100 that loads in one go would cover almost everything and once you go above that you want a whole different interface anyway. I'll see if I can come up with any tests to prove or disprove my intuition on this. |
I tried testing here https://testing.openlibrary.org/collections/100-best-mystery-and-thriller-books-of-all-time but it seems to have got my first edit with a limit of 20 stuck in a cache or something, as it's ignoring my later edits to try different amounts or any other text change. edit: worked around it by specifying a version in the url: https://testing.openlibrary.org/collections/100-best-mystery-and-thriller-books-of-all-time?v=13 |
ec7726f
to
67e9f46
Compare
Sweet! This all looks good :) Setting |
32fb843
to
79f7ad8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On testing works like a charm!
Codecov Report
@@ Coverage Diff @@
## master #8369 +/- ##
=======================================
Coverage 16.66% 16.66%
=======================================
Files 83 83
Lines 4422 4422
Branches 757 757
=======================================
Hits 737 737
Misses 3202 3202
Partials 483 483 |
Closes #7778 (or at least provides an alternative way for librarians to achieve their goals)
feature: add grid_mode=True to the Carousel macros to get a grid view instead.
Technical
display: -ms-grid;
but not sure if prefixing is already automated in webpack.Testing
Find/create a page with a Carousel macro and add
grid_mode=True
e.g.Screenshot
Stakeholders
@cdrini, @digitals82