Problem/Motivation

blockquote and pre can overflow into the right sidebar region in the Olivero theme

See screenshot:

Screenshot about a blockquote over the sidebar

Steps to reproduce

1. Create a site e.g. with http://simplytest.me/project/drupal/9.2.x, login admin/admin
2. Go to Appearance, and enable and set default Olivero.
3. Go to Structure > Block Layout and add different blocks in the sidebar region.
4. Create a new article "Test article" with body (click on "source" and copypaste)

<blockquote>
<p>This is a very long blockquote that will overlap,&nbsp;if using long words more often used in a non-English language, with the sidebar .</p>
</blockquote>

<blockquote>
<p>This is another blockquote confirming the issue.</p>
</blockquote>

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

The blockquote doesn't overlap with the sidebar.

API changes

None.

Data model changes

None.

Release notes snippet

None.

CommentFileSizeAuthor
#42 3210902-without-side-bar.png81.14 KBindrajithkb
#42 3210902-with-side-bar.png88.14 KBindrajithkb
#41 width.png244.9 KBmarcusvsouza
#41 mobile.png38.71 KBmarcusvsouza
#41 after_patch-40.jpg121.81 KBmarcusvsouza
#41 before_patch-40.jpg120.24 KBmarcusvsouza
#40 3210902-40.patch1.73 KBmherchel
#39 interdiff-38-39.txt539 bytesmherchel
#39 3210902-39.patch1.73 KBmherchel
#38 3210902-38.patch1.73 KBmherchel
#38 interdiff-37-38.txt2.08 KBmherchel
#37 interdiff-30-37.txt2.9 KBmherchel
#37 3210902-37.patch1.83 KBmherchel
#34 after.png97.09 KBrinku jacob 13
#34 before.png106.22 KBrinku jacob 13
#33 olivero-blockquotes.png555.11 KBmherchel
#30 3210902.30.patch1.86 KBsakthivel m
#29 interdiff_27-29.txt811 bytesrenatog
#29 3210902-29.patch2.13 KBrenatog
#28 test_comment#25.png106.73 KBguilhermevp
#28 after-non-overflowing.png123.85 KBguilhermevp
#28 overlapping.png113.81 KBguilhermevp
#27 3210902-27.patch1.86 KBkostyashupenko
#27 interdiff_25-27.txt1.67 KBkostyashupenko
#26 Screenshot from 2021-05-14 14-12-32.png105.42 KBkostyashupenko
#25 interdiff_18-25.txt2.01 KBkostyashupenko
#25 3210902-25.patch2.58 KBkostyashupenko
#20 after.png216 KBtushar_sachdeva
#20 before.png214.61 KBtushar_sachdeva
#18 interdiff_16-18.txt4.43 KBkiran.kadam911
#18 3210902-18.patch2.11 KBkiran.kadam911
#16 width-3210902-16.patch5.27 KBtushar_sachdeva
#16 interdiff_15-16.txt5.72 KBtushar_sachdeva
#14 interdiff_9-14.txt2.24 KBtushar_sachdeva
#14 width-3210902-14.patch1.73 KBtushar_sachdeva
#11 before-patch-apply.png75.72 KBsulfikar_s
#11 after-patch.png76.58 KBsulfikar_s
#9 after.png223.66 KBtushar_sachdeva
#9 before.png218.11 KBtushar_sachdeva
#9 width-3210902-9.patch1.1 KBtushar_sachdeva
#8 Screen Recording 2021-04-29 at 11.14.42 AM.mov3.3 MBtushar_sachdeva
#4 Captura de pantalla 2021-04-28 a las 19.33.29.png268.65 KBpenyaskito
olivero-blockquote.png56.35 KBpenyaskito

Comments

penyaskito created an issue. See original summary.

tushar_sachdeva’s picture

Assigned: Unassigned » tushar_sachdeva
tushar_sachdeva’s picture

@penyaskito not able to reproduce this issue. Please provide the necessary steps.Thanks

