-
Notifications
You must be signed in to change notification settings - Fork 17
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
Display content lists on publications irrespective off h2 count #3361
Display content lists on publications irrespective off h2 count #3361
Conversation
bb4e984
to
872a756
Compare
872a756
to
006201a
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.
Happy to pair on this Sonia! But thought I'd type it out so you can work through it in your own time if you prefer.
Thanks Jess, this is great! I'll have a look and make a start 👀 |
006201a
to
0a9bcb4
Compare
561ec2b
to
a392585
Compare
a392585
to
533077a
Compare
e1a2c6c
to
5922a2e
Compare
5922a2e
to
569e28c
Compare
569e28c
to
755e4e5
Compare
755e4e5
to
569e28c
Compare
569e28c
to
7c42a6f
Compare
43d6cfd
to
1e8bc9b
Compare
1e8bc9b
to
fd47185
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.
Thank you Sonia! I've requested a few tiny tweaks to the tests descriptions but then I think we'll good to merge 😅
Please could you update the PR description with the review app working to show you've fixed the original bug, and some before and after shots.
I will draft a refactor card to follow up this work, as there's some complicated code that I think is only being used for working groups
fd47185
to
6e29ad4
Compare
Yayy perfect! I'll get the PR ready now! Ooo good spot for the working groups one |
- Updated the show_contents_list? method in contents_list.rb to ensure that the contents are displayed whenever items are present. This simplifies the logic by removing the condition that checked for more than two items. - Revised the integration tests related to the content list, removing unnecessary tests that required three or more items to render, as these are no longer relevant. Tests now ensure check whether a content list appears if any items are present, rather than based on the number of items. - Refactored the document collection tests to better reflect their behaviour, focusing on the number of document collection groups that contain documents as the behaviour is adjusted for document collections.
6e29ad4
to
0887aee
Compare
What
Trello card
This PR addresses the issue regarding the visibility of content lists. Previously, content lists were hidden if there were fewer than 2 H2s, resulting in empty spaces that negatively impacted the visual layout of publications that use Content Lists.
Key changes include:
Updated
show_contents_list?
method:contents_list.rb
has been revised to ensure that content lists are displayed whenever items are present. This simplifies the logic by removing the previous conditions.Revised integration tests:
Refactored document collection tests:
content item
that differs from the content list presenter, as it has been tailored for document collections.