Skip to content

Scope the .ready() comment to the jQuery this gem runs on - #16

Merged
Fivell merged 1 commit into
masterfrom
fix/jquery4-comment
Oct 1, 2026
Merged

Fivell merged 1 commit into
masterfrom
fix/jquery4-comment

Conversation

@Fivell

@Fivell Fivell commented Oct 1, 2026

Copy link
Copy Markdown
Member

Comment-only follow-up to #14.

The comment that landed with the binding fix reads:

jQuery 4 keeps that implementation, so waiting buys nothing there either

Accurate — jQuery.fn.ready is present in 4.0.0 with the same Deferred-based body — but beside the point, and it ships to every consumer of the gem and the npm package.

After #15 the gemspec declares activeadmin ~> 3.2, and Active Admin 3's base.js requires jquery3 outright, so this code only ever runs on jQuery 3.7.1. A reader weighing a jQuery-4 caveat is weighing a configuration the gem refuses to install into.

Keeps the justification that actually holds — jQuery 3 schedules .ready() through setTimeout, so the popup was inert for a macrotask — and drops the rest.

No behaviour change; the suite is unaffected.

The comment that shipped with the binding fix said jQuery 4 keeps the same
.ready() implementation. That is true, but it is also beside the point: the
gemspec pins activeadmin ~> 3.2, and Active Admin 3 requires jquery3
outright in its base.js, so this code only ever runs on jQuery 3. Reasoning
about a version the gem cannot be installed alongside is noise in a file
that ships to every consumer.

State the jQuery 3 behaviour, which is the whole justification, and drop
the rest.
@Fivell
Fivell merged commit edaa554 into master Oct 1, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant