Skip to content

feat(instantsearch.css): add experimental Nova theme#6949

Merged
FabienMotte merged 9 commits into
masterfrom
feat/nova-theme
Apr 9, 2026
Merged

feat(instantsearch.css): add experimental Nova theme#6949
FabienMotte merged 9 commits into
masterfrom
feat/nova-theme

Conversation

@FabienMotte
Copy link
Copy Markdown
Contributor

@FabienMotte FabienMotte commented Apr 3, 2026

Summary

Add a new experimental Nova theme for instantsearch.css. This is based on the work done with @sarahdayan and @thomasbritton.

This theme provides widget-level styles for all core widgets (SearchBox, Hits, InfiniteHits, RefinementList, HierarchicalMenu, Menu, MenuSelect, Pagination, Breadcrumb, CurrentRefinements, NumericMenu, RangeInput, RatingMenu, ToggleRefinement, HitsPerPage, SortBy, GeoSearch, Panel, Highlight, RelevantSort, PoweredBy) along with shared utilities extracted into _nova-common.scss:

  • Global prefers-reduced-motion handling (single rule disabling all transitions/animations)
  • focus-visible outlines for interactive elements
  • Shared button / showMore styles, count badges, and checkbox styles
  • Automatic dark mode via prefers-color-scheme: dark

New CSS custom properties: --ais-shadow-xs, --ais-hit-min-width, --ais-chevron-icon, --ais-selected-chevron-icon, --ais-check-icon (with dark-mode variants for icon colors).

Additional changes:

  • Reset: added resets for links (text-decoration: none), selects (appearance: none), checkboxes (margin: 0), and .ais-RelevantSort-button
  • Components: refactored prefers-reduced-motion media queries out of autocomplete, chat, button, and filter-suggestions — transitions are now declared unconditionally and cancelled globally by _nova-common
  • Build: added Nova to the styles:minify script and registered nova.css / nova-min.css in bundlesize config

FX-3750

Result

The Nova theme compiles to ~10.5 kB unminified / ~9.75 kB minified. All existing themes (Algolia, Satellite) continue to build and pass bundlesize checks with their updated limits.

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 3, 2026

More templates

algoliasearch-helper

npm i https://pkg.pr.new/algolia/instantsearch/algoliasearch-helper@6949

instantsearch-ui-components

npm i https://pkg.pr.new/algolia/instantsearch/instantsearch-ui-components@6949

instantsearch.css

npm i https://pkg.pr.new/algolia/instantsearch/instantsearch.css@6949

instantsearch.js

npm i https://pkg.pr.new/algolia/instantsearch/instantsearch.js@6949

react-instantsearch

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch@6949

react-instantsearch-core

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch-core@6949

react-instantsearch-nextjs

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch-nextjs@6949

react-instantsearch-router-nextjs

npm i https://pkg.pr.new/algolia/instantsearch/react-instantsearch-router-nextjs@6949

vue-instantsearch

npm i https://pkg.pr.new/algolia/instantsearch/vue-instantsearch@6949

commit: 963dcca

@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 3, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

TIP This summary will be updated as you push new changes. Give us feedback

Comment thread packages/instantsearch.css/src/components/chat/_chat-carousel.scss
@Haroenv Haroenv changed the title feat(instantsearch.css): add Nova theme with widget styles feat(instantsearch.css): add Nova theme Apr 7, 2026
@FabienMotte FabienMotte marked this pull request as ready for review April 7, 2026 14:12
Copilot AI review requested due to automatic review settings April 7, 2026 14:12
Copy link
Copy Markdown
Contributor

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

Adds a new Nova theme to instantsearch.css, including widget-level styling for core widgets, shared Nova utilities (focus-visible, reduced-motion behavior, dark mode), and build/bundlesize registration so the new theme ships as nova.css / nova-min.css.

Changes:

  • Introduce src/themes/nova.scss and a set of new Nova widget styles under src/widgets/.
  • Add Nova-shared styling via src/shared/_nova-common.scss and extend shared variables with new custom properties (shadows, icons, hit grid sizing).
  • Update reset styles, reduced-motion handling, build scripts, devtools variables config, and bundlesize budgets to include Nova outputs.

