Skip to content

Comments

feat: add ais.refinementList widget support#33

Open
sarahdayan wants to merge 5 commits intomainfrom
feat/refinement-list-widget
Open

feat: add ais.refinementList widget support#33
sarahdayan wants to merge 5 commits intomainfrom
feat/refinement-list-widget

Conversation

@sarahdayan
Copy link
Member

@sarahdayan sarahdayan commented Feb 22, 2026

Summary

  • Registers ais.refinementList in the runtime with passthrough transformParams (bucket 1 only, templates and transformItems left as TODOs)
  • Adds ais.refinementList to the $$supportedWidgets type union
  • Enables the widget in the toolbar with full field configuration: attribute, operator, limit, showMore, showMoreLimit, searchable, searchablePlaceholder, and cssClasses (12 class keys)
  • Adds paramLabels and paramDescriptions for all parameters
  • Adds sortBy parameter with a new select-list field type — a toggleable ordered list of <select> elements where each row picks from a fixed set of sort criteria (isRefined, count, name with asc/desc variants). Already-used values are disabled in other rows. Toggling on starts with one criterion; toggling off sends undefined (library default).
  • Uses visibleIf to conditionally show showMoreLimit only when showMore is enabled, and searchable sub-params (searchablePlaceholder, searchableIsAlwaysActive, searchableEscapeFacetValues, searchableSelectOnSubmit) only when searchable is enabled. Toggling a parent switch off clears all its dependent params back to undefined.

Preview

Capture d'écran 2026-02-22 à 16 32 02 Capture d'écran 2026-02-22 à 16 32 38 Capture d'écran 2026-02-22 à 16 33 00 Capture d'écran 2026-02-22 à 16 33 20

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for algolia-experiences-js ready!

Name Link
🔨 Latest commit 4b9c6a6
🔍 Latest deploy log https://app.netlify.com/projects/algolia-experiences-js/deploys/699c57ef57bf450008d9abbe
😎 Deploy Preview https://deploy-preview-33--algolia-experiences-js.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Feb 22, 2026

Deploy Preview for algolia-experiences-react ready!

Name Link
🔨 Latest commit 4b9c6a6
🔍 Latest deploy log https://app.netlify.com/projects/algolia-experiences-react/deploys/699c57effb4c24000804b1ae
😎 Deploy Preview https://deploy-preview-33--algolia-experiences-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sarahdayan sarahdayan changed the title feat: add ais.refinementList widget support feat: add ais.refinementList widget support Feb 22, 2026
@sarahdayan sarahdayan requested a review from dhayab February 23, 2026 10:16
sarahdayan and others added 5 commits February 23, 2026 14:36
Register the refinementList widget in the runtime and enable it in the
toolbar with full field configuration for attribute, operator, limit,
showMore, showMoreLimit, searchable, searchablePlaceholder, and
cssClasses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a new `select` field type that renders a segmented control
(tabs-style) for enum parameters like `operator`. Selecting the
default value sends `undefined` to avoid storing redundant values.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a `visibleIf` option to field overrides that hides a field unless
a sibling parameter matches an expected value. Use it for showMoreLimit
(only visible when showMore is true) and searchablePlaceholder (only
visible when searchable is true).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add searchableIsAlwaysActive, searchableEscapeFacetValues, and
searchableSelectOnSubmit fields, all conditionally visible when
searchable is enabled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a switch field is toggled off, any fields with a visibleIf
dependency on that switch are automatically reset to undefined.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sarahdayan sarahdayan force-pushed the feat/refinement-list-widget branch from db519b4 to 4b9c6a6 Compare February 23, 2026 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants