-
Notifications
You must be signed in to change notification settings - Fork 731
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
[Bugfix:Forum] Fix Forum Post Spacing #10176
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #10176 +/- ##
=========================================
Coverage 22.79% 22.79%
Complexity 8352 8352
=========================================
Files 228 228
Lines 29907 29907
Branches 75 75
=========================================
Hits 6817 6817
Misses 23018 23018
Partials 72 72
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
I did a functionality test and there didn't seem to be any glitches. I tested with different size screens and nothing broke the general function of the page.
The code changes make sense as to how you get the desired result.
Looks good to merge
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.
The fix looks good on my end. Works as intended for single lines and multiple paragraphs. I would change the selector to "post-content" to fix the CSS Lint issues. I would also look into removing ".post_content p:first-child/last-child" because there is no paragraph tag within any of the "post_content" containers.
@jeffreyC4 there's p block created for every paragraph if the post is markdown enabled due to how it is rendered, and each paragraph get's the same top and bottom margining hence we want to remove them for the first and last paragraphs. With disabling css lint for these two lines there should be no more failing checks. @Kush-Raval @jeffreyC4 guys can you re-review and make sure the white space control (- -) doesn't affect other things? |
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.
Everything looks great. The spacing is no longer an issue for regular and markdown posts on the forum. I tried various markdown comments, but they all seemed fine.
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.
Ran this on my local machine and saw the desired effects. Messed with different screen sizes and formats and the change still worked. Drastic improvement on space inside posts.
Tested as instructor and student.
The code makes sense and I can see why it will result in the desired effect.
Ready to merge.
closes #10070
Please check if the PR fulfills these requirements:
What is the current behavior?
#10118 fixes the first part of #10070 by containing the post text in a block, but this way it adds extra spacing on top and bottom of a post to match that of a markdown enabled post, causing there to be more wasted space.
What is the new behavior?
This PR adds whitespace control to the non-markdown enabled text and removes the extra spacing for the posts w/ markdown.
A 5px top-margin is added to improve the look and feel.
Before:
Now: