Merged
Conversation
…n variants,variantSelectors in result component,display disabled selections
There was a problem hiding this comment.
Pull Request Overview
This PR refactors variant handling to use the Athos API's built-in variant support, adding several enhancements including badge management for variants, variant selectors in result components, and the ability to display disabled variant selections.
Key changes:
- Adds support for Athos API built-in variants structure with direct integration
- Implements variant-specific badge handling that updates when variants are selected
- Adds
hideVariantSelectionsprop to Result component for controlling variant selector visibility - Introduces
showDisabledSelectionsconfig option to display unavailable variant options
Reviewed Changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/snap-store-mobx/src/types.ts | Makes field optional and adds showDisabledSelections config to support Athos API variants |
| packages/snap-store-mobx/src/Search/Stores/SearchResultStore.ts | Implements variant badge support, removes field requirement checks, and adds disabled selection tracking |
| packages/snap-store-mobx/src/Search/Stores/SearchResultStore.test.ts | Adds comprehensive test coverage for Athos API variants and badge behavior |
| packages/snap-shared/src/MockData/meta/atkzs2/meta.json | New mock metadata file for Athos API variant testing |
| packages/snap-preact/components/tests/cypress/component/molecules/result.cy.tsx | New E2E tests for Result component with variant selections |
| packages/snap-preact/components/src/components/Molecules/VariantSelection/VariantSelection.tsx | Styling updates for variant selection dropdowns including disabled states |
| packages/snap-preact/components/src/components/Molecules/Result/readme.md | Documents new hideVariantSelections prop |
| packages/snap-preact/components/src/components/Molecules/Result/Result.tsx | Adds variant selection rendering and fixes rating wrapper class name |
| packages/snap-preact/components/src/components/Molecules/Result/Result.test.tsx | Test file moved to skip file |
| packages/snap-preact/components/src/components/Molecules/Result/Result.stories.tsx | Adds Storybook controls for hideVariantSelections |
| packages/snap-preact/components/src/components/Molecules/Result/Result-test.skip | Contains skipped tests from Result.test.tsx |
| packages/snap-preact/components/src/components/Molecules/OverlayBadge/OverlayBadge.tsx | Updates to use display.badges for variant badge support |
| packages/snap-preact/components/src/components/Molecules/CalloutBadge/CalloutBadge.tsx | Updates to use display.badges for variant badge support |
| packages/snap-client/src/Client/transforms/searchResponse.ts | Transforms Athos variant data structure and adds badge support to variants |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/snap-store-mobx/src/Search/Stores/SearchResultStore.test.ts
Outdated
Show resolved
Hide resolved
packages/snap-store-mobx/src/Search/Stores/SearchResultStore.ts
Outdated
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Molecules/OverlayBadge/OverlayBadge.tsx
Outdated
Show resolved
Hide resolved
This was
linked to
issues
Nov 12, 2025
…est.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ayBadge/OverlayBadge.tsx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ding new variantResult component
Update variants refactor with mainline snap
…ork when inside of a swiper carousel
korgon
requested changes
Dec 31, 2025
packages/snap-controller/src/Autocomplete/AutocompleteController.ts
Outdated
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Atoms/Dropdown/Dropdown.tsx
Outdated
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Molecules/Slideshow/Slideshow.tsx
Outdated
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Molecules/Slideshow/Slideshow.tsx
Outdated
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Molecules/Slideshow/Slideshow.tsx
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Molecules/Slideshow/Slideshow.tsx
Show resolved
Hide resolved
korgon
requested changes
Jan 8, 2026
packages/snap-preact/components/src/components/Atoms/Button/Button.tsx
Outdated
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Molecules/Slideshow/Slideshow.tsx
Show resolved
Hide resolved
packages/snap-preact/components/src/components/Molecules/Slideshow/Slideshow.tsx
Outdated
Show resolved
Hide resolved
korgon
requested changes
Jan 12, 2026
There was a problem hiding this comment.
Let's do the following changes:
- pagination - lets make it look like carousel pagination (but still use Button component) - no icons, but need
name - need to spread variantSelection sub props in sub-component of Result component
- centerInsufficientSlides (or better named) prop
- alwaysShowNavigation prop to ensure consistent display (when desired - off by default)
alt->slideImageAlt
korgon
reviewed
Jan 13, 2026
packages/snap-preact/components/src/components/Molecules/Slideshow/Slideshow.tsx
Outdated
Show resolved
Hide resolved
…ns to controller config
…variant is available
… field for populating variants
…l uses of removed 'field' from variant configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
can use athos api built in variants,
badges in variants,
variantSelectors in result component,
display disabled selections