feat: перевести приложение на Vite и Mantine - #18
Merged
Merged
Conversation
Целевой стек кампании это Vite и Mantine, а репозиторий оставался на Create React App с react-bootstrap. Оба заменены вместе, потому что react-scripts тянул свою сборку и свой eslint. Компоненты: AppShell вместо разметки на классах, TextInput с PasswordInput вместо Form.Control с form-floating, Card с Container вместо сетки, уведомления @mantine/notifications вместо react-toastify. Валидация переехала с formik и yup на @mantine/form, и сообщения теперь видны extract'у как обычные ключи, поэтому preservePatterns больше не нужен. React поднят до 19, его требует Mantine 9 в peerDependencies. Ушли sass с application.scss, index.css, reportWebVitals, setupTests, logo.svg и конфиг eslint от Create React App. Сборка теперь в dist, как принято у Vite. В CI добавлены сборка и браузерные тесты: интерфейс в репозитории больше ничем не проверяется. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
playwright.config.js пишет в tmp/artifacts, и .last-run.json уехал в предыдущий коммит. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
После переезда на Vite сборка лежит в dist, а в .gitignore значился build от Create React App, поэтому dist уехал в коммит. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Кампания «Bootstrap → Tailwind и Mantine», волна Mantine по репозиториям
hexlet-components. Регламент и срез:docs/css-frameworks-migration.md,раздел «Компоненты».
Целевой стек кампании это Vite и Mantine, а репозиторий оставался на Create React
App с react-bootstrap. Оба заменены одним заходом, потому что
react-scriptsтянул свою сборку и свой eslint, и снять только Bootstrap было нельзя.
AppShellвместо разметки на классах,CardсContainerвместо сетки,TextInputиPasswordInputвместоForm.Controlсform-floating;@mantine/notificationsвместоreact-toastify;formikиyupна@mantine/form. Побочный эффект:сообщения стали обычными вызовами
t(), поэтомуpreservePatternsвi18next.config.jsбольше не нужен;peerDependencies;sassсapplication.scss,index.css,reportWebVitals,setupTests,logo.svgиeslintConfigот Create React App;dist, как принято у Vite; путь в корневомstartпоправлен.Тесты стали проверять то, что в них написано. В
__tests__/example.spec.jsдвенадцать
expect(locator).toBeVisible()стояли безawait, то есть это быливисячие промисы: проверка не выполнялась и упасть не могла.
awaitдобавлен, ипосле этого прогон остался зелёным, то есть миграция ничего не сломала.
Браузерные тесты и сборка добавлены в CI: юнит-тестов в репозитории нет, и
интерфейс иначе не проверяется ничем.
Проверено:
npx playwright test2 из 2,make build,make lintиmake -C frontend lintчисты, страницы входа и регистрации просмотрены глазами.🤖 Generated with Claude Code