Page MenuHomePhabricator

Small (but visible) templates shown with the icon meant for invisible templates
Closed, ResolvedPublic

Description

Small (but visible) templates are shown with the icon meant for invisible templates, for example {{' "}} (which outputs those two characters with a thin space): https://en.wikipedia.org/wiki/Goldwater_rule#Violations

image.png (189×932 px, 28 KB)

Event Timeline

Focusable nodes set an arbitrary minimum size of 8x8, this template is 5x16. Previously we also allowed anything that contained text content. This second check was dropped as it failed on text that was wrapped in display:none.

I think it makes sense to have a minimum size requirement event if there is text content, but it should perhaps allow the rectangular dimension of a single glyph.

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

[VisualEditor/VisualEditor@master] Change focusable minimum size from >8x8 to >=10x4

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

Change 789158 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Change focusable minimum size from >8x8 to >=10x4

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

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

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

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

Change 790015 merged by jenkins-bot:

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

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

After fix, the icon meant for invisible templates is not displayed - expected behavior
Edit mode:

Screenshot 2022-05-10 at 00.03.38.png (566×1 px, 126 KB)

Screenshot 2022-05-10 at 00.08.18.png (680×1 px, 181 KB)

Read mode:

Screenshot 2022-05-10 at 00.11.37.png (358×1 px, 17 KB)

Before fix:
Edit mode

Screenshot 2022-05-10 at 00.12.24.png (322×2 px, 169 KB)

Screenshot 2022-05-10 at 00.15.29.png (490×1 px, 129 KB)

Read mode:

Screenshot 2022-05-10 at 00.15.01.png (274×1 px, 162 KB)

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

[VisualEditor/VisualEditor@master] Follow-up Ic15dd21f: Fix typo width->height

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

Change 793566 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Follow-up Ic15dd21f: Fix typo width->height

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

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

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

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

Change 793746 merged by jenkins-bot:

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

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

I confirmed this as well as the other small templates. T307527#7915871 remains valid.

ppelberg claimed this task.