chore: update Mantine to 9.1.0#2921
Conversation
Bump catalog from 8.3.18 to 9.1.0 and adapt to breaking API changes:
- Drop redundant `component={m.div}` from `SegmentedControl` (already
wrapped in `<m.div>`) — prop removed in v9.
- Remove `tree.setHoveredNode = noop` workaround — property is no longer
on `UseTreeReturnType` in v9.
- Switch the 3-arg `useMutationObserver(cb, opts, target)` to
`useMutationObserverTarget` (target moved to its own hook in v9).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: c0f7e65 The changes in this PR will be included in the next version bump. This PR includes changesets to release 22 packages
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 |
📝 WalkthroughWalkthroughThis PR upgrades Mantine from version 8.3.18 to 9.1.0 across the workspace and removes several deprecated API overrides: SegmentedControl component wrappers and Tree hover handlers that are no longer necessary, while also migrating a MutationObserver hook to its updated equivalent. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
.changeset/update-mantine-to-9.md (2)
1-8: Considerminorbumps given the visible UI change.The changeset body itself documents a user-visible behavior change for
Button/Alert/ActionIconvariant="light"(transparent → solid). For published packages whose consumers render these components (notably@likec4/diagramandlikec4), aminorbump communicates that more accurately thanpatch.@likec4/coreand@likec4/style-presetmay staypatchif they don't surface the change directly.Proposed change
--- -'@likec4/diagram': patch +'@likec4/diagram': minor '@likec4/style-preset': patch '@likec4/core': patch -'likec4': patch +'likec4': minor ---🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.changeset/update-mantine-to-9.md around lines 1 - 8, Update the changeset so package bump types reflect the visible UI change: change the entries for '@likec4/diagram' and 'likec4' from "patch" to "minor" to indicate a user-visible behavior change in Button/Alert/ActionIcon variant="light", while leaving '@likec4/core' and '@likec4/style-preset' as "patch" if they do not directly surface the component behavior.
8-8: Optional: tighten wording.Minor copy nit — "Buttons, Alerts, and ActionIcons" reads a bit oddly when referring to component names. Consider phrasing in terms of the
variant="light"prop on the three components.Proposed wording
-Update Mantine to 9.1.0. The `light` variant of Buttons, Alerts, and ActionIcons now uses solid colors instead of transparency. +Update Mantine to 9.1.0. The `variant="light"` of `Button`, `Alert`, and `ActionIcon` now uses solid colors instead of transparency.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.changeset/update-mantine-to-9.md at line 8, Reword the sentence to reference the variant prop instead of listing component names awkwardly: change the line to say that the variant="light" prop on the Button, Alert, and ActionIcon components now uses solid colors instead of transparency (use the singular component names Button, Alert, ActionIcon and the exact prop variant="light" to make the meaning clear).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.changeset/update-mantine-to-9.md:
- Around line 1-8: Update the changeset so package bump types reflect the
visible UI change: change the entries for '@likec4/diagram' and 'likec4' from
"patch" to "minor" to indicate a user-visible behavior change in
Button/Alert/ActionIcon variant="light", while leaving '@likec4/core' and
'@likec4/style-preset' as "patch" if they do not directly surface the component
behavior.
- Line 8: Reword the sentence to reference the variant prop instead of listing
component names awkwardly: change the line to say that the variant="light" prop
on the Button, Alert, and ActionIcon components now uses solid colors instead of
transparency (use the singular component names Button, Alert, ActionIcon and the
exact prop variant="light" to make the meaning clear).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4a1ae9b7-31ef-4777-91e4-ad69bfb5535e
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.changeset/update-mantine-to-9.mdpackages/diagram/src/navigationpanel/comparepanel/LayoutTypeSwitcher.tsxpackages/diagram/src/navigationpanel/walkthrough/DynamicViewControls.tsxpackages/diagram/src/overlays/element-details/TabPanelDeployments.tsxpackages/diagram/src/overlays/element-details/TabPanelStructure.tsxpackages/diagram/src/overlays/relationships-browser/SelectElement.tsxpackages/diagram/src/search/components/ElementsColumn.tsxpackages/diagram/src/shadowroot/styles.css.tspackages/likec4-spa/src/components/sidebar/DiagramsTree.tsxpnpm-workspace.yaml
💤 Files with no reviewable changes (7)
- packages/diagram/src/overlays/element-details/TabPanelStructure.tsx
- packages/diagram/src/navigationpanel/walkthrough/DynamicViewControls.tsx
- packages/diagram/src/search/components/ElementsColumn.tsx
- packages/diagram/src/overlays/element-details/TabPanelDeployments.tsx
- packages/likec4-spa/src/components/sidebar/DiagramsTree.tsx
- packages/diagram/src/overlays/relationships-browser/SelectElement.tsx
- packages/diagram/src/navigationpanel/comparepanel/LayoutTypeSwitcher.tsx
Summary
mantinecatalog from8.3.18to9.1.0(latest major).SegmentedControlno longer acceptscomponent— drop redundantcomponent={m.div}(the<m.div>wrapper already provides motion).useTree's return type no longer exposessetHoveredNode— drop thetree.setHoveredNode = noopworkaround.useMutationObserver(cb, opts, target)3-arg form moved to its own hookuseMutationObserverTargetin v9.19.2.4already meets v9's>= 19.2requirement; no@mantine/formusage; noSpoiler.initialStateorpositionDependenciesto migrate.lightvariant of Buttons / Alerts / ActionIcons now renders with solid colors instead of transparency. Adopting v9 defaults rather than opting back in viav8CssVariablesResolver.Test plan
pnpm typecheck— cleanpnpm test --no-typecheck— 2338 tests pass (225 files)pnpm build— cleanvariant="light") all render without console errors🤖 Generated with Claude Code