Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
Claro theme
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Jul 2019 at 08:07 UTC
Updated:
18 Apr 2022 at 12:19 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #2
s-jack commentedComment #3
lauriiiThank you for reporting this bug! I will try to see how to fix this next week. Just for some more information, is the behavior where the characters are on separate lines as expected? Also, which language is this so I can try to reproduce this myself.
Comment #4
s-jack commentedHi, lauriii.
I'm sorry, I can't understand what you mean about "Just for some more information, is the behavior where the characters are on separate lines as expected? ".
Environment is Japanese.
I think I have never seen the same phenomenon in a list other than /admin/content.
I will report again if I remember something.
Thank you.
Comment #5
s-jack commentedA same phenomenon was found in /admin/structure/types.
Comment #6
s-jack commentedI also learned that the English environment is similar.
My report may be the same phenomenon as this.
https://www.drupal.org/project/claro/issues/3067262
Comment #7
lauriiiThank you for following up on this issue. Which browser are you using?
Comment #8
s-jack commentedMac OS is Hi Sierra.
Safari 12.1.1 (13607.2.6.1.2) and chrome 75.0.3770.100(Official Build)(64bit).
Each browser has the same phenomenon.
Comment #9
huzookaComment #10
huzookaComment #11
huzooka@ckrina said
I will do that to fix this issue.
Comment #12
huzookaAdded new test for this that checks the content type manage form on
/admin/structure/types.The case with line-break can be found on Android and iOS screenshots.
Comment #13
lauriiiI think the nested lists could be problematic for accessibility. Maybe we should take into account the proposed markup here #2278473: Simplify Dropbutton markup in line with our CSS standards since @andrewmacpherson gave positive feedback on that here: #1899236-67: Add new Splitbutton render element to eventually replace Dropbutton.
Comment #14
huzookaComment #15
huzookaComment #16
huzookaComment #17
huzookaComment #18
lauriiiMoving back to NW for #13.
Comment #19
lauriiiComment #20
lauriiiComment #21
rembrandx commentedIn case of anyone looking for fixes for the multi-line dropdown issue and open/closed dropdowns 'jumping' visually, I'm updating the patches from the related issue:
: https://www.drupal.org/project/claro/issues/3067262#comment-13290088
Might be a good practical fix for now.
Comment #22
huzookaComment #23
huzookaComment #24
huzookaOur current plan is that we fully rewrite Dropbutton, and fix this issue and the related #3067262: Dropbutton list size and content not consistent as well.
Comment #25
huzookaComment #29
sakthivel m commented#16 Patch Failed
Comment #30
sakthivel m commented#29 Please review the patch
Comment #31
sakthivel m commentedComment #32
chetanbharambe commentedComment #33
chetanbharambe commentedVerified and tested patch #31.
Patch applied successfully and looks good to me.
Testing Steps:
# Goto: admin/modules
# Install Language and Interface translation module
# Goto: https://localize.drupal.org/translate/languages/zh-hans
# Download the file based on version
# Goto: admin/config/regional/translate/import
# Upload the file clicking on choose file
# Click on import
# Goto: admin/content
# Check the responsiveness UI
# User is able to see the Dropdown button is broken on a small screen.
Expected Results:
# Dropdown button should not be broken (size should be same)
Actual Results:
# Dropdown button is broken on a small screen when text is split into multiple lines
Looks good to me.
Can be a move to RTBC.
Comment #36
hardik_patel_12 commentedComment #39
ckrinaUpdating summary to include testing instructions thanks to #33. Also updating priority and adding Stable blocker tag.
Comment #40
volkswagenchickAdding Florida tag
Comment #41
volkswagenchickAdding Florida tag
Comment #42
stevengfx#31 Patch Failed
Comment #43
kristen polThanks. The patch in #31 isn't relevant anymore because of the new MR in #37+. But the MR isn't applying to 9.4 either, so moving back to needs work.
Comment #44
ranjith_kumar_k_u commentedRe-rolled MR-793 for 9.4
Comment #45
kristen polThanks but it needs some fixes:
Comment #46
gauravvvv commentedUnknown variable
var(--color-davysgray);was used, that's why custom commands failed. I have updated withvar(--color-gray);.Added interdiff for same. Please review.
Comment #47
gauravvvv commentedComment #48
kristen polThanks for the update. Applies cleanly to 9.4 but not to 9.3 or 10.
Comment #49
damienmckennaFYI I've been seeing this on the menus admin page where there are somewhat length descriptions on each menu, causing the "Edit menu" link to wrap onto multiple lines.
Rerolled for 9.3.x.
Comment #50
damienmckennaHere's how the menus look without the patch:

I also see this problem with Paragraphs / Entity Reference Revision fields.
Dropbutton collapsed:

Dropbutton expanded:

With the patch it has regressions:
Dropbutton collapsed:

Dropbutton expanded:

