When Title link text is too long then the Title body overflows. Adding a screenshot for reference.

Related issue : https://www.drupal.org/project/drupal/issues/3177475

CommentFileSizeAuthor
#37 word-break.png184.2 KBmherchel
#36 after.png1014.94 KBsmustgrave
#36 before.png561.55 KBsmustgrave
#35 afterPatch--Chrome.png103.53 KBasha nair
#35 afterpatch--FF.png108.33 KBasha nair
#35 beforePatch.png96.41 KBasha nair
#34 3205146-34.patch794 bytesrinku jacob 13
#30 After Patch.png89.11 KBShubham Sharma 77
#30 Before Patch.png65.46 KBShubham Sharma 77
#28 After--patch--pic.png26.19 KBvikashsoni
#28 Before--patch--pic.png22.85 KBvikashsoni
#26 After Patch 3205146 Scrollable.png395.1 KBchetanbharambe
#26 After Patch 3205146 Safari.png446.95 KBchetanbharambe
#26 After Patch 3205146 FF.png361.81 KBchetanbharambe
#26 After Patch 3205146 Chrome.png687.21 KBchetanbharambe
#26 Before Patch 3205146 Chrome title.png569.89 KBchetanbharambe
#26 Before Patch 3205146 Chrome Link.png444.6 KBchetanbharambe
#25 3205146_Firefox_test_spacing.png301.81 KBhmendes
#25 3205146_Chrome_test_spacing.png303.83 KBhmendes
#23 3205146_Firefox_spacing.png214.55 KBhmendes
#23 3205146_Firefox_no_space.png199.08 KBhmendes
#23 3205146_Chrome_spacing.png171.72 KBhmendes
#23 3205146_Chrome_no_space.png99.21 KBhmendes
#20 After patch.png244.38 KBroshanibhangale
#20 Before patch.png258.18 KBroshanibhangale
#17 3205146-17.patch806 bytesimalabya
#15 After_patch_3205146_3.png498.86 KBAgnesh Tank
#15 Before_patch_3205146_3.png458 KBAgnesh Tank
#5 Screenshot 2021-03-26 at 10.09.30.png74.48 KBgauravvvv
#5 Screenshot 2021-03-26 at 10.08.17.png63.61 KBgauravvvv
#4 3205146-after.png35.88 KBabhijith s
#4 3205146-before.png31.38 KBabhijith s
#3 3205146-3.patch1.24 KBmeghasharma
#2 3205146.png306.06 KBmeghasharma
#2 3205146-2.patch732 bytesmeghasharma
Overflow title.png258.88 KBmeghasharma

Comments

meghasharma created an issue. See original summary.

meghasharma’s picture

Assigned: meghasharma » Unassigned
Status: Active » Needs review
StatusFileSize
new732 bytes
new306.06 KB

Please review the patch

meghasharma’s picture

StatusFileSize
new1.24 KB

Updated patch, please review

abhijith s’s picture

StatusFileSize
new31.38 KB
new35.88 KB

Applied patch #3 and it works fine.The title becomes properly aligned after applying this patch.

Before path:
before

After patch:
after

RTBC +1

gauravvvv’s picture

I have attached the before and after patch screenshot for reference.
Moving to RTBC.

gauravvvv’s picture

Status: Needs review » Reviewed & tested by the community
gauravvvv’s picture

Issue summary: View changes

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3205146-3.patch, failed testing. View results

gauravvvv’s picture

Status: Needs work » Needs review
spokje’s picture

Status: Needs review » Reviewed & tested by the community

Test failure was caused by #3207086: [HEAD BROKEN] Consistent failure in MonthDatePluginTest which is fixed. Ordered retest and put this issue back to RTBC per #6.

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, 3: 3205146-3.patch, failed testing. View results

catch’s picture

Status: Needs work » Reviewed & tested by the community

