diff --git a/apps/frontend/src/pages/home/ui/HomePage.tsx b/apps/frontend/src/pages/home/ui/HomePage.tsx index a0f2c52..1977544 100644 --- a/apps/frontend/src/pages/home/ui/HomePage.tsx +++ b/apps/frontend/src/pages/home/ui/HomePage.tsx @@ -1,14 +1,15 @@ +import Box from '@mui/material/Box'; +import { Heading, Text } from '@moex-vibe/design-system'; + export function HomePage() { return ( -
-

MoexVibe

-

- Анализ акций и облигаций Московской биржи -

-

Введите название или тикер в строку поиска выше

-

- Данные задерживаются на 15 минут · Бесплатный API MOEX ISS -

-
+ + + MoexVibe + + Анализ акций и облигаций Московской биржи + Введите название или тикер в строку поиска выше + Данные задерживаются на 15 минут · Бесплатный API MOEX ISS + ); } diff --git a/apps/frontend/src/widgets/search-bar/ui/SearchBar.tsx b/apps/frontend/src/widgets/search-bar/ui/SearchBar.tsx index 240f04b..f41d370 100644 --- a/apps/frontend/src/widgets/search-bar/ui/SearchBar.tsx +++ b/apps/frontend/src/widgets/search-bar/ui/SearchBar.tsx @@ -1,5 +1,7 @@ import { useState, useRef, useEffect } from 'react'; import { useNavigate } from 'react-router-dom'; +import Box from '@mui/material/Box'; +import { Chip, Surface, Text, TextField } from '@moex-vibe/design-system'; import { useSearch } from '@/entities/search'; export function SearchBar() { @@ -32,82 +34,81 @@ export function SearchBar() { const showResults = open && debounced.length >= 2; return ( -
- + { setQuery(e.target.value); setOpen(true); }} onFocus={() => setOpen(true)} - style={{ - width: '100%', - padding: '8px 12px', - border: '1px solid #ccc', - borderRadius: 6, - fontSize: 14, - }} /> {showResults && ( - + + {item.shortName} + + {item.secid} + + + + + ))} + + )} -
+ ); } diff --git a/docs/features/pilot-migration/plan.md b/docs/features/pilot-migration/plan.md new file mode 100644 index 0000000..f53557e --- /dev/null +++ b/docs/features/pilot-migration/plan.md @@ -0,0 +1,60 @@ +# Pilot Migration — Implementation Plan + +## Architecture + +Миграция слоя представления без изменения логики. HomePage меняет JSX на DS-компоненты. SearchBar заменяет inline-стили на DS-компоненты + MUI `Box` (разрешён layout utility). + +## Files + +### Modify +- `apps/frontend/src/pages/home/ui/HomePage.tsx` — замена JSX +- `apps/frontend/src/widgets/search-bar/ui/SearchBar.tsx` — замена JSX + +### No changes +- `apps/frontend/src/widgets/search-bar/ui/SearchBar.test.tsx` — тесты не меняются (те же тексты) +- `apps/frontend/src/styles.css` — CSS-переменные всё ещё используются broker-страницами + +## Step-by-step + +### Step 1: Migrate HomePage + +```tsx +// До +
+

MoexVibe

+

+ Анализ акций и облигаций Московской биржи +

+

Введите название или тикер в строку поиска выше

+

+ Данные задерживаются на 15 минут · Бесплатный API MOEX ISS +

+
+ +// После +import { Box } from '@mui/material'; +import { Heading, Text } from '@moex-vibe/design-system'; + + + MoexVibe + Анализ акций и облигаций Московской биржи + Введите название или тикер в строку поиска выше + Данные задерживаются на 15 минут · Бесплатный API MOEX ISS + +``` + +### Step 2: Migrate SearchBar + +- `` → `` +- `