Refactor Link component from makeStyles to sprinkles#6250
Conversation
🦋 Changeset detectedLatest commit: 22ecbb9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
There was a problem hiding this comment.
Pull request overview
This PR refactors the Link component from using Material-UI's makeStyles to the newer sprinkles utility from @saleor/macaw-ui-next. The refactoring improves the component by making links inherit font size from their parent elements, fixing display issues within text blocks.
Changes:
- Migrated styling from
makeStylestosprinklesutility for better integration with the new design system - Restructured internal logic with improved code organization and better handling of disabled states
- Added comprehensive test coverage for the Link component including edge cases and known bugs
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/components/Link.tsx | Refactored from makeStyles to sprinkles, improved styling logic, added named export, removed typographyProps |
| src/components/Link.test.tsx | Added comprehensive test suite covering internal/external links, styling, click handlers, and edge cases |
| .changeset/quick-parrots-heal.md | Documented the patch-level change for improved link display |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6250 +/- ##
==========================================
+ Coverage 42.54% 42.57% +0.02%
==========================================
Files 2459 2459
Lines 41639 41644 +5
Branches 9196 9581 +385
==========================================
+ Hits 17717 17730 +13
+ Misses 23890 22675 -1215
- Partials 32 1239 +1207 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 11 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This PR refactors the Link component to use the modern sprinkles styling system instead of the legacy makeStyles API from Material-UI. This modernization improves the component's maintainability and aligns it with the current design system architecture.
Changes
makeStylesto@saleor/macaw-ui-next'ssprinklesutility for styling@ts-strict-ignoredirectiveaccent1,default1,default2)typographyPropsparameterFiles Changed
src/components/Link.tsx- Complete refactor of styling implementationsrc/components/Link.test.tsx- New comprehensive test suite.changeset/quick-parrots-heal.md- Changeset documenting user-facing improvementsTesting
Checklist
🤖 Generated with Claude Code