Restoring status after HEAD was broken.

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/themes/olivero/css/base/base.pcss.css
@@ -21,6 +21,7 @@ html {
+  word-wrap: break-word;

Based on https://developer.mozilla.org/en-US/docs/Web/CSS/overflow-wrap word-wrap is deprecated. Should we use overflow-wrap instead?

Agnesh Tank’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new458 KB
new498.86 KB

Verified and tested patch#3 on Olivero 9.3.0-dev version with 9.3.x-dev
Patch applied successfully and result is Acceptable.

Testing Steps:

  1. Install Drupal 9.3.x-dev version.
  2. Go to Appearance -> Set Olivero theme as admin and default theme
  3. Create a Basic HTML page node and add the title with long Text
  4. Save and Verify the before patch on Front end
  5. Now Apply patch and clear the cache and re verify the after patch on created HTML Page node

Testing Output:

After applying the patch the title is displayed properly in wrapped form. Please refer attached Before patch and After patch images for reference. Hence moving this ticket to RTBC.

imalabya’s picture

Status: Reviewed & tested by the community » Needs work

Moving to NW

As per @lauriii's comment in https://www.drupal.org/project/drupal/issues/3210358#comment-14155124

Also the bug fix seems potentially high risk since it impacts all elements.

Since the overflow is specific for the title element, the fix should be applied only for the title.

imalabya’s picture

StatusFileSize
new806 bytes

Added a patch to update the .page-title
Also, added a hypen to specify the break.

imalabya’s picture

Status: Needs work » Needs review
roshanibhangale’s picture

Assigned: Unassigned » roshanibhangale
roshanibhangale’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new258.18 KB
new244.38 KB

Verified and tested patch #17 on the drupal 9.3.x-dev version. Patch applied successfully.

Testing Steps:

  • Install Drupal 9.3.x-dev version
  • Set Olivero theme as admin and default theme (from Appearance)
  • Create a Basic article page add the long text in the title field.
  • Save and Verify the title of the article page.

Expected Result:

  • User should see the title in the compact format.

Actual Results:

  • User is able to see the title in compact format. No title overflow.

Please refer attached screenshot.
This is can be move to RTBC.

roshanibhangale’s picture

Assigned: roshanibhangale » Unassigned
mherchel’s picture

Priority: Normal » Minor
Status: Reviewed & tested by the community » Needs review

In order to properly test this, we'll need screenshots in Chrome, FF, and Safari of long text breaking, as well as properly spaced text to ensure that it doesn't improperly break.

hmendes’s picture

Adding after patch screenshots on Chrome and Firefox, I can't test this on Safari.

mherchel’s picture

Thanks for the screenshots, but the spacing screenshot needs to tell me if the word breaks are in the correct place.

Unfortunately, I can't tell where they are supposed to be. It would be nice if we had words when testing out the spacing. Such as 'test test test' etc.

hmendes’s picture

StatusFileSize
new303.83 KB
new301.81 KB

Hey mherchel,
It breaks the line after the space. Adding others screenshot to reference, is that what you wanted?

chetanbharambe’s picture

Status: Needs review » Needs work
StatusFileSize
new444.6 KB
new569.89 KB
new687.21 KB
new361.81 KB
new446.95 KB
new395.1 KB

Verified and tested patch #17.
Patch applied successfully.

Testing Steps:
# Go to Appearance -> Set Olivero theme
# Create a basic page with a long title and long body without any space
# Save it
# See the results

Expected Results:
# Title should not overflow when title link text is too long.

Actual Results:
# Title overflow when title link text is too long.

Issue: Currently Page is not stable and it's horizontally scrollable.

Please refer attached screenshots.
Looks good to me.
Can be a move to Needs work.

xjm’s picture

Priority: Minor » Normal

This is a normal priority bug under the normal issue priority definition, which specifically refers to:

Bugs for site visitors that do not interfere with site use, for example, visual layout issues.

vikashsoni’s picture

StatusFileSize
new22.85 KB
new26.19 KB

Applied patch #3 working fine after patch the body field coming in proper layout
Thanks for the patch
for ref sharing screenshot

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

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Shubham Sharma 77’s picture

StatusFileSize
new65.46 KB
new89.11 KB

I have applied patch #3 before and after screenshots.

Shubham Sharma 77’s picture

Status: Needs work » Needs review
kristen pol’s picture

@Shubham Sharma 77 @vikashsoni @chetanbharambe and anyone else testing this issue, please:

1) Do not test something again if you are just testing the same thing. There have been 6 people who have tested this issue since the patch was provided and it would be much more helpful if people read the previous comments and respond accordingly.

2) Note the browsers and testing steps.

3) See #24 for testing directions. Some of these things have been tested already, you can look at the various comments and figure out what is left to test.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

rinku jacob 13’s picture

StatusFileSize
new794 bytes
asha nair’s picture

StatusFileSize
new96.41 KB
new108.33 KB
new103.53 KB

Applied patch #34 cleanly. Adding results as screenshots.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Bug Smash Initiative
StatusFileSize
new561.55 KB
new1014.94 KB

Tested #34 and it worked perfectly.

mherchel’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
StatusFileSize
new184.2 KB

#34 doesn't provide proper line breaking in all browsers.

Attaching image of Safari as an example.

This issue is trickier than it seems. CSS does not give us proper tools to take into account all use cases, and I don't want to bloat the page with JavaScript.

This issue is a duplicate of #3177475: Olivero: Ensure long words break properly when zoomed in to provide proper reflow (the same issue marked as related). If you go through the (long) comments, you can see various explanations, code samples, codepens, accessibility reviews, etc.