Page MenuHomePhabricator

Autosuggest: Last letter of the description in the popup box gets cutoff
Closed, ResolvedPublic5 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:

  • Last letter of the description in the popup box gets cut off as seen in the screenshots below, no matter which OS or browser it uses

What should have happened instead?:

  • Should display the whole description

Other information (browser name/version, screenshots, etc.):

OS: macOS 13.0
Browser: Chrome 109
Environment. test.wiki
Skin: Vector 2022

Test links:

https://test.wikipedia.org/wiki/Killer_Croc
https://test.wikidata.org/wiki/Q229231
https://test.wikidata.org/wiki/Q229230

T308059_Autosuggest_Words Cutoff1.png (952×1 px, 201 KB)

T308059_Autosuggest_Words Cutoff2.png (876×1 px, 183 KB)

T308059_Autosuggest_Wikidata.png (822×1 px, 170 KB)

Details

Other Assignee
TheresNoTime
TitleReferenceAuthorSource BranchDest Branch
T327951repos/commtech/autosuggest-sitelink!27s-mukutiT327951main
Avoid nesting div in span in radio button labelrepos/commtech/autosuggest-sitelink!23samwilsonnested-divmain
Customize query in GitLab

Event Timeline

I'm not able to reproduce this in Firefox or Chromium, in new or old Vector. All show the full description text, e.g.:

Killer-Croc-Test-Wikipedia.png (285×526 px, 38 KB)

I don't think this is likely, but it might've been because of the block level element within an inline one. I've made a MR to fix that: https://gitlab.wikimedia.org/repos/commtech/autosuggest-sitelink/-/merge_requests/23

Samwilson set the point value for this task to 5.Feb 23 2023, 1:11 AM

It sounds like the above changes haven't done anything to this bug. I'm still not able to reproduce it.

I did wonder if it was similar to T330221, but that's been closed as a dupe of T328069 which seems fairly different.

Could we not put some padding on that <div>? (10px probably being a bit much here..)

<span class="oo-ui-labelElement-label">
   <div>
      <a href="https://test.wikidata.org/wiki/Q229230" target="_blank">Q229230</a><span> (Crocodile)</span>
      <div style="padding-right: 10px; font-style: italic">reptile with a pointier, V-shaped snout, olive green or brown colour</div>
   </div>
</span>

I can't figure out why this test is failing — is it an issue with the test itself? I can't imagine the change caused it :-)

It looks like maybe the build script has to be run, i.e. npm run build, to also add those changes to the dist/ files.

It looks like maybe the build script has to be run, i.e. npm run build, to also add those changes to the dist/ files.

That'll do it :D

@Samwilson @TheresNoTime . Looks like we are good to go now as seen in the screenshots below! I did come across a minor issue with the Minerva skin though. It's the only skin that has a side scroller in the AutoSuggest box. Let me know if you want me to create a new ticket and close this one since the actual issue on this ticket has been resolved.

OS: macOS 13.2
Browser: Chrome 111, Firefox 111, Safari 16.3
Skins: Vector 2022, 2010, Minerva, MonoBook, Timeless
Test sites: https://test.wikipedia.org/wiki/Killer_Croc
https://test.wikipedia.org/wiki/Mandrill

Before Patch

T327951_Autosuggest_cutoffOld.png (803×1 px, 278 KB)

After Patch

T327951_Autosuggest_cutoffOld_Fix.png (865×1 px, 677 KB)

Minerva side scroll bar

T327951_Autosuggest_Minerva_SideScrollBar2.png (811×1 px, 115 KB)

T327951_Autosuggest_SideScrollBar.png (917×1 px, 286 KB)

@GMikesell-WMF Thanks! It looks like the Minerva scroll bar is a separate issue; can you create a new task for it?

GMikesell-WMF moved this task from QA 🐛 to Done 🏁 on the Community-Tech (CommTech-Kanban) board.

As mentioned from above.