mirror of
https://github.com/civitai/civitai.git
synced 2026-09-20 22:08:18 +08:00
b79215aa0a
* Start migration, start updating files & details * Attempt at migrating ContainerGrid styles * Continue migration * Migrate tag/[tagname] * Checkpoint: Before the adsProvider migration * General progress - migrate complex AdUnit useStyles * Migrates VotableTags component to mantine v7 * Migrate card styles, profile styles and more * More migrations * Nits * Migrates components to mantine v7 * Migrate all articles components * Updates User components to mantine v7 * Cleanup to files up to ChatList.tsx * Checkpoint: Container Grid * Migrate up to CosmeticShopItemUpsertForm * Mantine migration: Training and subscription components * Fixes alpha color mix in css modules * Checkpoint up to QuickSearchDropdown * Checkpoint up to RouterTransition * Checkpoint up to ImageResources * Fixes after merging with main * Checkpoint - main components * Some pages * Fix minor nit * Completes migration of pages components * 2nd pass of fixes' * More fixes after typecheck * Last type fixes * Somehow, manage initial render * Minor nits, initial render, improvements * Update colors in theme * Minor changes and improvements * Fixes app header and footer styles * Replaces sx and text color everywhere * Fixes media queries * Fixes ContainerGrid * Fixes ActionIcon styles everywhere * Fixes alpha color mix in css modules * Fixes dark/light theme not working with tailwind * Fixes after merging with main * Fixes bad css module imports * Fixes issues preventing build * Main fixes to account and model feed pages * Fixes after merging with main * Fixes animation module file typo * Fixes to feeds * Fixes after merging with main * Fixes icons in menu items * Fixes homeblocks and other things * Fixes to AuctionFiltersDropdown * Fixes home page and most feed cards * Fixes most styles in the generation form * Fixes gen panel * Fixes shop styles * Updates package-lock file * Fixes after merging with main * Creator program nits * Fixes search page styles * Several fixes to small pages * Fixes css type issues * Fixes reviews page and css modules types issues * Fixes lock file and tailwind vars * Fixes package-lock * More fixes to package-lock * Buzz dashboard nits * Minor model form nits * Fixes model details page and richTextEditor styles * Start working on the training page * Brings back old color scheme * loader types + auction * Fixes most forms * Fixes type issues * Adjusts text link color * Fixes collections layout and styles * Final touches to the image detail page * Fixes after merging with main * Fix autocomplete search * Small tweaks and fixes * More style fixes * Fixes notifications and navigation progress * Fixes after merging with main * Adds creatable multiselect component * Fixes grouped select input * Adjusts aria-label for close buttons in modal * More small fixes * Fixes nits from review * Bunch of fixes all around * Fixes after merging with main * Another wave of fixes * Fixes after merging with main * Bunch of updates based off review feedback * General fixes * Finishes migrating all user facing pages and components * Fixes type issues * Fixes admin pages * Last round of feedback incoming --------- Co-authored-by: Luis Rojas <lrojas94@gmail.com> Co-authored-by: Brett Woodward <flipperbw@gmail.com>
3.1 KiB
3.1 KiB
Mantine Migration Guide
This document outlines the breaking changes when migrating Mantine from version 5 to 6 and from version 6 to 7.
🧨 Mantine v5 → v6 Breaking Changes
📅 Date & Time Components
- Renamed Components:
DatePicker→DatePickerInputCalendar→DatePicker
- Removed Components:
TimeRangeInputDateRangePickerRangeCalendar
- Updated Components:
TimeInputnow uses native<input type="time">
- Prop Changes:
amountOfMonths→numberOfColumnsallowFreeInputremoved; useDateInputinsteaddayClassNameanddayStyleremoved; usegetDayProps
🎨 Theme Object Adjustments
- Removed from theme:
dateFormat,datesLocale
- Prop Renames:
withFocusReturn→returnFocusoverflow→scrollAreaComponentoverlayBlur→overlayProps.bluroverlayColor→overlayProps.coloroverlayOpacity→overlayProps.opacityexitTransitionDuration→transitionProps.exitDurationtransition→transitionProps.transitiontransitionDuration→transitionProps.durationtransitionTimingFunction→transitionProps.timingFunction
🧮 NumberInput Component
- Props now expect
number | ''instead ofnumber | undefined
🔢 Pagination Component
- Prop Changes:
itemComponent,getItemAriaLabelremoved; usegetItemPropsinitialPage→defaultValuepage→value
🔍 Spotlight Component
- Now based on
Modal - Prop Renames follow same pattern as above
🧪 Input Components
invalidprop →error- Styles API updated: use
data-*attributes
🚨 Mantine v6 → v7 Breaking Changes
🎨 Styling Overhaul
- Removed:
createStylesfunction- Nested selectors in
sx,stylesprops
- Recommendations:
- Use CSS Modules or
className,styleprops - Use
postcss-preset-mantinefor advanced styling
- Use CSS Modules or
🧩 @mantine/emotion Package
- Optional package to restore
createStylesandsxbehavior during migration
🛠 Migration Tips
- Transition to CSS Modules or Tailwind classes
- Use
@mantine/emotionfor interim compatibility - Review and test each component after migration
- Use Tailwind CSS instead of Mantine
createStylesorsxprops. - Remove all
createStylesusage. Convert styles to Tailwind classNames directly on components. - If a Mantine component has an
sxorclassNamesprop, replace it with aclassNameusing Tailwind. - Keep using Mantine components, but prefer native HTML elements when simpler.
- Use Tailwind utility classes for spacing, layout, colors, and typography.
- Avoid inline styles. Use Tailwind whenever possible.
- Assume Tailwind config includes custom colors and spacing aligned with Mantine theme.
- Do not suggest Emotion or styled-components. Tailwind is the preferred styling method.
- Treat Mantine components as unstyled when possible — all visuals handled by Tailwind.