Plugin switches in right-to-left: the knob is drawn outside its track, so on and off differ only by colour #517
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#517
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found on 2026-09-29 in a read-only review of postulo at
95348908d, reading the switch's paint and rendering the compiled stylesheet in headless Chromium underdir="ltr"anddir="rtl".Checked again on 2026-10-01 against
mainat0a5cad587: still present.The switch's knob travels by a physical translation, so in a right-to-left page it moves the wrong way. Basecoat lays the knob out as the first flex item of an
inline-flexinput, which puts it against the inline-start edge: the left in English, the right in Arabic. The paint then pushes it right in both directions. Underrtlthe knob of a switch that is off overhangs the track's edge by 2px, and the knob of a switch that is on sits entirely outside the track. In the rendering the on-state knob was drawn over the neighbouring control.assets/css/basecoat.css:169-173(.input[type="checkbox"][role="switch"]:before:translate-x-0.5andchecked:before:translate-x-4); the structure is Basecoat'scomponents/switch.css(inline-flex … items-center,before:block). Used bytemplates/server/plugins.html:83andtemplates/server/person_plugins.html:74.aris incore/languages.pyandbase.html:2setsdirfrom it) opens Server settings → Plugins or a person's plugins. The computedtranslateof the knob is2pxoff and16pxon in both directions. Every switch that is on shows a filled track with no knob in it and a white knob beside it; every switch that is off shows its knob hanging over the track's end.tests/e2e/test_direction.pywalks/server/plugins/underrtlbut only runs axe, which does not measure where a pseudo-element is drawn. The physical-side lint intests/test_template_lint.pycovers margins, padding, insets, borders and text alignment, nottranslate-x.rtl:before:-translate-x-0.5 rtl:checked:before:-translate-x-4to the same@apply, or by placing the knob with a logical property (margin-inline-start) instead of a translation. Consider addingtranslate-xon direction-dependent components to the physical-side lint, or listing it in the stylesheet's comment as the exception that needs anrtl:partner.Done when
tests/e2e/test_direction.pysigns in with the language set toar, opens/server/plugins/, and asserts for one switch that is on and one that is off that the knob's box (read from the::beforegeometry, or from a screenshot region) lies inside the input's box. It fails today and passes after the fix.