Skip to content

chore(MultiAccordion): migrate to CSS Modules with visual regression baseline#1085

Open
DreaminDani wants to merge 3 commits into
mainfrom
chore/migrate-multi-accordion-css-modules
Open

chore(MultiAccordion): migrate to CSS Modules with visual regression baseline#1085
DreaminDani wants to merge 3 commits into
mainfrom
chore/migrate-multi-accordion-css-modules

Conversation

@DreaminDani

@DreaminDani DreaminDani commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Commits

  • test(MultiAccordion): add visual regression baseline before CSS Modules migration — adds stories, Playwright spec, and fresh PNG snapshots that capture the current rendering.
  • chore(MultiAccordion): migrate styling from styled-components to CSS Modules — replaces styled-components with .module.css + cva/cn. DOM-identical, byte-for-byte visual parity verified.

Verification

  • yarn test:visual tests/display/multi-accordion.spec.ts passes with zero snapshot regenerations
  • yarn test MultiAccordion, yarn lint:css, yarn lint:code, yarn format, yarn build all green
  • grep -r 'styled-components' src/components/MultiAccordion/ empty

Note

Low Risk
Presentation-only refactor with visual regression coverage; no API or logic changes beyond optional className passthrough.

Overview
MultiAccordion styling moves from styled-components to MultiAccordion.module.css, wired through cva/cn on the Radix root, item, trigger, and content. Public props and behavior stay the same; root and item also accept optional className.

Storybook gains a fixed-width harness and variant stories (sizes, link color, icons, checks, borders, open/multiple). A new Playwright spec snapshots those variants in light/dark plus hover/focus and basic keyboard/a11y checks. The changeset records a patch with no intended visual change.

Reviewed by Cursor Bugbot for commit c15dc70. Bugbot is set up for automated code reviews on this repo. Configure here.

DreaminDani and others added 2 commits June 18, 2026 10:05
…es migration

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…Modules

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@DreaminDani DreaminDani self-assigned this Jun 18, 2026
@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c15dc70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@clickhouse/click-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

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.

Pull request overview

This PR migrates MultiAccordion styling from styled-components to CSS Modules while adding Storybook + Playwright visual-regression coverage to preserve rendering parity across variants and themes.

Changes:

  • Added a dedicated Playwright visual-regression spec for MultiAccordion snapshots (variants + interactive states + basic keyboard/a11y checks).
  • Migrated MultiAccordion styles to MultiAccordion.module.css and wired class composition via cva/cn.
  • Expanded Storybook stories and added a fixed-width harness to stabilize visual snapshots.

Reviewed changes

Copilot reviewed 5 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/display/multi-accordion.spec.ts Adds Playwright visual-regression coverage for MultiAccordion variants/themes and interactive states.
src/components/MultiAccordion/MultiAccordion.tsx Replaces styled-components wrappers with Radix primitives + CSS Modules classes via cva/cn.
src/components/MultiAccordion/MultiAccordion.stories.tsx Adds harness decorator and variant stories used by visual regression.
src/components/MultiAccordion/MultiAccordion.module.css Introduces CSS Module styles equivalent to previous styled-components rules.
.changeset/migrate-multi-accordion-to-css-modules.md Records a patch changeset for the styling migration.

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

Comment thread src/components/MultiAccordion/MultiAccordion.tsx
Comment thread .changeset/migrate-multi-accordion-to-css-modules.md
Addresses PR review feedback: apply the empty base BEM class on the
status Icon so the base selector stays referenced. No visual change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@workflow-authentication-public

Copy link
Copy Markdown
Contributor

Storybook Preview Deployed

✅ Preview URL: https://click-iw3wm3qph-clickhouse.vercel.app

Built from commit: 6a4ebfb9e9ddefb0bf8432867e4b211fc7b86ce3

@DreaminDani DreaminDani requested a review from ariser June 18, 2026 17:13
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