penyaskito’s picture

Issue summary: View changes
Issue tags: +Novice, +styling, +CSS novice
StatusFileSize
new268.65 KB

Updated with steps to reproduce.

Attached a better screenshot.

penyaskito’s picture

Issue summary: View changes
mherchel’s picture

Confirmed that I'm able to reproduce the issue on https://tugboat-aqrmztryfqsezpvnghut1cszck2wwasr.tugboat.qa/node/31 by editing one of the <p> tags to be <blockquote>.

tushar_sachdeva’s picture

@penyaskito thanks for providing steps, I'm able to reproduce this issue now.

tushar_sachdeva’s picture

If i am not wrong this css .layout--pass--content-narrow > * .text-content blockquote{width: 56.41071rem;} is causing the overflow issue , as its width is more than the parents div , for reference I have attached the video .

tushar_sachdeva’s picture

StatusFileSize
new1.1 KB
new218.11 KB
new223.66 KB

Quick and easy patch applied with before and after screenshots, please review and let me know if setting up width: auto; holds good here. Thanks

tushar_sachdeva’s picture

Assigned: tushar_sachdeva » Unassigned
Status: Active » Needs review
sulfikar_s’s picture

StatusFileSize
new76.58 KB
new75.72 KB

Hi, I've applied the patch and it applied cleanly. It does fix the overlapping issue!

I'm attaching the screenshots below,

Before,
before-patch-apply.png

After,
after-patch.png

I think it's good to move to RTBC.

RTBC+1

mherchel’s picture

Issue summary: View changes
Status: Needs review » Needs work

The design of Olivero has the <blockquote> extending beyond the grid on purpose. We want to keep that... unless the sidebar is present.

You can see this at https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/themes/olive...

Note that the same behavior will also happen with the <pre> element, so we should fix that, too.

There's a .sidebar-grid CSS class that gets added at https://git.drupalcode.org/project/drupal/-/blob/9.2.x/core/themes/olive.... We can use this class to create a selector to reset the width.

tushar_sachdeva’s picture

Assigned: Unassigned » tushar_sachdeva
tushar_sachdeva’s picture

StatusFileSize
new1.73 KB
new2.24 KB

Quick and easy patch applied. Please review and verify.

tushar_sachdeva’s picture

Status: Needs work » Needs review
tushar_sachdeva’s picture

StatusFileSize
new5.72 KB
new5.27 KB

Quick and easy patch applied with <pre> width fix. Please review and verify.

pragati_kanade’s picture

Status: Needs review » Reviewed & tested by the community

TLGM

kiran.kadam911’s picture

Assigned: tushar_sachdeva » Unassigned
Status: Reviewed & tested by the community » Needs review
StatusFileSize
new2.11 KB
new4.43 KB

@tushar_sachdeva Thanks for the patch #16, it's applied successfully. But there are some CI failure issues that need to fix https://www.drupal.org/pift-ci-job/2046265

So providing an updated patch, Kindly review.

Thanks!

Status: Needs review » Needs work

The last submitted patch, 18: 3210902-18.patch, failed testing. View results

tushar_sachdeva’s picture

StatusFileSize
new214.61 KB
new216 KB

@kiran.kadam911 thanks for rerolling patch #16, CI failure issues were due to indentations, patch #18 works fine attaching screenshots again.Moving it to RTBC.

tushar_sachdeva’s picture

Status: Needs work » Reviewed & tested by the community

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 18: 3210902-18.patch, failed testing. View results

renatog’s picture

This comment here has unnecessary break-line

Special width treatment for <pre> and <blockquote> elements that
reside in a content-narrow layout.

Considering that we can use 80 chars per line this comment should be

Special width treatment for <pre> and <blockquote> elements that reside in a
content-narrow layout.
kostyashupenko’s picture

Status: Needs work » Needs review
StatusFileSize
new2.58 KB
new2.01 KB

Add more steps how to reproduce please, on my side it was:
1. Standard profile installation
2. Created Article node
3. Checkbox "Promoted to front page" was checked for this node
4. Go to "/node"

