Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demos: Replace search.php with $.ajaxTransport() mock #2187

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

Krinkle
Copy link
Member

@Krinkle Krinkle commented Sep 28, 2023

@Krinkle Krinkle requested a review from mgol September 28, 2023 21:26
@Krinkle Krinkle force-pushed the demos-ajax branch 2 times, most recently from 2ee10b7 to d80d7ae Compare September 28, 2023 22:10
Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work! A few comments to address, otherwise looks good.

demos/tabs/ajax.html Show resolved Hide resolved
demos/search.js Outdated Show resolved Hide resolved
demos/search.js Show resolved Hide resolved
demos/tabs/ajax.html Show resolved Hide resolved
Copy link
Member

@mgol mgol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@mgol mgol added this to the 1.13.3 milestone Jan 3, 2024
@mgol mgol merged commit 604aae1 into jquery:main Jan 3, 2024
5 checks passed
@Krinkle Krinkle deleted the demos-ajax branch January 3, 2024 16:55
mgol added a commit to mgol/jquery-ui that referenced this pull request Jul 29, 2024
The `jqueryui.com` demos build process deAMDifies HTML files, replacing required
JS files with direct script tags. On the other hand, when running demos locally
from the jQuery UI repository, RequireJS is used.

This used to work fine until we got a new `search.js` file introduced in
jquerygh-2187. The deAMDifying process doesn't touch non-HTML files which made loading
autocomplete demos crash on "require is not a function"

To resolve the issues without a major rearchitecture of the build process,
the `search.js` file now detects AMD and use `require`, falling back to relying
on the `jQuery` global in the other case.

Ref jquerygh-2187
Ref jquery/jqueryui.com#216
mgol added a commit that referenced this pull request Jul 30, 2024
The `jqueryui.com` demos build process deAMDifies HTML files, replacing required
JS files with direct script tags. On the other hand, when running demos locally
from the jQuery UI repository, RequireJS is used.

This used to work fine until we got a new `search.js` file introduced in
gh-2187. The deAMDifying process doesn't touch non-HTML files which made loading
autocomplete demos crash on "require is not a function"

To resolve the issues without a major rearchitecture of the build process,
the `search.js` file now detects AMD and uses `require`, falling back to relying
on the `jQuery` global in the other case.

Closes gh-2274
Ref gh-2187
Ref jquery/jqueryui.com#216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants