Skip to content

Comments

Remove SimpleCard and VariantSelector components#1020

Open
Copilot wants to merge 2 commits intomainfrom
copilot/remove-simplecard-and-variantselector
Open

Remove SimpleCard and VariantSelector components#1020
Copilot wants to merge 2 commits intomainfrom
copilot/remove-simplecard-and-variantselector

Conversation

Copy link
Contributor

Copilot AI commented Feb 16, 2026

Context

Removes deprecated SimpleCard and VariantSelector components from the public API. These components are being replaced by alternative implementations.

Breaking change: Removes two exported components from @nosto/web-components.

Changes

  • Removed components: SimpleCard and VariantSelector with all related files (stories, tests, styles)
  • Extracted shared constant: Created src/components/events.ts for EVENT_NAME_VARIANT_CHANGE to decouple event handling from removed components
  • Updated Bundle component: Now imports event constant from shared location, maintaining ability to listen for variant change events from external sources
  • Updated tests and stories: Bundle tests/stories now use plain divs instead of removed components

Impact: -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.

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
Copilot AI requested a review from timowestnosto February 16, 2026 09:14
@timowestnosto timowestnosto marked this pull request as ready for review February 16, 2026 09:15
Copilot AI review requested due to automatic review settings February 16, 2026 09:15
Copy link
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

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 SimpleCard and VariantSelector components with all associated files (implementations, tests, stories, styles, and documentation)
  • Extracts EVENT_NAME_VARIANT_CHANGE constant to a new shared src/components/events.ts file 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

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.

2 participants