Problem/Motivation
After posting a comments on a page, the profile image associated with the user is overlapping with Layout Builder section.
Steps to reproduce
- Make
Oliverothe default theme inAppearance. - Enable
Layout Buildermodule inExtend. - Create an Article page with comments.
- Go to
Home > Administration > Structure > Content types > Article - Under
Manage Displaytab go toLayout options - Check
Use Layout BuilderandAllow each content item to have its layout customized.then save. - Go to the Article page and click on the
Layouttab. - Scroll down to the comments section.
- Result: You will see the user's circular image overlapping with the Layout Builder section.
- Expected: User's image should be aligned correctly within the comment.
Please refer to the video attached.
Proposed resolution
TBA
Remaining tasks
Confirm that #72 is complete
User interface changes
Introduced terminology
API changes
See images in #83
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #83 | AfterMR8645-layout.png | 326.23 KB | kanchan bhogade |
| #83 | BeforeMR-8645-layout.png | 307.41 KB | kanchan bhogade |
| #83 | AfterMR8645.png | 185.76 KB | kanchan bhogade |
| #83 | BeforeMR8645.png | 185.29 KB | kanchan bhogade |
| #81 | 3210703-nr-bot.txt | 1.22 KB | needs-review-queue-bot |
Issue fork drupal-3210703
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sakthivel m commented#2 Please review the patch
Comment #3
kishor_kolekar commentedplease review the patch.
Comment #4
manojithape commentedVerified and tested patch#2. Patch applied successfully and looks good to me.
Testing Steps:
Testing Results:
After applying the patch user's image (circular one) not overlapping with the layout builder section and displayed properly.
Comment #5
sakthivel m commented#4 Recreated Patch
Comment #6
abhijith s commentedApplied patch #4 and it works fine.
Before patch;

After patch:

