Skip to content

docs: highlight Algolia careers#1343

Open
benogeorge wants to merge 1332 commits intoalgolia:masterfrom
benogeorge:next
Open

docs: highlight Algolia careers#1343
benogeorge wants to merge 1332 commits intoalgolia:masterfrom
benogeorge:next

Conversation

@benogeorge
Copy link
Copy Markdown

Summary

  • add Algolia careers mention for Paris-based opportunities and job seekers

sarahdayan and others added 30 commits November 10, 2021 19:02
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
dhayab and others added 27 commits January 6, 2025 11:42
* chore: release v1.18.0

* fix

---------

Co-authored-by: Autocomplete[bot] <autocomplete-bot@algolia.com>
Co-authored-by: Haroen Viaene <hello@haroen.me>
* feat(redirect): await pending requests on submit

* fix: remove duplicate code

* chore: refactor promise syntax

* test: add tests for awaitSubmit

* test: awaitSubmit with onKeyDown

* fix: lint import errors

* test: update snapshot

* fix(redirect): move property to root plugin level

* Revert "fix(redirect): move property to root plugin level"

This reverts commit 7fe53c1.

* chore: rename function

* feat(wip): support plugin submit promise timeout

* chore: rename to awaitSubmit

* test: temporarily skip tests

* fix: reuse wait promise if already exists

* test: fix troublesome snapshot test

* chore: bump bundlesize values

* test: unskip and add unit tests

* chore: update the example to use default args

* test: fix mock

* chore: shrink bundlesize config number
* chore: release v1.19.0

* remainders
* fix(redirect): item mismatch with last search

* test: add test to check for mismatched query

* test: clean up redirect plugin tests

* chore: cleanup

* feat: add new type and doc comments

* test: more test cleanup

* feat: require new transformResponse

* test: cleanup

* chore: address import lint

* fix: split transform response into two fns

* chore: cleanup

* chore: revert transform response type name

* chore: pr feedback
These must have been added in a previous release that depended on an old version of autocomplete locally.
* chore: release v1.19.2

* fixes

---------

Co-authored-by: Autocomplete[bot] <autocomplete-bot@algolia.com>
Co-authored-by: Haroen Viaene <hello@haroen.me>
* fix(perf): pause animations when not displayed

Safari still calculates rendering for animations that are set with animateTransform, even if they aren't being displayed (svg or parent is `hidden`). This causes performance issues on older devices.

We work around this by manually pausing or unpausing the svg depending on whether it's displayed.

https://bugs.webkit.org/show_bug.cgi?id=298217
closes algolia#1322

* condition

* safer
* chore: release v1.19.3

* missed number updates
* fix(perf): pause loading icon animation on initial load

* call pauseAnimations conditionally
* chore: release v1.19.4

* is lerna broken or something?
…algolia#1330) (algolia#1331)

* fix(autocomplete-preset-algolia): support Unicode word characters in ReverseHighlight

* test(autocomplete-preset-algolia): add regression tests for Unicode ReverseHighlight

fixes algolia#1317

see algolia#1330

Co-authored-by: rinoshiyo <45587676+rinoshiyo@users.noreply.github.com>
* chore: release v1.19.5

* update version

---------

Co-authored-by: Autocomplete[bot] <autocomplete-bot@algolia.com>
Co-authored-by: Haroen Viaene <hello@haroen.me>
* chore: release v1.19.6

* fix

---------

