[HDX-3981] Upgrade Mantine v7 to v9#2096
Conversation
Upgrade all @mantine/* packages from v7.17.8 to v9.0.0, resolving all breaking changes from both the v7→v8 and v8→v9 migration paths. Breaking changes addressed: - Collapse: rename `in` prop to `expanded` (11 instances across 10 files) - Grid: remove deprecated `overflow="hidden"` prop (5 instances, 3 files) - Text/Anchor: rename `color` prop to `c` (7 instances, 5 files) - DateTimePicker/DateInput: onChange now returns string instead of Date - SourceSchemaPreview: replace removed TextProps `color` key with React.CSSProperties - Theme: set defaultRadius to 'sm' to preserve existing visual appearance - Update postcss-preset-mantine to ^1.18.0 - Update test for Collapse visibility behavior change in jsdom
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: ae88f5b The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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 |
E2E Test Results✅ All tests passed • 129 passed • 3 skipped • 1107s
Tests ran across 4 shards in parallel. |
…ignment (HDX-3981) - Replace react-hook-form-mantine with Controller from react-hook-form and direct Mantine components (NativeSelect, NumberInput, Select) - Remove react-hook-form-mantine dependency entirely - Fix E2E test locators: Mantine v9 Select renders role='combobox' instead of role='textbox' - Fix Tabs label alignment: restore left-aligned text in tab labels (v9 changed default to text-align: center)
…(HDX-3981) Mantine v9 DateInput onChange now returns strings instead of Date objects. This broke the TimePicker which passes form values to date-fns functions (format, add, sub) and calls .getTime() on them. - Add toDate() helper to convert string values back to Date objects - Override DateInputCmp onChange to convert before storing in form - Guard handleApply, handleMove, and mode-switch with toDate() - Guard useTimePickerForm onValuesChange date comparison
🟡 Tier 3 — StandardIntroduces new logic, modifies core functionality, or touches areas with non-trivial risk. Why this tier:
Review process: Full human review — logic, architecture, edge cases. Stats
|
PR ReviewWell-executed migration. All documented breaking changes (Collapse
✅ Collapse/Grid/color migrations, theme defaults, test updates, and |
- DateInputCmp: remove `as any` cast by giving the wrapper its own typed props (Date ↔ string conversion in both value and onChange directions) - Collapse test: assert aria-hidden attribute for collapsed/expanded state instead of dropping the assertion entirely - Alerts.tsx: make WebhookChannelForm and AlertChannelForm generic over FieldValues, removing Control<any>
## Summary Upgrade all `@mantine/*` packages from v7.17.8 to v9.0.0 (skipping the v8 intermediate step since the breaking changes were manageable in a single pass). This improves React 19 compatibility and keeps the UI library current. ### Breaking changes resolved **v7 → v8 changes:** - `DateTimePicker`/`DateInput` `onChange` now returns a date string instead of a `Date` object — updated handlers in `AlertScheduleFields.tsx` and `SourceForm.tsx` - Updated `postcss-preset-mantine` to ^1.18.0 **v8 → v9 changes:** - `Collapse`: renamed `in` prop to `expanded` (11 instances across 10 files) - `Grid`: removed deprecated `overflow="hidden"` prop (5 instances, 3 files) — v9 uses native CSS `gap` instead of negative margins - `Text`/`Anchor`: renamed `color` prop to `c` style prop (7 instances, 5 files) - `SourceSchemaPreview`: replaced removed `TextProps` `color` key with `React.CSSProperties` - Theme: set `defaultRadius: 'sm'` in both theme configs to preserve existing visual appearance (v9 changed default from `sm` to `md`) - Updated test for Collapse visibility behavior change in jsdom ### Not affected (verified) - No `@mantine/carousel` or `@mantine/tiptap` usage — embla and Tiptap migrations not needed - No `TypographyStylesProvider`, `Spoiler`, `positionDependencies`, `useFullscreen`, `useMouse`, `useMutationObserver`, or `zodResolver` from `@mantine/form` usage - All `useLocalStorage` calls from `@mantine/hooks` already provide `defaultValue` - `react-hook-form-mantine` has a peer dep mismatch (expects `@mantine/core ^7.0.0`) but its thin wrappers are compatible at runtime ### How to test locally or on Vercel 1. Start the dev stack with `yarn dev` 2. Navigate through key pages: search, dashboards, alerts, services dashboard, Kubernetes pages 3. Verify Collapse animations work correctly (alert details, nav sub-menus, advanced settings) 4. Verify Grid layouts render properly on services dashboard side panels 5. Verify no visual regressions in border-radius, spacing, or color across components ### References - Linear Issue: https://linear.app/clickhouse/issue/HDX-3981/upgrade-mantine-v7-v9 - [Mantine v9 Changelog](https://mantine.dev/changelog/9-0-0/) - [7.x → 8.x Migration Guide](https://mantine.dev/guides/7x-to-8x/) - [8.x → 9.x Migration Guide](https://mantine.dev/guides/8x-to-9x/)
## Summary Upgrade all `@mantine/*` packages from v7.17.8 to v9.0.0 (skipping the v8 intermediate step since the breaking changes were manageable in a single pass). This improves React 19 compatibility and keeps the UI library current. ### Breaking changes resolved **v7 → v8 changes:** - `DateTimePicker`/`DateInput` `onChange` now returns a date string instead of a `Date` object — updated handlers in `AlertScheduleFields.tsx` and `SourceForm.tsx` - Updated `postcss-preset-mantine` to ^1.18.0 **v8 → v9 changes:** - `Collapse`: renamed `in` prop to `expanded` (11 instances across 10 files) - `Grid`: removed deprecated `overflow="hidden"` prop (5 instances, 3 files) — v9 uses native CSS `gap` instead of negative margins - `Text`/`Anchor`: renamed `color` prop to `c` style prop (7 instances, 5 files) - `SourceSchemaPreview`: replaced removed `TextProps` `color` key with `React.CSSProperties` - Theme: set `defaultRadius: 'sm'` in both theme configs to preserve existing visual appearance (v9 changed default from `sm` to `md`) - Updated test for Collapse visibility behavior change in jsdom ### Not affected (verified) - No `@mantine/carousel` or `@mantine/tiptap` usage — embla and Tiptap migrations not needed - No `TypographyStylesProvider`, `Spoiler`, `positionDependencies`, `useFullscreen`, `useMouse`, `useMutationObserver`, or `zodResolver` from `@mantine/form` usage - All `useLocalStorage` calls from `@mantine/hooks` already provide `defaultValue` - `react-hook-form-mantine` has a peer dep mismatch (expects `@mantine/core ^7.0.0`) but its thin wrappers are compatible at runtime ### How to test locally or on Vercel 1. Start the dev stack with `yarn dev` 2. Navigate through key pages: search, dashboards, alerts, services dashboard, Kubernetes pages 3. Verify Collapse animations work correctly (alert details, nav sub-menus, advanced settings) 4. Verify Grid layouts render properly on services dashboard side panels 5. Verify no visual regressions in border-radius, spacing, or color across components ### References - Linear Issue: https://linear.app/clickhouse/issue/HDX-3981/upgrade-mantine-v7-v9 - [Mantine v9 Changelog](https://mantine.dev/changelog/9-0-0/) - [7.x → 8.x Migration Guide](https://mantine.dev/guides/7x-to-8x/) - [8.x → 9.x Migration Guide](https://mantine.dev/guides/8x-to-9x/) Co-authored-by: peter-leonov-ch <209667683+peter-leonov-ch@users.noreply.github.com>
Summary
Upgrade all
@mantine/*packages from v7.17.8 to v9.0.0 (skipping the v8 intermediate step since the breaking changes were manageable in a single pass). This improves React 19 compatibility and keeps the UI library current.Breaking changes resolved
v7 → v8 changes:
DateTimePicker/DateInputonChangenow returns a date string instead of aDateobject — updated handlers inAlertScheduleFields.tsxandSourceForm.tsxpostcss-preset-mantineto ^1.18.0v8 → v9 changes:
Collapse: renamedinprop toexpanded(11 instances across 10 files)Grid: removed deprecatedoverflow="hidden"prop (5 instances, 3 files) — v9 uses native CSSgapinstead of negative marginsText/Anchor: renamedcolorprop tocstyle prop (7 instances, 5 files)SourceSchemaPreview: replaced removedTextPropscolorkey withReact.CSSPropertiesdefaultRadius: 'sm'in both theme configs to preserve existing visual appearance (v9 changed default fromsmtomd)Not affected (verified)
@mantine/carouselor@mantine/tiptapusage — embla and Tiptap migrations not neededTypographyStylesProvider,Spoiler,positionDependencies,useFullscreen,useMouse,useMutationObserver, orzodResolverfrom@mantine/formusageuseLocalStoragecalls from@mantine/hooksalready providedefaultValuereact-hook-form-mantinehas a peer dep mismatch (expects@mantine/core ^7.0.0) but its thin wrappers are compatible at runtimeHow to test locally or on Vercel
yarn devReferences