But there are some whitespace and CS issues in this patch.
Comment #7
abhijith s commentedFixed whitespace and CS issues in patch #4.
Comment #8
tushar_sachdeva commentedComment #9
tushar_sachdeva commented@Abhijith S Drupal code quality checks failed showing this
.Please refer https://stylelint.io/user-guide/rules/at-rule-empty-line-before
Comment #10
tushar_sachdeva commentedComment #11
tushar_sachdeva commentedComment #12
sakthivel m commented#12 Recreated patch
Comment #13
tushar_sachdeva commentedComment #14
sakthivel m commentedComment #15
tushar_sachdeva commented@Sakthivel M getting this error while reproducing this output locally
.Not able to find out why custom commands is failing every time any guesses?
Comment #16
kiran.kadam911Kindly review the attached patch.
Thanks!
Comment #17
tushar_sachdeva commentedThe #16 patch applied successfully but getting few warnings @ kiran.kadam911
.Attached before and after screens shots for reference.
Comment #18
tushar_sachdeva commentedMoving it to RTBC as these are just warnings in the compiled CSS file, which can be ignored for now.
Comment #19
tushar_sachdeva commentedComment #21
lauriiiIsn't
.commentunnecessary here? Also, I don't think this would work because.add-comment__pictureisn't inside.comment.Comment #22
tushar_sachdeva commentedComment #23
tushar_sachdeva commentedPatch attached, kindly review and verify. Thanks
Comment #24
tushar_sachdeva commentedComment #25
tushar_sachdeva commentedComment #26
sakthivel m commentedVerified and tested patch#23. Patch applied successfully and looks good to me.
Moving to RTBC
Comment #27
sakthivel m commentedComment #28
lauriii#21 still needs to be addressed. I'm not sure why
.add-comment__picturewas added in the first place but removing it would be probably fine since it is never inside.comment, so the selector never matched anything.Comment #29
kishor_kolekar commented@lauriii,
Can we keep it simple and remove few lines of code.
please review the patch.
Comment #30
mherchelWe need to ensure that these fixes don't affect the output of the styling when the LB builder is not active.
Comment #31
kiran.kadam911@mherchel I think it won't affect since it's only written to fix issues inside LB which is working fine after patch. I checked on the node comment section it's working fine #23.
SS:
Thanks!
Comment #32
xjmNormal priority bug under the normal issue priority definition:
Comment #33
chetanbharambe commentedAgree with @xjm.
And UI of the Image(circular one) is too close to the horizontal line. but it also does not interfere with site use.
Verified and tested patch #29.
Patch applied successfully and looks good to me.
Testing Steps:
# Go to Appearance:- Set Olivero theme
# Go to Content and create one article content type also post a comment.
# Go to Extend:- Install the layout builder option.
# Go to Home>Administration>Structure>Content types>Article,under layout options check layout builder.
# Go to the article node, click on layout.
# Scroll down to the place where comments are being posted.
# You will see the user's image(circular one) overlapping with the layout builder section
Expected Results:
# User's image(circular one) should not overlap with the layout builder section and displayed properly.
Actual Results:
# User's image(circular one) overlapping with the layout builder section.
Please refer attached screenshots.
Looks good to me.
Comment #34
kostyashupenkoI applied the latest patch from #29 and it breaks some stuff, so i decided to revert it and create new patch from scratch.
For local tests i have used Drupal 9.3.x + standard profile installation + default CT Article page with multiple comments.
I've found several bugs with alignment of comments on real pages between 700px - 1000px width of screen:
So you can see that comment picture is outside of viewport. To fix this little issue was not so obvious and easy thing, but now everything works fine on my side under all breakpoints + also LB comments were fixed (and looks ok under all breakpoints aswell).
There are two examples of comments on real page and LB page
Comment #35
kostyashupenkoHere is a patch btw
Comment #36
heni_deepak commentedI have applied #35 patch and tested it with the hirechical index example.
Comment #37
vikashsoni commentedApplied patch #16 working fine and giving expected result
Thanks for the patch
For ref sharing screenshots....
Comment #39
sakthivel m commented@kostyashupenko RTL the User's image in comments is overlapping with layout builder section.
Attached screenshot here.
Moved to Needs work
Comment #40
sakthivel m commented#40 Please review the patch
Comment #41
gauravvvv commentedI have fixed the custom commands failed, Attached interdiff for same. Please review.
Comment #42
kristen polThanks for the update. The indentation in the patch seems off to me, e.g.
Also not sure that #28 was properly addressed:
Comment #43
kristen polCleaned up title and the issue summary formatting and wording. Also added more information to the steps to reproduce. Still could use the full issue summary template.
Comment #44
andregp commentedComment #45
andregp commentedI'm going to work on #42 and #28.
Comment #46
andregp commented@kristen-pol Indeed the identantion is off on the comments.css file.
There are 10 places on the original file with a @media tag wrapping some css rules and their curly braces positions and identation is not consistent (differently from comments.pcss.css file which follows the coding standards).
I corrected the indentation just for the blocks added/edited by the patch to keep within this issue scope, maybe a follow up issue just for the CS after this is committed would be a good idea.
Also #28 was addressed in #23 (see the interdiff). The original problem (#21) was about the
.add-comment__pictureinside.commentwhich was correctly removed.The patch bellow fixes the identations and CS on the introduced code.
Comment #47
ranjith_kumar_k_u commentedFixed CS errors.
Comment #49
yogeshmpawarMarking Needs Review again because test failures are unrelated.
Getting above test failures in most of the issues.
Comment #50
devashish jangid commentedDrupal 9.4.x-dev
Verified and tested patch #47.
Patch applied successfully and looks good for me.
Sharing screenshot for the reference.
Comment #51
kristen polThanks for the updates and testing.
A frontend dev should take a look at the changes more carefully, but I reviewed interdiffs in #46 and #47.
The indentation problems appear to be addressed. One thing that was added in that IMO doesn't need to be added is the comment:
/* Comment's padding-top */Comment #52
andregp commented@Kristen Pol Thank you for pointing that out. If it wasn't you I wouldn't notice the interdiff on #47 is actually wrong. If you download the patch #46 and the patch #47 and run
interdiff 3210703-46.patch 3210703-47.patch > interdiff_3210703_46-47.txtyou will get the interdiff attached here.It means #47 corrected the 3 spaces on
core/themes/olivero/css/components/comments.pcss.cssbut also reverted all other CS corrections I made on #46.Here is a new patch with the spaces from
core/themes/olivero/css/components/comments.pcss.csscorrected, and all the corrections I did on #46 added back.@Kristen Pol, also, regarding the addition of
/* Comment's padding-top */it just seems that I have added this comment because of the interdiff, but actually I reverted this change. This comment is already present on the original core code and the previous patch (#41) was removing it. As it seemed an unrelated change I just didn't delete the comment from the code when working on my patch.Comment #53
asha nair commentedApplied patch #52. Patch failed. No changes
Comment #54
yogeshmpawarResolved CSpell errors.
Comment #55
andregp commentedSorry, I'm feeling a bit embarrassed because at the time I worked on this issue I didn't know that we should not change the
"file_name".cssfiles, and inadvertently tried to "fix"comments.csscausing my patch to fail and adding unnecessary noise to this issue's thread.The correct approach is to change/update the
.pcss.cssversion of whatever file we are working with, and then runyarn run build:csson the core folder, so yarn automatically updates the.cssversion of the file. (see documentation here).Even if the
.cssfile looks a bit off (in this issue's case, with inconsistent indentation, etc., etc.) we should keep it as is, and only update it through yarn when changing the.pcss.cssequivalent.@yogeshmpawar probably did this on his patch (thanks for that!), and now the patch not only fix the issue (as you can see on the pictures attached), but it's also free of errors.
Moving to RTBC.
Comment #57
andregp commentedUnrelated test fail, requeueing tests ans restoring status.
Comment #59
andregp commentedAnother random failure.
Comment #61
andregp commentedRandom failure again.
Comment #63
manojkumar_97 commentedComment #64
manojkumar_97 commentedBefore apply patch:


After apply patch:
Comment #65
andregp commented@manojithape, what was the intent of the new patch? It's a good practice to always write a comment explaining what you did on your patch and to provide an interdiff between your patch and the last one. This helps other members on the community to know what you're doing.
Also, the patch #54 was working just fine. The "Needs work" tag was added automatically by a random fail. A further investigation on the test results (or reading the comments) could have helped to know this.
Sending back to RTBC as per patch #54.
Comment #67
larowlanCI is showing that the css is out of sync with the pcss, so this needs work
Comment #68
sakthivel m commented#68 Please review the patch
Before Patch

After Patch

Comment #69
Shubham Sharma 77 commentedApplied patch #68 applied successfully in drupal-9.5.x-dev.
For ref sharing screenshots...
We can move this ticket to RTBC.
Comment #70
dishakatariya commentedComment #71
dishakatariya commentedVerified and tested #68 applied successfully and looks good to me
Testing steps-
1.Make Olivero the default theme in Appearance.
2.Enable Layout Builder module in Extend.
3.Create an Article page with comments.
4.Go to Home > Administration > Structure > Content types > Article
5.Under Manage Display tab go to Layout options
6.Check Use Layout Builder and Allow each content item to have its layout customized. then save.
7.Go to the Article page and click on the Layout tab.
8.Scroll down to the comments section.
Actual Result: You will see the user's circular image overlapping with the Layout Builder section.
Expected Result: User's image should be aligned correctly within the comment.
Can be move to RTBC
Comment #72
mherchelI'm really indifferent if this even needs to be fixed. I'm recategorizing as minor.
If we do fix this, we need to ensure the non-layout builder UI is not affected. The current patch affect the comments when the LB UI is not in use.
Comment #73
amin.ankitComment #74
amin.ankitComment #76
dsandhya commentedI have created this patch for 10.1.x-dev and its working fine. Please verify.
Comment #80
jaydeep_patel commentedUser's profile image in comments section overlaps with in Article has been fixed. Please review. Thanks !!!
Comment #81
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #82
jaydeep_patel commentedcomments.pcss.css has been updated and User's profile image in comments overlaps with Layout Builder section issue has been resolved
Comment #83
kanchan bhogade commentedI've tested MR 8645 on Drupal 11.x
The MR is applied cleanly...
Test Result:
The User's image in the comments overlaps with the Layout Builder section issue is resolved and visually looks good.
Also, the Non-Layout UI looks good.
Attaching Scrrenshots
RTBC+1
Comment #84
chandansha commentedComment #85
quietone commentedI read the issue summary, which is incomplete, there is no proposed resolution. And as, an issue that affects the UI there should be screenshots available from the issue summary. I am restoring the template and will update as I continue. Thanks you to andregp for summarizing the relevant changes and what comments have been addressed.
I think everything has been addressed here, but worth checking that #72 is complete. Also an Olivero maintainer commented in #72 that they are "indifferent" about this being changed.
Leaving at RTBC
Comment #86
gauravvvv commentedUpdated attributions
Comment #87
nod_I reviewed the issue and all the different solutions change the design of the comment section one way or another. Changing the design of the comment section is not in the scope of this issue.
The issue is that inside the LB UI the icon is outside the LB section. This is by design that the picture is out of the normal flow of the page, it makes sense that it is also out of the flow of the LB interface. If we make it fit inside the LB the preview would not be accurate anymore.
Moving the comment element to the right to avoid this, but it breaks the intended design of the page. If the overlap is problematic it's always possible to disable the content preview with the checkbox on top of LB UI. Because we do not want to change the design of the comment and there is a solution to avoid this I'm closing this as works as designed.
Thanks to everyone who worked on this over the years. I wish we caught this one earlier to avoid spending so much time on this.