Skip to content

refactor: migrate Button and Accordion to macaw-ui-next, delete legacy filter ui - #6922

Merged
lkostrowski merged 4 commits into
mainfrom
lkostrowski/macaw-next-button-accordion
Sep 2, 2026
Merged

refactor: migrate Button and Accordion to macaw-ui-next, delete legacy filter ui#6922
lkostrowski merged 4 commits into
mainfrom
lkostrowski/macaw-next-button-accordion

Conversation

@lkostrowski

Copy link
Copy Markdown
Member

Replace the last Material-UI / legacy macaw-ui Button, Accordion and
AccordionSummary usages with their macaw-ui-next equivalents.

Legacy macaw Button defaulted to variant="tertiary"; macaw-ui-next
defaults to primary, so bare <Button> call sites now pass the variant
explicitly to keep their appearance.

components/Button/Button existed only to turn href into a react-router
Link. Its single consumer (NotFoundPage) always received internal URLs,
so the wrapper is dropped in favour of as={Link}.

FilterContent's accordion now relies on Radix single+collapsible behaviour,
which removes the manual open/close handler and the two makeStyles blocks
that only existed to strip Material-UI's default styling.

@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3a10292

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

This PR includes changesets to release 1 package
Name Type
saleor-dashboard 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

@codecov

codecov Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 58.09%. Comparing base (c1315d4) to head (3a10292).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...c/components/AppLayout/ListFilters/ListFilters.tsx 0.00% 2 Missing ⚠️
src/components/NotFoundPage/NotFoundPage.tsx 66.66% 1 Missing ⚠️
...ts/ProductExportDialog/ProductExportDialogInfo.tsx 0.00% 1 Missing ⚠️
src/shipping/views/RateUpdate.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6922      +/-   ##
==========================================
+ Coverage   57.94%   58.09%   +0.15%     
==========================================
  Files        3398     3374      -24     
  Lines       73579    73157     -422     
  Branches    19418    19283     -135     
==========================================
- Hits        42633    42502     -131     
- Misses      29057    30028     +971     
+ Partials     1889      627    -1262     
Flag Coverage Δ
storybook 54.04% <0.00%> (-0.13%) ⬇️
units 51.67% <55.55%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lkostrowski
lkostrowski force-pushed the lkostrowski/macaw-next-button-accordion branch from 55694b1 to 1233bed Compare September 2, 2026 11:43
lkostrowski and others added 4 commits September 2, 2026 13:49
Replace the last Material-UI / legacy macaw-ui `Button`, `Accordion` and
`AccordionSummary` usages with their macaw-ui-next equivalents.

Legacy macaw `Button` defaulted to `variant="tertiary"`; macaw-ui-next
defaults to `primary`, so bare `<Button>` call sites now pass the variant
explicitly to keep their appearance.

`components/Button/Button` existed only to turn `href` into a react-router
`Link`. Its single consumer (NotFoundPage) always received internal URLs,
so the wrapper is dropped in favour of `as={Link}`.

FilterContent's accordion now relies on Radix single+collapsible behaviour,
which removes the manual open/close handler and the two makeStyles blocks
that only existed to strip Material-UI's default styling.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Screenshot comparison against main showed legacy macaw's default
variant ("tertiary") renders as a bordered button, not a borderless one.
macaw-ui-next's "tertiary" has no border, so the first pass silently
flattened Remove/Unassign/Edit/Discard into bare text. "secondary" is
the bordered equivalent.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Every <ListFilters> call site passes type="expression-filter", so the
"old-filter-select" branch — FiltersSelect and the FilterContent tree
below it — has been unreachable since the expression filters rollout
finished. Last functional change to it was #1995 (Apr 2022); everything
after that was sweeping refactors.

knip does not flag this on its own: .knip.json sets storybook and jest as
entry points, so the tree's own stories and tests kept it alive in the
graph. Deleting those first and re-running knip to convergence yields the
24 files removed here, including Alert/InlineAlert whose only consumer
was FilterErrorsList.

Filter/types.ts and Filter/utils.ts stay: list views still build a
filterStructure and pass filterDependency into their datagrids.
FilterProps loses its export for the same reason — nothing imports it now
that ListFilters is single-shape, but FilterPageProps still extends it.

Verified: tsc clean, knip clean, and all nine list pages render their
filter bar with no page errors.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Removing the legacy filter UI orphaned 12 translation messages (key-value
field labels, filter range separators, filter validation errors) — dropped
by re-running extract-messages. The live Filters button keeps its own id
(FNpv6K) and is unaffected.

ValidationErrorCode and InvalidFilters only surfaced as unused once the
commit hook stripped the now-dead imports from Filter/utils.ts, so knip
caught them a round late.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@lkostrowski
lkostrowski force-pushed the lkostrowski/macaw-next-button-accordion branch from 1233bed to 3a10292 Compare September 2, 2026 11:54
@lkostrowski
lkostrowski marked this pull request as ready for review September 2, 2026 11:55
@lkostrowski
lkostrowski requested review from a team, mirekm, peelar and stmpn and removed request for stmpn September 2, 2026 11:55
@lkostrowski
lkostrowski enabled auto-merge (squash) September 2, 2026 11:55
@lkostrowski
lkostrowski merged commit 7e93191 into main Sep 2, 2026
15 of 16 checks passed
@lkostrowski
lkostrowski deleted the lkostrowski/macaw-next-button-accordion branch September 2, 2026 12:01
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