Locking the hall for a place change writes a class on every place, so a big venue pays for the whole hall to move one seat

Changing a held place narrows the hall to the places the swap may land on. That narrowing was applied one place at a time: beginning a change wrote two classes on every drawn place, and ending one walked them again to take the classes off, so a hall of twenty thousand places paid sixty thousand DOM writes to move one seat between two of them.

It is now one rule. Each place carries its grade as a data attribute, set in the loop that already draws it; the hall stands down through a single static rule while a change is in progress; and the map writes one rule naming the grade being replaced, which is the only part CSS cannot decide for itself. Beginning and ending a change is that rule plus one class on the place being replaced.

A correction to the issue. It says to run the existing coverage of the gesture before and after. There was none - the two tests with "Change" in the name are about the tariff control, not about changing a place - so the coverage was written first, against the unchanged implementation, and seen to pass there before anything moved. It asserts what a visitor meets, in computed style and in what a click does, rather than the class that happens to carry it, which is what lets the same test hold both implementations. The hall fixture gained one place of a second grade, because a hall of one grade cannot show the rule refusing anything.

Two things worth a reviewer's eye.

The generated rule uses an unquoted attribute value through CSS.escape(). An unquoted value has to be a valid identifier, so an escaped one cannot close the selector however the grade was keyed.

pointer-events does not reach the keyboard, and a place stays reachable by the roving tabindex while a change is in progress. The map already refused those by hand and still does, which is why the eligibility test remains in the click path rather than being deleted along with the pass over the hall.

The wording drive-by the issue asked for. The hint said to pick a place in the same tariff while the rule compared grades. The rule is the one that is right - a tariff may price several grades, and a swap must not quietly move a booker to a worse view - so the words moved to it, in English and in French. The gesture is now documented in docs/placement.md, where it was not before.

Verified: VenueMapPickerTest 30/30, the map's performance and fetch suites 5/5 with both asset budgets unmoved, phpcs, phpstan, eslint, stylelint and cspell clean, and potx reports nothing missing from the translation.

Merge request reports

Loading
Loading