I have set margin-left for pre tag as 0, coz without 0 it looks like this:
Pre tag bug

Also i have removed word-wrap: break-word; because it has no effect at all (maybe i'm wrong, but tested in chrome, safari and FF), because user agent styles for pre tag contains only white-space: pre, means only white-space: pre we have to override to its default value, which is white-space: normal

kostyashupenko’s picture

StatusFileSize
new105.42 KB
kostyashupenko’s picture

StatusFileSize
new1.67 KB
new1.86 KB

Well, i figured out, that bug, illustrated in #25 (with negative left margin) happens only if pre tag is placed inside blockquote tag. I'm not sure if it can be the real client case, so i removed margin-left: 0;

Now it's ready for review

guilhermevp’s picture

StatusFileSize
new113.81 KB
new123.85 KB
new106.73 KB

Tested patch #27 and it works as intended.

Before patch:

1

After patch:

2

Just took the steps to reproduce from the issue summary. Also tested as comment #25 suggested.

3

Seems good to RTBC.

renatog’s picture

StatusFileSize
new2.13 KB
new811 bytes

Follow the new patch considering Line length and wrapping standards on comments / documentation

sakthivel m’s picture

StatusFileSize
new1.86 KB

Fixed Custom Commands Failed issue. #30 Please review the patch

Status: Needs review » Needs work

The last submitted patch, 30: 3210902.30.patch, failed testing. View results

ajv009’s picture

Status: Needs work » Reviewed & tested by the community

Looks good to me, applied and tested. The spacing looks fine, Couldn't find any overlapping content!

mherchel’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new555.11 KB

This patch also affects the blockquotes on pages that do not have sidebars. We need to ensure that the patch only affects blockquotes when a sidebar grid is present.

rinku jacob 13’s picture

StatusFileSize
new106.22 KB
new97.09 KB

patch applied successfully for dupal 9.3.x-dev.patch working great .

renatog’s picture

Status: Needs work » Reviewed & tested by the community

So moving to RTBC

mherchel’s picture

Status: Reviewed & tested by the community » Needs work

@Rinku Jacob 13 - there is no need to let us know that the patch is able to be applied. Drupal CI will fail if it does not apply.

@RenatoG my concerns in #33 where not addressed. Please don't change the status unless work has been done.

mherchel’s picture

Status: Needs work » Needs review
StatusFileSize
new1.83 KB
new2.9 KB

Here is an updated patch. We needed to limit the selector to the .sidebar-grid class.

mherchel’s picture

StatusFileSize
new2.08 KB
new1.73 KB

#38 still had issues overflowing at mobile widths. This patch fixes that.

mherchel’s picture

StatusFileSize
new1.73 KB
new539 bytes

Had a typo in my comment.

mherchel’s picture

StatusFileSize
new1.73 KB

Darnit, I forgot to compile the CSS! 🤦

marcusvsouza’s picture

StatusFileSize
new120.24 KB
new121.81 KB
new38.71 KB
new244.9 KB

The patch in comment #40 solves the problem, including mobile and narrow screens.

indrajithkb’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new88.14 KB
new81.14 KB

Hi @mherchel thanks for the #40 patch, it's working as expected.

Attaching screenshots for refernce
1. Blockquote with side-bar

image

2. Blockquote without side-bar (which was the remaining task addressed in #33)

image

Blockquote without sidebar was the remaining task now it's also resolved by #40. So moving to RTBC

mherchel’s picture

  • lauriii committed 9c41e6e on 9.3.x
    Issue #3210902 by mherchel, tushar_sachdeva, kostyashupenko, RenatoG,...

  • lauriii committed a06d5d8 on 9.2.x
    Issue #3210902 by mherchel, tushar_sachdeva, kostyashupenko, RenatoG,...
lauriii’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 9c41e6e and pushed to 9.3.x. Also cherry-picked to 9.2.x because Olivero is experimental. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.