Reviewed changes

Copilot reviewed 36 out of 36 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
packages/instantsearch.css/src/widgets/_toggle-refinement.scss Nova widget styling for ToggleRefinement.
packages/instantsearch.css/src/widgets/_searchbox.scss Nova widget styling for SearchBox (flex layout, loading indicator handling).
packages/instantsearch.css/src/widgets/_relevant-sort.scss Nova widget styling for RelevantSort.
packages/instantsearch.css/src/widgets/_refinement-list.scss Nova widget styling for RefinementList (list, selected/hover states, checkbox base styling).
packages/instantsearch.css/src/widgets/_rating-menu.scss Nova widget styling for RatingMenu (selected/hover, star fill behavior).
packages/instantsearch.css/src/widgets/_range-input.scss Nova widget styling for RangeInput (inputs + submit).
packages/instantsearch.css/src/widgets/_powered-by.scss Nova widget styling for PoweredBy logo coloring.
packages/instantsearch.css/src/widgets/_panel.scss Nova widget styling for Panel header/footer and collapse button.
packages/instantsearch.css/src/widgets/_pagination.scss Nova widget styling for Pagination (segmented control look).
packages/instantsearch.css/src/widgets/_numeric-menu.scss Nova widget styling for NumericMenu (radio styling and selection behavior).
packages/instantsearch.css/src/widgets/_menu.scss Nova widget styling for Menu (selected/hover states).
packages/instantsearch.css/src/widgets/_infinite-hits.scss Nova widget styling for InfiniteHits load more/previous buttons.
packages/instantsearch.css/src/widgets/_hits.scss Nova widget styling for Hits/InfiniteHits grid and hit cards.
packages/instantsearch.css/src/widgets/_highlight.scss Nova highlight styling for Highlight/Snippet and plain <mark>.
packages/instantsearch.css/src/widgets/_hierarchical-menu.scss Nova widget styling for HierarchicalMenu (chevron icons, nesting).
packages/instantsearch.css/src/widgets/_geo-search.scss Nova widget styling for GeoSearch controls (redo/reset, checkbox).
packages/instantsearch.css/src/widgets/_current-refinements.scss Nova widget styling for CurrentRefinements (pill layout + delete).
packages/instantsearch.css/src/widgets/_breadcrumb.scss Nova widget styling for Breadcrumb (responsive layout, link styles).
packages/instantsearch.css/src/themes/reset.scss Extend base reset to cover links/selects/checkbox margins and RelevantSort button reset.
packages/instantsearch.css/src/themes/nova.scss New Nova theme entrypoint wiring shared + widget styles.
packages/instantsearch.css/src/shared/_variables.scss Add new CSS custom properties (shadow-xs, icons, hit min width) + dark icon overrides.
packages/instantsearch.css/src/shared/_nova-common.scss New Nova-wide utilities: auto dark mode, focus-visible, shared buttons, select chevrons, checkbox checked styling.
packages/instantsearch.css/src/shared/_common.scss Add global reduced-motion rule to disable transitions/animations under prefers-reduced-motion: reduce.
packages/instantsearch.css/src/components/filter-suggestions.scss Remove no-preference gate so animation is globally disabled via reduced-motion rule.
packages/instantsearch.css/src/components/chat/_chat-toggle-button.scss Remove no-preference gate for transitions (rely on global reduced-motion).
packages/instantsearch.css/src/components/chat/_chat-prompt.scss Remove no-preference gate for transitions (rely on global reduced-motion).
packages/instantsearch.css/src/components/chat/_chat-overlay-layout.scss Remove no-preference gates for transitions (rely on global reduced-motion).
packages/instantsearch.css/src/components/chat/_chat-messages.scss Remove no-preference gates for transitions (rely on global reduced-motion).
packages/instantsearch.css/src/components/chat/_chat-message.scss Remove no-preference gates for transition/animation (rely on global reduced-motion).
packages/instantsearch.css/src/components/chat/_chat-message-loader.scss Remove no-preference gates for loader animations (rely on global reduced-motion).
packages/instantsearch.css/src/components/chat/_chat-carousel.scss Remove no-preference gates for transitions (rely on global reduced-motion).
packages/instantsearch.css/src/components/button.scss Remove no-preference gate for transitions (rely on global reduced-motion).
packages/instantsearch.css/src/components/autocomplete.scss Remove no-preference gates for transitions and adjust some spacing calculations.
packages/instantsearch.css/package.json Add Nova to styles:minify build output.
packages/instantsearch.css/devtools/index.js Register --ais-hit-min-width in variables configurator.
bundlesize.config.json Add bundlesize entries for Nova CSS outputs and adjust size limits.

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

