[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Page MenuHomePhabricator

Template:Short description is not visible, but not treated as an invisible template
Closed, ResolvedPublic

Description

Observe you have selected an invisible template {{Short description}}:

image.png (296×556 px, 27 KB)

Templates which have no visible content should get a template icon placeholder, like {{Use British English}}:

image.png (138×412 px, 9 KB)

The invisible template is also generating block slugs ("Insert paragraph" buttons) either side of it, with no visible indication as to why there are two slugs at the top of the page:

image.png (287×682 px, 52 KB)

Event Timeline

There are two causes of this bug:
Part 1
Our definition of hasRendering in ve.ce.FocusableNode begins with:

ve.ce.FocusableNode.prototype.hasRendering = function () {
	if ( this.$element.text().trim() !== '' ) {
		return true;
	}
	...

We assume that any node that has non-whitespace text content has a rendering, but in this situation the template produces text wrapped in display:none (for accessibility or SEO visibility?).

Part 2
Because of the above mentioned display:none, when we append the invisible icon marker to the CE node, it is also hidden.

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

[VisualEditor/VisualEditor@master] Fix for showing "invisible icon" when root node is hidden

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

the template produces text wrapped in display:none (for accessibility or SEO visibility?)

So users can display the short description.

Change 775959 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Fix for showing "invisible icon" when root node is hidden

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

Change 777447 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (9a60258c5)

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

Change 777774 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[VisualEditor/VisualEditor@master] Revert "Fix for showing "invisible icon" when root node is hidden"

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

I reverted the fix because it didn't work correctly on mobile, where it caused the icons to be added to every template. Unfortunately I only noticed after merging it. Sorry about the mess with reverts.

Change 777774 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Revert "Fix for showing "invisible icon" when root node is hidden"

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

Change 777447 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (ffaefe32c)

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

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

[VisualEditor/VisualEditor@master] Re-apply "Fix for showing "invisible icon" when root node is hidden""

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

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

[mediawiki/extensions/MobileFrontend@master] Attach VE overlay to DOM while initializing

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

Change 777807 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] Attach VE overlay to DOM while initializing

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

Change 778228 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Re-apply "Fix for showing "invisible icon" when root node is hidden""

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

Change 784327 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (86de64d69)

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

Change 784327 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (86de64d69)

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

The template icon is displayed as a placeholder. This shows up as soon as you land on the page - even before engaging.

Screenshot 2022-04-29 at 23.22.23.png (636×2 px, 198 KB)

Screenshot 2022-04-29 at 23.22.59.png (496×1 px, 148 KB)

Screenshot 2022-04-29 at 23.23.43.png (488×1 px, 174 KB)

ppelberg claimed this task.