Problem/Motivation
With big pipe enabled on profile pages the toolbar overlaps the content.
After loading the page initial the toolbar overlaps the heading.

After clicking on admin in the menu to close the sub menu the same margin as before is used.

After opening the sub menu again the height is correctly set and all the content moves downwards.

Steps to reproduce:
- Install a fresh Drupal site with a standard profile.
- Login as admin
- Click 'Edit profile' on the toolbar
- You can see that the toolbar overlaps the body of the page.
With BigPipe enabled this happens as the toolbar links are fetched later by Drupal\user\ToolbarLinkBuilder::renderToolbarLinks
On load the toolbar gets initializied and sets the padding-top of 40px. After that big pipe adds the toolbar, but doesn't invoke ToolbarVisualView.updateToolbarHeight
Proposed resolution
TBD
Maybe an option would be that big pipe introduces a new event when it's finished loading a block so ToolbarVisualView then can update the toolbar height.
Remaining tasks
Fix and test
User interface changes
none
API changes
none
Data model changes
none
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #49 | 3021147-nr-bot.txt | 150 bytes | needs-review-queue-bot |
| #48 | After_Patch_Seven.PNG | 15.52 KB | gaurav-mathur |
| #48 | Before_Patch_Seven.PNG | 15.33 KB | gaurav-mathur |
| #48 | After_Patch_Claro.PNG | 7.92 KB | gaurav-mathur |
| #48 | Before_Patch_Claro.PNG | 10.11 KB | gaurav-mathur |
Issue fork drupal-3021147
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
kfritscheComment #5
jamesashok commentedIssue is related to Issue #2952447.
The following patch is being updated on both issues.
The issue arises because the Toolbar height is being calculated before its contents are rendered on the initial load at ToolbarVisualView.js; so, the patch makes the height calculation asynchronous, by deferring it and pushing it to queue. So, once the contents are rendered, the height of the toolbar will be calculated.
Tested across all major browsers and OS simulations and adding a couple of screenshots..
Before Patch
After Patch
toolbar_initial_height-3021147-5.patch
Comment #6
avpadernoComment #7
jamesashok commentedComment #9
pankaj.singh commentedComment #10
pankaj.singh commentedTested on 9.1 and the issue is reproducible here. Applied the patch and its fixes the issue.
Atatched the SS for ref. RTBC+1
Comment #12
ramonma1989#5 worked for me. Tested on D8.9.13. Thanks.
Comment #14
manojithape commentedComment #15
manojithape commentedSame issue I tested on Drupal 9.2.x Dev version and the issue is reproducible here. Please refer attached Before patch screenshot.
@jamesashok At the time of applying patch#5 getting an error and not able to apply the patch.
Comment #16
manojithape commentedComment #17
chetanbharambe commentedThis issue is no more existing on the 9.3.x-dev version.
As a user, I am not able to see toolbar overlap content with big pipe enabled.
Need +1 RTBC
Comment #18
Madhu kumar commentedI'm unable to replicate the issue in 9.3.x-dev version.
Sharing Screenshot for reference.
Comment #19
rinku jacob 13 commentedi have same issue on 9.3.x-dev.but the above patch not applicable for 9.3.x-dev.
i am getting error while applying the patch.
Comment #20
avpadernoComment #21
suresh prabhu parkala commentedA re-rolled patch against 9.3.x.
Comment #22
avpadernoComment #23
vsujeetkumar commentedFixed "Custom Command Fail" issue, It is related to file "ToolbarVisualView.es6.js" is not updated.
Comment #24
vsujeetkumar commentedUpdated patch, Please ignore previous one.
Comment #25
avpadernoShould not that comment also be added to the ToolbarVisualView.js file? The patch adds it only to the ToolbarVisualView.es6.js file.
Comment #27
avpadernoComment #28
yogeshmpawarAddressed #27 & added an interdiff.
Comment #29
yogeshmpawarAccidentally added one extra line at top of the file so removing it, which resolves custom commands failure.
Comment #30
kndrI've just added a short version of the "Steps to reproduce" in the Issue summary.
Comment #31
kndrI followed the steps to reproduce but #29 doesn't work for me.
Comment #32
kndrHere is the test only. The patch should fail.
Comment #33
kndrI've pushed the new patch to the branch. As I mentioned, #29 doesn't work for me. I've tested #29 manually with no good result. I like the idea that the toolbar can response to the event triggered by Big Pipe when its work is done. Unfortunately I didn't find any event. I also tried the solution introduced at #2794099-11: JS relying on document.ready event does not work with BigPipe but it doesn't work for me too. Eventually I implemented the solution described at #2794099-9: JS relying on document.ready event does not work with BigPipe. Patch works fine but one issue is still bothering me. The test #32 combined with #29 passed without any errors despite the fact that #29 failed when I tested it manually. I can't explain that. I think the test should be altered in some way.
Comment #36
kndrComment #37
chetanbharambe commentedVerified and tested merge request !1329 - (https://git.drupalcode.org/project/drupal/-/merge_requests/1329.patch)
Merge Request applied successfully and looks good to me.
Testing Steps:
# Goto: Appearance -> Apply Seven theme
# Click on Profile section
# Click on Edit Profile
# Observe the results
Expected Results:
# After applying merge request!1329, User should not see toolbar overlaps on header and content. (should see some margin has been added.)
Actual Results:
# Currently, the toolbar overlaps on the header and the content.
Please refer attached screenshots for the same.
Looks good to me.
Can be a move to RTBC.
Comment #39
lauriiiWe still need to make this apply to 9.4.x and 10.0.x.
Comment #42
ankithashettyHere is an MR to 9.4.x branch, thanks!
Comment #44
ankithashettyHere is an MR to 10.0.x branch, thanks!
Comment #47
gaurav-mathur commentedComment #48
gaurav-mathur commentedPatch #32 applied successfully on verify and tested on Drupal 10.1.x-dev with claro and seven theme.
The patch work properly for me.
Refer to screenshots.
Comment #49
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #52
quietone commentedThe Toolbar Module was approved for removal in #3476882: [Policy] Move Toolbar module to contrib.
This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
The deprecation work is in #3484850: [meta] Tasks to deprecate Toolbar module and the removal work in #3488828: [meta] Tasks to remove Toolbar module.
Toolbar will be moved to a contributed project before Drupal 12.0.0 is released.
Comment #53
quietone commentedToolbar module has moved to contrib.