Avoid rendering the side content when there's no content #859
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit aims to superseed alphagov/frontend#1069
We believe that is the component responsability to make sure the requirements are met
in order to do the the job, in this case, to render the content.
What this commit suggest is that we do our components with Design by Contract in mind,
what it means is that the component becomes responsible to dictate how it should be used.
Also there's a certain advantage of doing this at the component level,
this avoids extra work on the developer to chase all the rendering applications to make sure they should or not render the component.
So keeping it on the component side is not only beneficial code wise but also more efficient.
Trello: https://trello.com/c/5TCdhKVN/320-fix-the-hovering-blue-sidebar-on-pages-without-related-links