-
Notifications
You must be signed in to change notification settings - Fork 153
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
Remove unwanted gaps between hero and footer when using dark sections #11862
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… / landing page type)
…w partial w/ spacer
robdivincenzo
temporarily deployed
to
foundation-s-issue-1179-lpznkg
February 13, 2024 18:52
Inactive
robdivincenzo
temporarily deployed
to
foundation-s-issue-1179-lpznkg
February 14, 2024 18:29
Inactive
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.
Thanks for taking on this work, @robdivincenzo! I think it's almost there, we just need to adjust the paragraph spacing
network-api/networkapi/mozfest/templates/partials/streamfield.html
Outdated
Show resolved
Hide resolved
robdivincenzo
temporarily deployed
to
foundation-s-issue-1179-lpznkg
February 16, 2024 13:24
Inactive
robdivincenzo
temporarily deployed
to
foundation-s-issue-1179-lpznkg
February 16, 2024 13:54
Inactive
jhonatan-lopes
approved these changes
Feb 16, 2024
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.
LGTM 👍 thanks Rob!
robdivincenzo
temporarily deployed
to
foundation-s-issue-1179-lpznkg
February 16, 2024 18:18
Inactive
robdivincenzo
added a commit
that referenced
this pull request
Jun 4, 2024
* Remove extra spacing from image feature block * Remove extra spacing from carousel text block * Remove auto paragraph spacer portion of #11862, opting for manual spacer blocks instead --------- Co-authored-by: Daniel Miranda <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The problem is that Issue #11756 introduced unwanted white gaps in between the dark hero and an immediately following dark section as seen by screenshots in Issue #11795 . Additionally, there is an unwanted white gap between the body section and the footer when the page ends with a dark section.
The solution is to conditionally add spacing above a paragraph block when it immediately follows a dark hero instead of after the dark hero unconditionally. The solution for the second unwanted white gap is to simply remove the margin class from the mozfest-content wrapper.
The implementation introduces a streamfield custom block which will be overridden to include a new streamfield_spacer.html template on mozfest_homepage.html and mozfest_landing_page.html templates. This new template extends the existing streamfield.html template to include a new body_spacer custom block containing a spacer div. The body_spacer block will then be rendered only if a paragraph is the first block in the body section. The body_spacer block is empty by default, meaning the spacer div is only rendered when the two following conditions are met:
There are further considerations. We could reduce coupling by adding margins to the paragraph block unconditionally to have adequate spacing in all cases regardless of placement. But the paragraph block is used generically and currently assumes spacing from blocks above it (see for example the various uses on just this one page: https://www.mozillafestival.org/en/highlights/). Modifying each dependency in order to introduce a generic paragraph margin seems out of scope for this issue, but perhaps could be a larger follow-up issue.
Link to sample test page: https://mozfest-foundation-s-issue-1179-lpznkg.mofostaging.net/en/test-landing/
Related PRs/issues: #11756 and #11795
Steps to test