Skip to content
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

WIP #3340

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

WIP #3340

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions app/presenters/content_item/contents_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,24 @@
end

def show_contents_list?
# puts "Number of content items: #{contents_items.count}"
# puts "Contents items: #{contents_items.inspect}"

puts "exclude_contents_list_for_manual_section? #{exclude_contents_list_for_manual_section?}"

Check failure on line 25 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.
puts "contents_items.count #{contents_items.count}"

Check failure on line 26 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.
puts "contents_items: #{contents_items}"

Check failure on line 27 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.
puts "no_first_item? #{no_first_item?}"

Check failure on line 28 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.
puts "first_item_has_long_content? #{first_item_has_long_content?}"

Check failure on line 29 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.
puts "first_item_has_long_table? #{first_item_has_long_table?}"

Check failure on line 30 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.
puts "first_item_has_image_and_long_content? #{first_item_has_image_and_long_content?}"

Check failure on line 31 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.
puts "first_item_has_image_and_long_table? #{first_item_has_image_and_long_table?}"

Check failure on line 32 in app/presenters/content_item/contents_list.rb

View workflow job for this annotation

GitHub Actions / Lint Ruby / Run RuboCop

Rails/Output: Do not write to stdout. Use Rails's logger if you want to log.

return false if exclude_contents_list_for_manual_section?
return false if contents_items.count < 2
return true if contents_items.count > 2
# return false if contents_items.count < 1
# return true if contents_items.count >= 1
return false if contents_items.empty?
# return true if contents_items.any?
return true if contents_items.count > 1
return false if no_first_item?

first_item_has_long_content? ||
Expand Down
Loading