Page MenuHomePhabricator

Buttons appear with an unexpected grey border
Closed, ResolvedPublic

Assigned To
Authored By
Pginer-WMF
Aug 4 2023, 8:47 AM
Referenced Files
F42205737: image.png
Feb 28 2024, 8:56 AM
F42205634: image.png
Feb 28 2024, 8:56 AM
F41545650: image.png
Nov 29 2023, 10:19 AM
F41482896: image.png
Nov 10 2023, 1:39 PM
F41482890: image.png
Nov 10 2023, 1:39 PM
F41482893: image.png
Nov 10 2023, 1:39 PM
F37922265: image.png
Oct 3 2023, 2:27 AM
F37805274: image.png
Sep 26 2023, 8:07 AM

Description

Several buttons in Section Translation appear with a grey border when they are not expected to:

ig.m.wikipedia.org_w_index.php_title=Special_ContentTranslation&from=en&to=ig(Wiki Mobile) (1).png (568×320 px, 179 KB)
ig.m.wikipedia.org_w_index.php_title=Special_ContentTranslation&from=en&to=ig(Wiki Mobile).png (568×320 px, 61 KB)

This was tested when translating Sushi from English to Igbo.

Event Timeline

Change 951463 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] SX: Set border:none in .mw-ui-button in MWButton.vue

https://gerrit.wikimedia.org/r/951463

@Pginer-WMF as of CX3 Build 0.2.0+20230814, this issue seems to have disappeared from both firefox and chrome

image.png (405×720 px, 96 KB)
. Could there be more information you could possibly gather from your end in regard to this isshue?

Tried Section Translation on Igbo Wikipedia and the issue was not manifesting initially, but after taping on "New translation" the issues shows and it happens even when returning to the dashboard (where it was not occurring initially). The screencast illustrates this better:

This seems to be happening when the jQueryIME selector is loaded. It's feasible to also investigate that, as it's possible the fix provided here may not be entirely sufficient in covering other elements in pages where the IME is loaded (assuming other input elements). The patch posted covers the MWButton.vue, which is a component used across SX.

I'm still having trouble reproducing the issue locally:

sx-button-border-issue.gif (426×354 px, 558 KB)

I was able to reproduce the issue by loading the SX dashboard on desktop.

Patchset 3 fixes the issue, but also removes the border bottom that's present on the New translation screen.

image.png (375×630 px, 16 KB)

Change 951463 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SX: Set border-color:transparent in .mw-ui-button in MWButton.vue

https://gerrit.wikimedia.org/r/951463

Change 962059 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230929

https://gerrit.wikimedia.org/r/962059

Change 962059 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] CX3 Build 0.2.0+20230929

https://gerrit.wikimedia.org/r/962059

Potential regression from this fix, borders from the button in the screenshot below are gone:

image.png (720×356 px, 128 KB)

I think adding a conditional class to the button might help. The patch that was approved for this task set the border on all the MWButton.vue instances to transparent. That is why it has detrimental effects on other parts of SX.

Change 970787 had a related patch set uploaded (by Wangombe; author: Wangombe):

[mediawiki/extensions/ContentTranslation@master] SX: Fix missing borders on MWButton.vue

https://gerrit.wikimedia.org/r/970787

I'm able to reproduce this issue by opening the unified dashboard on desktop, and then clicking on the new translation button. Coming back to the dashboard after that causes the issue to be replicated on the dashboard as well

Note that I had to remove the changes made by Eugene in this patch: https://gerrit.wikimedia.org/r/951463

image.png (487×487 px, 48 KB)

image.png (448×986 px, 32 KB)

This is happening because there are some extra styles loaded on the New translation page that removes the border-color: transparent (See 1 in the image below) added by .mw-ui-button.mw-ui-button--text (See 2 in the image below)

I'm not able to figure out where the .mw-ui-button:not(:disabled) styles are applied from.

image.png (830×613 px, 89 KB)

I'm not able to figure out where the .mw-ui-button:not(:disabled) styles are applied from.

Can you try with debug=true? the <style> in the top right corner will show a link to the module then.

Nikerabbit changed the task status from Open to In Progress.Nov 23 2023, 8:46 AM

I'm not able to figure out where the .mw-ui-button:not(:disabled) styles are applied from.

Can you try with debug=true? the <style> in the top right corner will show a link to the module then.

Thanks but that doesn't help. I just get load.php

image.png (720×1 px, 147 KB)

What does it show if you click it? Alternatively, if there are steps to reproduce, I can try to have a look.

@abi_ can we just increase the specificity of the .mw-ui-button.mw-ui-button--text selector to forcefully apply the border-color: transparent style?

Change 970787 abandoned by Wangombe:

[mediawiki/extensions/ContentTranslation@master] SX: Fix missing borders on MWButton.vue

Reason:

MwButton is now replaced with CdxButton vue component in SX

https://gerrit.wikimedia.org/r/970787

Change 1004667 had a related patch set uploaded (by Nik Gkountas; author: Nik Gkountas):

[mediawiki/extensions/ContentTranslation@master] SXSentenceSelector: Use CdxIcon component

https://gerrit.wikimedia.org/r/1004667

Change 1004667 merged by jenkins-bot:

[mediawiki/extensions/ContentTranslation@master] SXSentenceSelector: Use CdxIcon component

https://gerrit.wikimedia.org/r/1004667

This issue was fixed in this patch. Additional side effects such as fixing this border issue resulted in a border disappearing in the pick a sentence step 'Done' button is also no longer an issue.

image.png (1×820 px, 105 KB)
image.png (2×1 px, 514 KB)