Every booking surface posts a booker's clicks through one queue, which waits before sending so that a run of clicks becomes one request: four presses on a plus button, or six seats picked off a plan in a few seconds. The wait is one number for the whole site, since it is one booker, and it is currently written in the JavaScript itself as Drupal.yoyaku.delay = 400.

Four hundred milliseconds is a guess, and the right value depends on the venue: how fast its bookers click, how contended its seats are, and how far its visitors sit from the server. A site that wants a longer window has to edit the library to get one, which is a patch to carry.

So it becomes a setting of yoyaku_presentation, the module that owns the queue. A site setting rather than a field rule: this is not a behavior of a resource, it is how long the browser waits before it speaks, and a delay that differed per resource would teach a booker that one page of the site is slower than another. The JavaScript keeps its own default, so a site that never touches the setting behaves exactly as it does today, and the number is published to the browser only on a page that actually loads the queue.

Remaining tasks

  • A setting on the presentation settings form, in milliseconds, with the current value as its default and a description saying what it buys.
  • Config schema, and the setting published to drupalSettings only where the queue library is attached.
  • The queue reads the setting and falls back to its own constant, which stays the documented default.
  • A test that the queue waits as long as the site says, and the catch-up wait after an answer is not this number.

AI-Generated: Yes (analysis, issue text and code by Claude Opus, reviewed and run by the maintainer)

Issue fork yoyaku-3616594

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably’s picture

Status: Active » Needs review

  • mably committed 72cc5a2c on 1.x
    feat: #3616594 Let a site set how long the click queue waits before it...
mably’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.