Comment thread packages/instantsearch.css/src/widgets/_refinement-list.scss
Comment thread packages/instantsearch.css/src/widgets/_toggle-refinement.scss
Comment thread packages/instantsearch.css/src/widgets/_numeric-menu.scss
Comment thread packages/instantsearch.css/src/widgets/_breadcrumb.scss Outdated
Comment thread packages/instantsearch.css/src/widgets/_current-refinements.scss Outdated
Comment thread packages/instantsearch.css/src/widgets/_current-refinements.scss Outdated
Comment thread packages/instantsearch.css/src/shared/_common.scss
@FabienMotte FabienMotte requested review from a team, Haroenv and shaejaz and removed request for a team April 8, 2026 08:56
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

if these are widget styles specific to the new theme, should these be moved a more explicit nova dir?
not sure what the right approach is, to me if these are not generic then it seems confusing to have these in just a widgets folder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

maybe they're generic and should be used by future different themes as well that set different variables?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

yes that could also be a possibility, but I saw a lot of styles that seemed to be tied to the theme itself (such as borders, box-shadows, padding etc). perhaps those can be extracted out for the theme specific widget styles?

Copy link
Copy Markdown
Contributor Author

@FabienMotte FabienMotte Apr 8, 2026

Choose a reason for hiding this comment

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

Good idea, should we just change the folder name to nova-widgets to show that those styles are part of the new theme?

I think trying to split each widget file into "generic part" vs "nova-specific part" would be dificult to maintain, WDYT?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

let's for now only make the new theme widgets, and if we need to make another theme, do the split then, or maybe if another team needs it, they can do it?

Copy link
Copy Markdown
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

I think it's easier for now to consider al the widgets the "nova-version". If we'd want the other themes to use this too, they could later, of we can refactor this to have a "base" and "nova" version of the styles later too. For now as we only have the nova styles, I'm ok to commit to this version

@sarahdayan
Copy link
Copy Markdown
Member

Really cool @FabienMotte! I saw in the ticket that the theme is supposed to be experimental. Does it mean we accept breaking changes in minor versions?

I'd love to align on design tokens based on the work we've done in algolia/experiences, and I think we generally need to accept that this will take a few rounds to nail the breakdown of base and theme styles.

@Haroenv
Copy link
Copy Markdown
Contributor

Haroenv commented Apr 9, 2026

As long as we're not documenting it in the docs yet (or put experimental there) yes we can still make changes @sarahdayan

@FabienMotte
Copy link
Copy Markdown
Contributor Author

FabienMotte commented Apr 9, 2026

Really cool @FabienMotte! I saw in the ticket that the theme is supposed to be experimental. Does it mean we accept breaking changes in minor versions?

I'd love to align on design tokens based on the work we've done in algolia/experiences, and I think we generally need to accept that this will take a few rounds to nail the breakdown of base and theme styles.

Thank you @sarahdayan! I think it makes sense to allow breaking changes while the theme is still experimental. Once it becomes stable, we can deprecate the two old themes.

Aligning the design tokens in follow-up PRs also sounds good to me.

@FabienMotte FabienMotte changed the title feat(instantsearch.css): add Nova theme feat(instantsearch.css): add experimental Nova theme Apr 9, 2026
@FabienMotte FabienMotte merged commit 5289c69 into master Apr 9, 2026
15 checks passed
@FabienMotte FabienMotte deleted the feat/nova-theme branch April 9, 2026 23:14
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.

5 participants