Remove SimpleCard and VariantSelector components#1020
Open
Conversation
Co-authored-by: timowestnosto <13622115+timowestnosto@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove SimpleCard and VariantSelector components
Remove SimpleCard and VariantSelector components
Feb 16, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated SimpleCard and VariantSelector components from the public API as a breaking change. The components are being replaced by alternative implementations, resulting in a significant reduction of 3,413 lines of code while maintaining 95%+ test coverage.
Changes:
- Removes
SimpleCardandVariantSelectorcomponents with all associated files (implementations, tests, stories, styles, and documentation) - Extracts
EVENT_NAME_VARIANT_CHANGEconstant to a new sharedsrc/components/events.tsfile for decoupled event handling - Updates Bundle component to import the event constant from the new shared location, maintaining its ability to listen for variant change events from external sources
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/setup.ts | Removed imports for deleted SimpleCard and VariantSelector components |
| test/components/VariantSelector/*.spec.tsx | Deleted all VariantSelector test files |
| test/components/SimpleCard/*.spec.tsx | Deleted all SimpleCard test files |
| test/components/Bundle/Bundle.spec.tsx | Updated to use plain divs instead of removed components, simplified event simulation |
| src/main.ts | Removed public exports for SimpleCard and VariantSelector |
| src/components/events.ts | Created new file to centralize shared event constant |
| src/components/VariantSelector/** | Deleted all VariantSelector implementation files |
| src/components/SimpleCard/** | Deleted all SimpleCard implementation files |
| src/components/Bundle/Bundle.ts | Updated import to use shared event constant |
| src/components/Bundle/Bundle.stories.tsx | Replaced component usage with plain divs for visual examples |
| README.md | Removed SimpleCard and VariantSelector from components table |
| .github/instructions/testing.instructions.md | Removed reference to mockSimpleCardProduct |
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.
Context
Removes deprecated
SimpleCardandVariantSelectorcomponents from the public API. These components are being replaced by alternative implementations.Breaking change: Removes two exported components from
@nosto/web-components.Changes
SimpleCardandVariantSelectorwith all related files (stories, tests, styles)src/components/events.tsforEVENT_NAME_VARIANT_CHANGEto decouple event handling from removed componentsImpact: -3,413 LOC, maintains 95%+ test coverage
Related Jira ticket
Screenshots
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.