I'm inclined to say this "needs work"?
Comment #51
javi-er commentedI'm noticing similar results, the backported patch on #49 is taking the full container height when opened, same is happening with the merge request and patch at #46.
Comment #52
javi-er commentedComment #53
javi-er commentedAfter further testing, seems like the best candidate is the existing merge request (MR base branch needs to be updated for 9.4, currently 9.3).
It's working fine when
.toucheventsis present but it's not working with.no-toucheventsplus is adding the regression mentioned in #50 for desktop.Desktop:

.touchevents:

.no-touchevents (resized desktop):

Comment #54
kristen polThanks for testing and providing direction.
Comment #55
ckrinaTo address @javi-er 's feedback and move this issue to 9.4.x, the faster way might be to add a new MR against the correct branch and not try to change the current one (9.3.x to 9.4.x). The reason is that only the person that created the MR can change the branch.
Comment #56
javi-er commentedI fixed the issues on desktop and pushed the changes to the existing 9.3.x merge request, which will probably be closed, so I'm attaching also a patch against 9.3.x and a gif showing how it looks with different variants.
Comment #57
ckrinaThanks @javi-er! Would it be possible to provide that same patch but for 9.4.x then?
Comment #58
javi-er commented@ckrina yes! here's a patch for 9.4.x as well.
Comment #59
javi-er commentedsorry wrong file, here's the right 9.4.x patch
Comment #60
javi-er commentedI also made a patch for 9.2.x since I need it, I'm posting it as well in case it's useful for someone.
Comment #61
javi-er commentedComment #62
ckrinaI see this comment here about revisiting after https://www.drupal.org/node/3057581. And this issue is already in: should we change anything here or remove the comment?
#fffshould be replace byvar(--color-white).Comment #63
javi-er commented@ckrina, just replaced the color definition and removed the @todo you noticed since that change is now applied with the change in the other ticket as you mentioned.
Attached are updated 9.3 and 9.4 patches.
Comment #64
damienmckennaSimplifying the issue title a little, because it is not dependent upon the viewport size, and added a second set of steps to produce them.
Comment #65
yogeshmpawarResolved CSpell errors & added an interdiff as well.
Comment #66
javi-er commentedThanks @yogeshmpawar ! but I think that
var(--color-davysgray);needs to change to color:var(--color-gray-800);per https://www.drupal.org/project/drupal/issues/3154539Attaching new patches.
Comment #67
yogeshmpawarFixed CSpell errors.
Comment #68
kristen polBack to needs work due to "Drupal code quality checks failed."
Comment #69
javi-er commentedSorry for spamming with patches, re rolling to fix commit code checks.
Comment #71
javi-er commentedWhile looking at why tests are failing, I noticed that at /admin/structure/views/view/who_s_online the "Duplicate Who's online" drop-button was broken because the sub items on this particular element were inputs instead of links, I updated the above patch once again (just for 9.4) to address this.
Regarding the failing tests, I'm not sure why it's happening, the test is returning "Element matching css "#views-display-extra-actions.dropbutton--small" not found." at /admin/structure/views/view/who_s_online , however it's present, maybe it's a cache issue? this seems to be the last thing blocking this patch.
Comment #72
mherchelThis is issue is a bit funny, and IMHO should not be a stable blocker. I'm doing a mini-sprint with @lauriii and @ckrina we walked through this issue.
In the original summary:
From what I can tell, this issue was created as a minor note, but was then bumped to Major and a stable blocker in #39 based on the potential that the dropbutton can obscure other dropbuttons.
However @lauriii and I could not get this edge case to happen with newly-installed Drupal (standard profile) and simplified Chinese. We can edit the text of the page in Chrome Developer Tools to make it happen though.
So to recap, there’s the possibility of the dropbutton obscuring other dropbuttons, but without editing the HTML in dev tools, we cannot get this to happen. To me, this is a fairly extreme edge case.
The reason that this happens is that we hard-set the height of the dropbutton (~24px-ish). We do this because of nature of the HTML structure, which is not optimal. If we get into refactoring the HTML, we get into the territory of the current work that’s happening at #1899236: Add new Splitbutton render element to eventually replace Dropbutton
My suggestion (which was agreed with by @lauriii and @ckrina on a zoom call) is to set a minimum width of the dropbutton (@ckrina suggested 6rem), which would prevent even extremely long simplified Chinese strings from obscuring the next drop button. This is more of a bandaid, IMO, but it does fix the problem in all but the most extreme, extreme (to the extreme power) scenarios, and will suffice until the splitbutton is implemented.
Comment #73
mherchelHere's an image after I edit the text with dev tools to show that the dropbutton can obscure the next drop button.
Comment #74
mherchelUpdating summary
Comment #75
mherchelComment #76
mherchelHere is the 9.4.x with the CSS properly compiled.
Comment #78
andy-blumBefore patches, dropbuttons have the potential to overlap, but it seems the extremely long dropbutton is the one that gets clipped rather than it's neighboring normal-length dropbutton.
Long dropbutton hovered:

Overlapping normal dropbutton hovered:

After patches, the dropbutton's height is dramatically reduced even though the content is the same:

RTBC!
Comment #81
lauriiiCommitted 285c13a and pushed to 10.0.x. Also committed to 9.4.x. Thanks!