Page MenuHomePhabricator

VE link context menu: remove link button hover border hidden by edit button border
Closed, ResolvedPublicBUG REPORT

Description

Whey you click a link in the VisualEditor to open the context menu, the right border of the remove link button next to the edit button is not visible when hovering.

See

image.png (147×412 px, 16 KB)

Event Timeline

Note that this is only visible when hovering the button. When in focus the border is visible.

The CSS for that part is part of OOUI see

.oo-ui-buttonGroupWidget .oo-ui-buttonElement {
  margin-right: 0;
  z-index: 0;
}

I'm not sure what's the reason behind that border-right: 0; Setting this to 1px would solve the issue.

I noticed this back then when we added this button, and as far as I'm aware of this is intentional. Let's please ask the OOUI designers before we add a potentially fragile CSS hack.

@ECohen_WMDE it would be great to get your input on this. What is the intended styling/behaviour for these types of buttons, if it exists?

I observe that this styling is consistent with the OOUI demo page, so it's at least not some MW/VE styling interfering. (Though it certainly could have been an accidental change somewhere along the line.)

This should work, I know because I spent a lot of time implementing it back in the day in https://gerrit.wikimedia.org/r/c/oojs/ui/+/310806. As you note, it works correctly with the :focus styles, and it also works with the :active styles.

Looks like the line that made hover styling work correctly was removed in https://gerrit.wikimedia.org/r/c/oojs/ui/+/353199. I don't really understand why is was removed, it seems almost accidental and unrelated to that patch?

I observe that this styling is consistent with the OOUI demo page

@Lena_WMDE I don't have any additional info beyond what's already been said about the demo page. Since it seems to be part of OOUI, then I'm not sure it's something we need to fix here separately.

This should work, I know because I spent a lot of time implementing it back in the day in https://gerrit.wikimedia.org/r/c/oojs/ui/+/310806. As you note, it works correctly with the :focus styles, and it also works with the :active styles.

Looks like the line that made hover styling work correctly was removed in https://gerrit.wikimedia.org/r/c/oojs/ui/+/353199. I don't really understand why is was removed, it seems almost accidental and unrelated to that patch?

I can't say for sure either anymore. Maybe it was about :active:hover, some browser quirks or it was truly unintended.

Lena_WMDE renamed this task from VE template dialog: Delete button border hidden by edit button border to VE template context menu: Delete button border hidden by edit button border.Mar 15 2022, 11:01 AM
Esanders renamed this task from VE template context menu: Delete button border hidden by edit button border to VE link context menu: remove link button hover border hidden by edit button border.Jan 26 2023, 12:47 PM
Esanders updated the task description. (Show Details)

Change 883928 had a related patch set uploaded (by Esanders; author: Esanders):

[oojs/ui@master] Restore z-index border fix for hovering buttons in group

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

Change 883928 merged by jenkins-bot:

[oojs/ui@master] Restore z-index border fix for hovering buttons in group

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

matmarex assigned this task to Esanders.

Change 886986 had a related patch set uploaded (by Jforrester; author: Jforrester):

[mediawiki/core@master] Update OOUI to v0.46.3

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

Change 886986 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.46.3

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