3911 do not render empty lists on article page#4293
Conversation
To Remove Empty Sections or Not to Remove...For Checksum and Download, I have left the section there but added a statement that there are none available. This is because these are standard sections that a reader might 'look for' and so they should not be hidden but state clearly that they are empty. But for the automated table of contents, I have removed the section entirely when it is empty. This is because the table of contents listing the sections does not make any sense in the context of an article without contents - and a reader would not look for it when there is no contents to navigate. To follow the pattern above with downloads and checksums would add to user confusion not prevent it. |
|
Closes #3911 |
joemull
left a comment
There was a problem hiding this comment.
Nice one! I like the design decision to consistently display sections that are standard and often expected, like downloads and checksums.
I noticed a few things that we probably want to fix up for consistency between themes and screen sizes.
|
@joemull please note response #4293 (comment) for testing, I have tried all combinations of:
Following this, it seems both Clean and Material use the same toc.js. So now updating and rechecking that. |
|
Summary of Changes:
|
joemull
left a comment
There was a problem hiding this comment.
Amazingly thorough! I just noticed one proofreader note that got left out of one of the galley checks.
There was a problem hiding this comment.
Thanks for this @StephDriver this looks awesome. However, there is a conflict being flagged. Looks like an easy one though. If you need assistance with it let me know.
b74686c to
29b4f17
Compare


Updated django templates to check that there are galleys before creating download and checksum lists, across all three themes. Material already checked for galleys for download lists, but not for checksums.
For empty autogenerated tables of contents in OLH theme, updated the JS to remove the
tocelement if no headings were found, i.e. if list not populated.Marked as draft as it is the end of the day, and I have yet to test this, so that must be done before sending for review.