Co-authored-by: Autocomplete[bot] <autocomplete-bot@algolia.com>
Co-authored-by: Haroen Viaene <hello@haroen.me>
* fix: panel position in positioned container (algolia#763)

* docs(examples): add example for positioned container
Make sure panel positioning is correct if the panel
is placed in a container that has been scrolled
horizontally or vertically.
* chore: release v1.19.7

* fix

---------

Co-authored-by: Autocomplete[bot] <autocomplete-bot@algolia.com>
Co-authored-by: Haroen Viaene <hello@haroen.me>
* chore: bump node version from 14 to 22

* chore(examples): migrate from Parcel to Vite (algolia#1341)

* chore(examples): migrate from Parcel to Vite

* bump node version in csb ci config

* chore: replace codesandbox ci with pkg.pr.new (algolia#1339)

* chore: replace codesandbox ci with pkg.pr.new

* trigger actions
Copilot AI review requested due to automatic review settings March 26, 2026 17:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR modernizes and expands the repository’s examples and tooling (Vite-based examples, new configs), but it doesn’t match the stated PR intent of “highlight Algolia careers”.

Changes:

  • Adds multiple new Vite-powered examples (React, InstantSearch, plugins, etc.) with accompanying configs and assets.
  • Introduces/updates repo-wide tooling/config (ESLint, Prettier, Stylelint, Babel, pkg-pr-new workflow).
  • Removes legacy Autocomplete.js-era files (old examples, Grunt/Bower, legacy templates).

Reviewed changes

Copilot reviewed 246 out of 893 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
examples/slack-with-emojis-and-commands/public/index.html Adds HTML shell for Slack example (CRA-style public file).
examples/slack-with-emojis-and-commands/package.json Adds Slack example package manifest (Vite).
examples/slack-with-emojis-and-commands/index.html Adds Vite entry HTML for Slack example.
examples/slack-with-emojis-and-commands/README.md Adds Slack example usage docs.
examples/slack-with-emojis-and-commands/.gitignore Adds Slack example gitignore.
examples/slack-with-emojis-and-commands/.eslintignore Disables ESLint for Slack example.
examples/reshape/vite.config.mjs Adds Vite config (port 1234) for reshape example.
examples/reshape/types/index.ts Exposes reshape example types.
examples/reshape/types/ProductHit.ts Adds reshape product hit types.
examples/reshape/types/Highlighted.ts Adds reshape highlight result types.
examples/reshape/style.css Adds reshape example styles.
examples/reshape/searchClient.ts Adds Algolia search client helper for reshape example.
examples/reshape/package.json Adds reshape example package manifest.
examples/reshape/index.html Adds reshape example HTML shell.
examples/reshape/functions/uniqBy.ts Adds reshape uniqBy reshape function.
examples/reshape/functions/normalizeReshapeSources.ts Adds reshape sources normalization helper.
examples/reshape/functions/limit.ts Adds reshape limit reshape function.
examples/reshape/functions/index.ts Re-exports reshape functions.
examples/reshape/functions/groupBy.ts Adds reshape groupBy reshape function.
examples/reshape/functions/AutocompleteReshapeFunction.ts Adds reshape function type helper.
examples/reshape/env.ts Adds example env globals bootstrap (preact).
examples/reshape/app.tsx Adds reshape example app using reshape pipeline.
examples/redirect-url/vite.config.mjs Adds Vite config (port 1234) for redirect-url example.
examples/redirect-url/style.css Adds redirect-url example styles.
examples/redirect-url/package.json Adds redirect-url example package manifest.
examples/redirect-url/index.html Adds redirect-url example HTML shell.
examples/redirect-url/env.ts Adds example env globals bootstrap (preact).
examples/redirect-url/app.tsx Adds redirect-url plugin demo app.
examples/redirect-url/README.md Adds redirect-url example docs.
examples/recently-viewed-items/vite.config.mjs Adds Vite config (port 1234) for recently-viewed-items example.
examples/recently-viewed-items/types/index.ts Exposes recently-viewed-items types.
examples/recently-viewed-items/types/ProductHit.ts Adds recently-viewed-items product hit types.
examples/recently-viewed-items/types/Highlighted.ts Adds recently-viewed-items highlight typing.
examples/recently-viewed-items/style.css Adds recently-viewed-items styles.
examples/recently-viewed-items/recentlyViewedItemsPlugin.tsx Implements recently viewed items custom plugin.
examples/recently-viewed-items/package.json Adds recently-viewed-items package manifest.
examples/recently-viewed-items/index.html Adds recently-viewed-items HTML shell.
examples/recently-viewed-items/env.ts Adds example env globals bootstrap (preact).
examples/recently-viewed-items/app.tsx Adds recently-viewed-items demo app.
examples/recently-viewed-items/README.md Adds recently-viewed-items docs.
examples/react/vite.config.mjs Adds Vite config for React example (port 1234).
examples/react/tsconfig.json Adds React example TypeScript config.
examples/react/src/styles.css Adds React example styles.
examples/react/src/index.tsx Adds React example entrypoint.
examples/react/src/App.tsx Adds React example integrating autocomplete renderer.
examples/react/package.json Adds React example package manifest.
examples/react/index.html Adds React example HTML shell.
examples/react/README.md Adds React example docs.
examples/react/.gitignore Adds React example gitignore.
examples/react-instantsearch/vite.config.mjs Adds Vite config for React InstantSearch example (port 1234).
examples/react-instantsearch/tsconfig.json Adds React InstantSearch TypeScript config.
examples/react-instantsearch/src/widgets/Panel.tsx Adds React InstantSearch panel widget component.
examples/react-instantsearch/src/main.tsx Adds React InstantSearch entrypoint.
examples/react-instantsearch/src/constants.ts Adds React InstantSearch constants.
examples/react-instantsearch/src/components/index.ts Exposes React InstantSearch components.
examples/react-instantsearch/src/components/Hit.tsx Adds React InstantSearch hit rendering component.
examples/react-instantsearch/src/App.tsx Adds React InstantSearch demo app.
examples/react-instantsearch/src/App.css Adds React InstantSearch styles.
examples/react-instantsearch/package.json Adds React InstantSearch package manifest.
examples/react-instantsearch/index.html Adds React InstantSearch HTML shell.
examples/react-instantsearch/README.md Adds React InstantSearch docs.
examples/react-instantsearch/.gitignore Adds React InstantSearch gitignore.
examples/react-17/vite.config.mjs Adds Vite config for React 17 example (port 1234).
examples/react-17/tsconfig.json Adds React 17 TypeScript config.
examples/react-17/src/index.tsx Adds React 17 entrypoint.
examples/react-17/src/index.css Adds React 17 styles.
examples/react-17/src/SearchIcon.tsx Adds React 17 icon component.
examples/react-17/src/Highlight.tsx Adds React 17 highlight helper component.
examples/react-17/src/ClearIcon.tsx Adds React 17 icon component.
examples/react-17/src/App.tsx Adds React 17 demo app wrapper.
examples/react-17/src/App.css Adds React 17 styling.
examples/react-17/public/robots.txt Adds robots.txt for React 17 example.
examples/react-17/public/manifest.json Adds manifest.json for React 17 example.
examples/react-17/package.json Adds React 17 example package manifest.
examples/react-17/index.html Adds React 17 example HTML shell.
examples/react-17/README.md Adds React 17 example docs.
examples/react-17/.gitignore Adds React 17 example gitignore.
examples/react-17/.eslintignore Disables ESLint for React 17 example.
examples/query-suggestions/vite.config.mjs Adds Vite config for query suggestions example (port 1234).
examples/query-suggestions/style.css Adds query suggestions example styles.
examples/query-suggestions/package.json Adds query suggestions package manifest.
examples/query-suggestions/index.html Adds query suggestions HTML shell.
examples/query-suggestions/env.ts Adds example env globals bootstrap (preact).
examples/query-suggestions/app.tsx Adds query suggestions demo app.
examples/query-suggestions/README.md Adds query suggestions docs.
examples/query-suggestions-with-recent-searches/vite.config.mjs Adds Vite config (port 1234).
examples/query-suggestions-with-recent-searches/style.css Adds styles.
examples/query-suggestions-with-recent-searches/package.json Adds package manifest.
examples/query-suggestions-with-recent-searches/index.html Adds HTML shell.
examples/query-suggestions-with-recent-searches/env.ts Adds env globals bootstrap.
examples/query-suggestions-with-recent-searches/app.tsx Adds combined QS + recent searches demo.
examples/query-suggestions-with-recent-searches/README.md Adds docs.
examples/query-suggestions-with-recent-searches-and-categories/vite.config.mjs Adds Vite config (port 1234).
examples/query-suggestions-with-recent-searches-and-categories/style.css Adds styles.
examples/query-suggestions-with-recent-searches-and-categories/package.json Adds package manifest.
examples/query-suggestions-with-recent-searches-and-categories/index.html Adds HTML shell.
examples/query-suggestions-with-recent-searches-and-categories/env.ts Adds env globals bootstrap.
examples/query-suggestions-with-recent-searches-and-categories/app.tsx Adds QS + recent searches + categories demo.
examples/query-suggestions-with-recent-searches-and-categories/README.md Adds docs.
examples/query-suggestions-with-inline-categories/vite.config.mjs Adds Vite config (port 1234).
examples/query-suggestions-with-inline-categories/style.css Adds styles.
examples/query-suggestions-with-inline-categories/package.json Adds package manifest.
examples/query-suggestions-with-inline-categories/index.html Adds HTML shell.
examples/query-suggestions-with-inline-categories/env.ts Adds env globals bootstrap.
examples/query-suggestions-with-inline-categories/app.tsx Adds inline categories QS demo.
examples/query-suggestions-with-inline-categories/README.md Adds docs.
examples/query-suggestions-with-hits/vite.config.mjs Adds Vite config (port 1234).
examples/query-suggestions-with-hits/types/index.ts Exposes types.
examples/query-suggestions-with-hits/types/ProductHit.ts Adds product hit types.
examples/query-suggestions-with-hits/style.css Adds styles.
examples/query-suggestions-with-hits/package.json Adds package manifest.
examples/query-suggestions-with-hits/index.html Adds HTML shell.
examples/query-suggestions-with-hits/env.ts Adds env globals bootstrap.
examples/query-suggestions-with-hits/README.md Adds docs.
examples/query-suggestions-with-categories/vite.config.mjs Adds Vite config (port 1234).
examples/query-suggestions-with-categories/style.css Adds styles.
examples/query-suggestions-with-categories/package.json Adds package manifest.
examples/query-suggestions-with-categories/index.html Adds HTML shell.
examples/query-suggestions-with-categories/env.ts Adds env globals bootstrap.
examples/query-suggestions-with-categories/app.tsx Adds QS with categories demo.
examples/query-suggestions-with-categories/README.md Adds docs.
examples/preview-panel-in-modal/vite.config.mjs Adds Vite config (port 1234).
examples/preview-panel-in-modal/style.css Adds styles.
examples/preview-panel-in-modal/package.json Adds package manifest.
examples/preview-panel-in-modal/index.html Adds HTML shell.
examples/preview-panel-in-modal/env.ts Adds env globals bootstrap.
examples/preview-panel-in-modal/app.tsx Adds preview panel-in-modal demo.
examples/preview-panel-in-modal/README.md Adds docs.
examples/playground/vite.config.mjs Adds Vite config (port 1234).
examples/playground/types/index.ts Exposes types.
examples/playground/types/ProductHit.ts Adds product hit types.
examples/playground/types/Highlighted.ts Adds highlighted types.
examples/playground/style.css Adds styles.
examples/playground/shortcutsPlugin.tsx Adds shortcuts plugin.
examples/playground/package.json Adds package manifest.
examples/playground/index.html Adds HTML shell.
examples/playground/env.ts Adds env globals bootstrap.
examples/playground/darkMode.ts Adds dark mode helper.
examples/playground/categoriesPlugin.tsx Adds categories plugin.
examples/playground/README.md Adds docs.
examples/panel-placement/vite.config.mjs Adds Vite config (port 1234).
examples/panel-placement/style.css Adds styles.
examples/panel-placement/package.json Adds package manifest.
examples/panel-placement/index.html Adds HTML shell.
examples/panel-placement/env.ts Adds env globals bootstrap.
examples/panel-placement/app.tsx Adds panel placement demo app.
examples/panel-placement/README.md Adds docs.
examples/panel-placement-positioned/vite.config.mjs Adds Vite config (port 1234).
examples/panel-placement-positioned/style.css Adds styles.
examples/panel-placement-positioned/package.json Adds package manifest.
examples/panel-placement-positioned/index.html Adds HTML shell (positioned parent).
examples/panel-placement-positioned/env.ts Adds env globals bootstrap.
examples/panel-placement-positioned/app.tsx Adds positioned panel placement demo.
examples/panel-placement-positioned/README.md Adds docs.
examples/multiple-datasets-with-headers/vite.config.mjs Adds Vite config (port 1234).
examples/multiple-datasets-with-headers/style.css Adds styles.
examples/multiple-datasets-with-headers/package.json Adds package manifest.
examples/multiple-datasets-with-headers/index.html Adds HTML shell.
examples/multiple-datasets-with-headers/env.ts Adds env globals bootstrap.
examples/multiple-datasets-with-headers/categoriesPlugin.tsx Adds categories plugin for example.
examples/multiple-datasets-with-headers/app.tsx Adds multiple datasets demo app.
examples/instantsearch/vite.config.mjs Adds Vite config (port 1234).
examples/instantsearch/style.css Adds styles.
examples/instantsearch/src/searchClient.ts Adds shared search client for InstantSearch example.
examples/instantsearch/src/isModifierEvent.ts Adds modifier-event helper.
examples/instantsearch/src/instantsearch.ts Adds InstantSearch wiring + routing helpers.
examples/instantsearch/src/debounce.ts Adds debounce helper.
examples/instantsearch/src/app.ts Adds app entry to start InstantSearch + Autocomplete.
examples/instantsearch/package.json Adds InstantSearch example package manifest.
examples/instantsearch/index.html Adds HTML shell.
examples/instantsearch/env.ts Adds env globals bootstrap.
examples/instantsearch/README.md Adds docs.
examples/index.html Removes legacy examples index page.
examples/html-templates/vite.config.mjs Adds Vite config (port 1234).
examples/html-templates/style.css Adds styles.
examples/html-templates/package.json Adds package manifest.
examples/html-templates/index.html Adds HTML templates example shell.
examples/html-templates/env.js Adds env globals bootstrap (JS).
examples/html-templates/app.js Adds HTML templates example app.
examples/html-templates/README.md Adds docs.
examples/github-repositories-custom-plugin/vite.config.mjs Adds Vite config (port 1234).
examples/github-repositories-custom-plugin/style.css Adds styles.
examples/github-repositories-custom-plugin/package.json Adds package manifest.
examples/github-repositories-custom-plugin/index.html Adds HTML shell.
examples/github-repositories-custom-plugin/env.ts Adds env globals bootstrap.
examples/github-repositories-custom-plugin/createGitHubReposPlugin.tsx Adds custom GitHub repos plugin implementation.
examples/github-repositories-custom-plugin/app.tsx Adds GitHub repos example app.
examples/github-repositories-custom-plugin/README.md Adds docs.
examples/github-notification-filters/vite.config.mjs Adds Vite config (port 1234).
examples/github-notification-filters/utils/index.ts Exposes utils.
examples/github-notification-filters/utils/groupBy.ts Adds groupBy util.
examples/github-notification-filters/types/index.ts Exposes types.
examples/github-notification-filters/types/Repository.ts Adds repository type.
examples/github-notification-filters/types/NotificationFilter.ts Adds notification filter type.
examples/github-notification-filters/types/Contributor.ts Adds contributor type.
examples/github-notification-filters/types/AutocompleteItem.ts Adds autocomplete item type.
examples/github-notification-filters/style.css Adds styles.
examples/github-notification-filters/searchClient.ts Adds search client helper.
examples/github-notification-filters/package.json Adds package manifest.
examples/github-notification-filters/items.ts Adds demo data/query logic for filters example.
examples/github-notification-filters/index.html Adds HTML shell.
examples/github-notification-filters/env.ts Adds env globals bootstrap.
examples/github-notification-filters/components/index.ts Exposes components.
examples/github-notification-filters/components/TagItem.tsx Adds tag UI component.
examples/github-notification-filters/components/QueryItem.tsx Adds query item component.
examples/github-notification-filters/components/PrefixItem.tsx Adds prefix suggestion component.
examples/github-notification-filters/components/PostfixItem.tsx Adds postfix suggestion component.
examples/github-notification-filters/components/PanelLayout.tsx Adds panel layout component.
examples/github-notification-filters/components/FilterHeader.tsx Adds header component.
examples/github-notification-filters/README.md Adds docs.
examples/basic_jquery.html Removes legacy jQuery basic example.
examples/basic_angular.html Removes legacy Angular basic example.
examples/basic.html Removes legacy basic example.
bundlesize.config.json Adds bundle size enforcement config for packages.
bower.json Removes legacy Bower manifest.
babel.config.js Adds Babel config for monorepo builds.
LICENSE Updates license header text/formatting.
Gruntfile.js Removes legacy Grunt build file.
CONTRIBUTING.md Rewrites contribution guide for current repo workflows.
.stylelintrc.json Adds Stylelint config (with Prettier + a11y rules).
.prettierrc Adds Prettier config.
.prettierignore Adds Prettier ignore list.
.nvmrc Pins Node version.
.github/workflows/pkg-pr-new.yml Adds workflow to publish preview packages.
.github/PULL_REQUEST_TEMPLATE.md Updates PR template wording.
.github/ISSUE_TEMPLATE/config.yml Adds issue template config with discussion links.
.github/ISSUE_TEMPLATE/Bug_report.md Adds bug report issue template.
.github/ISSUE_TEMPLATE.md Removes legacy issue template.
.gitattributes Removes legacy diff rules for dist files.
.eslintrc.js Adds new ESLint config.
.eslintrc Removes legacy ESLint config.
.eslintignore Adds ESLint ignore list.
.env.sample Adds sample env for GitHub token.
.editorconfig Adds EditorConfig.
.coveralls.yml Removes legacy Coveralls config.
.browserslistrc Adds browserslist defaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +1 to +3
# Contributing to Autocomplete

First of all, thanks for taking a look at contributing here 🎉 If you have any questions while contributing, feel free to open an issue or to send an email to <support@algolia.com> mentioning the PR or issue you're working on.
Welcome to the contributing guide for Autocomplete!
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

The PR title/description says it's a docs-only change to highlight Algolia careers, but the diff introduces a large set of new examples and tooling changes plus removes legacy build files. Please update the PR title/description to reflect the actual scope, or split this into separate PRs (e.g., tooling migration, examples addition, legacy cleanup) to keep review/rollback manageable.

Copilot uses AI. Check for mistakes.
"noEmit": true,
"jsx": "react-jsx"
},
"include": ["src"],
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This tsconfig.json has a trailing comma after the include array, which makes the JSON invalid and will break TypeScript tooling. Remove the trailing comma.

Suggested change
"include": ["src"],
"include": ["src"]

Copilot uses AI. Check for mistakes.
Comment on lines +7 to +10
(global as any).__DEV__ = process.env.NODE_ENV !== 'production';
(global as any).__TEST__ = false;
(global as any).h = preact.h;
(global as any).React = preact;
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

global is not guaranteed to exist in a Vite/browser runtime, so this can throw at module evaluation time. Use globalThis (or window) for browser-safe globals assignment. This pattern appears in multiple example env.ts files and should be updated consistently.

Suggested change
(global as any).__DEV__ = process.env.NODE_ENV !== 'production';
(global as any).__TEST__ = false;
(global as any).h = preact.h;
(global as any).React = preact;
(globalThis as any).__DEV__ = process.env.NODE_ENV !== 'production';
(globalThis as any).__TEST__ = false;
(globalThis as any).h = preact.h;
(globalThis as any).React = preact;

Copilot uses AI. Check for mistakes.
Comment on lines +9 to +21
type UniqByPredicate<TItem extends BaseItem> = (params: {
source: AutocompleteReshapeSource<TItem>;
item: TItem;
}) => TItem;

export const uniqBy: AutocompleteReshapeFunction<UniqByPredicate<any>> = <
TItem extends BaseItem
>(
predicate
) => {
return function runUniqBy(...rawSources) {
const sources = normalizeReshapeSources(rawSources);
const seen = new Set<TItem>();
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

UniqByPredicate is typed to return TItem, but the example usage returns a string key (e.g., query/label). This is a concrete type mismatch and also makes the Set-based de-duping incorrect if callers intend to dedupe by derived keys. Change the predicate to return a key type (e.g., string | number | symbol or generic TKey) and store keys in Set<TKey>.

Copilot uses AI. Check for mistakes.
Comment on lines +30 to +37

return function (...args: TParams) {
if (timerId) {
clearTimeout(timerId);
}

return new Promise<TResponse>((resolve) => {
timerId = setTimeout(() => resolve(fn(...args)), time);
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

Clearing the timeout means previously returned Promises never resolve/reject, leaving callers hanging (and potentially leaking). For Autocomplete sources, this can cause stale getSources calls to remain pending indefinitely. Prefer a debounce implementation that settles prior Promises (e.g., resolving the previous call with the latest result, rejecting with a cancellation error, or using AbortController to cancel the underlying fetch).

Suggested change
return function (...args: TParams) {
if (timerId) {
clearTimeout(timerId);
}
return new Promise<TResponse>((resolve) => {
timerId = setTimeout(() => resolve(fn(...args)), time);
let lastReject:
| ((reason?: unknown) => void)
| undefined = undefined;
return function (...args: TParams) {
if (timerId) {
clearTimeout(timerId);
// Reject the previous promise so callers are not left hanging.
if (lastReject) {
lastReject(new Error('Debounced'));
}
}
return new Promise<TResponse>((resolve, reject) => {
lastReject = reject;
timerId = setTimeout(() => {
timerId = undefined;
lastReject = undefined;
resolve(fn(...args));
}, time);

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +23
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

React 17 is paired with @types/react / @types/react-dom v19, which is incompatible and can break TypeScript builds/editor tooling. Align the @types/* major versions with the React major used by the example (or remove types if the example is not TypeScript-based). Similar version mismatches appear in other examples too.

Suggested change
"@types/react": "^19.0.7",
"@types/react-dom": "^19.0.3",
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",

Copilot uses AI. Check for mistakes.
npm start
```

Open <http://localhost:1234> to see your app.
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This README instructs users to open localhost:1234, but this example doesn’t include a vite.config.* setting server.port = 1234 (unlike many other examples in this PR). Either add a Vite config for this example or update the README to the actual default Vite port to prevent broken local-run instructions.

Suggested change
Open <http://localhost:1234> to see your app.
Open <http://localhost:5173> to see your app.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +26
checked
/>
<label for="input-wrapper-width">input-wrapper-width</label>
<input type="radio" value="start" name="placement" />
<label for="start">start</label>
<input type="radio" value="end" name="placement" />
<label for="end">end</label>
<input type="radio" value="full-width" name="placement" />
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

Each <label for=\"...\"> points to an element id that doesn’t exist on the corresponding <input>, so labels won’t be associated correctly (hurts click targets and screen reader UX). Add matching id attributes to the radio inputs (or wrap inputs with labels).

Suggested change
checked
/>
<label for="input-wrapper-width">input-wrapper-width</label>
<input type="radio" value="start" name="placement" />
<label for="start">start</label>
<input type="radio" value="end" name="placement" />
<label for="end">end</label>
<input type="radio" value="full-width" name="placement" />
id="input-wrapper-width"
checked
/>
<label for="input-wrapper-width">input-wrapper-width</label>
<input type="radio" value="start" name="placement" id="start" />
<label for="start">start</label>
<input type="radio" value="end" name="placement" id="end" />
<label for="end">end</label>
<input type="radio" value="full-width" name="placement" id="full-width" />

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,20 @@
<html lang="en">
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

This HTML file (and several others added in this PR) is missing <!DOCTYPE html>, which can trigger quirks mode and inconsistent styling/layout. Add the doctype at the top for standards mode.

Copilot uses AI. Check for mistakes.
return collection.reduce<Record<TKey, TValue[]>>((acc, item) => {
const key = iteratee(item);

if (!acc.hasOwnProperty(key)) {
Copy link

Copilot AI Mar 26, 2026

Choose a reason for hiding this comment

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

Using acc.hasOwnProperty(key) is unsafe if hasOwnProperty is shadowed on the object. Prefer Object.prototype.hasOwnProperty.call(acc, key) (or Object.hasOwn(acc, key) if the project’s Node/browser targets allow it).

Suggested change
if (!acc.hasOwnProperty(key)) {
if (!Object.prototype.hasOwnProperty.call(acc, key)) {

Copilot uses AI. Check for mistakes.
@Haroenv
Copy link
Copy Markdown
Contributor

Haroenv commented Mar 26, 2026

you have to target the pull request to next instead of master, but I'm a little interested into why you made this PR, do you mind clarifying?

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.