Skip to content

Refactor/add new kanban#68

Open
AlexandrNel wants to merge 27 commits into
devfrom
refactor/add-new-kanban
Open

Refactor/add new kanban#68
AlexandrNel wants to merge 27 commits into
devfrom
refactor/add-new-kanban

Conversation

@AlexandrNel
Copy link
Copy Markdown
Collaborator

@AlexandrNel AlexandrNel commented Jun 3, 2026

Что сделано

  • Создал entities/board сущность с контрактом бэкенда:
    • schemas: Zod-схемы для досок, колонок, представлений и body/response для CRUD
    • http: GET/POST/PATCH/DELETE (board, boardList, boardColumns, boardViews и др.)
    • quries: Добавил BoardQueries и boardFabricKeys (list, detail, columns, views) для React Query
  • Вынес палитру колонок в entities/board/lib/colors.ts (BOARD_COLUMN_COLORS)
  • Реализовал фичу features/boards/create:
    • Диалог и форма создания доски
    • useCreateBoard с инвалидацией boardFabricKeys.list(projectId)
  • Реализовал фичу features/boards/remove:
    • Удаление доски с инвалидацией списка досок проекта
  • Реализовал фичу features/boards/column/create:
    • Диалог/форма создания колонки (название, позиция, ColorPicker)
    • Мутация createBoardColumn с инвалидацией list + columns
  • Реализовал фичу features/boards/column/remove:
    • RemoveColumnDialog в меню колонки
  • Обновил страницу досок проекта:
    • useBoardsPage, useActiveBoards
    • Zustand-store (activeBoardId, projectId)
    • ProjectBoards (переключение досок, создание/удаление)
  • Переработал канбан:
    • ProjectKanban с локальным state для DnD
    • Синхронизация tasksByColumn из пропа через useEffect
    • Кнопка «Создать колонку» в конце доски
  • Вынес колонку в task-column/:
    • TaskColumn, TaskColumnHeader (цвет, счётчик задач, удаление колонки, создание задачи)
  • Добавил заготовку features/task/create:
    • CreateTaskField, CreateTaskButton (интеграция в колонку)
  • Подключил BoardMapper / BoardWithTasks для маппинга ответа API в структуру канбана
  • Добавил скелетоны и интерфейс с ошибкой
  • steiger.config: временно отключил правило "fsd/insignificant-slice" для выше указанных фичей и сущностей
  • Вынес ColorPicker в shared
  • Создал Checkbox в shared

Проверка

  • pnpm lint
  • pnpm typecheck
  • Открыть страницу досок проекта: загрузка списка, переключение активной доски
  • Создать доску → появляется в табах, список обновляется после refetch
  • Удалить доску → доска исчезает из списка
  • Создать колонку → новая колонка появляется на канбане
  • Удалить колонку → проверить, что колонка пропадает с канбана
  • Открытие меню колонки: удаление, picker цвета (локальный state)
  • Проверить состояние загрузки и ошибки

…pability; add skeleton components for loading states
@AlexandrNel AlexandrNel requested a review from kapitulin24 as a code owner June 3, 2026 09:44
@github-actions github-actions Bot added ui-kit Shared UI components, styles and storybook features User scenarios and sliced features domain Business entities and models labels Jun 3, 2026
@github-actions github-actions Bot added views Pages, widgets and layouts config labels Jun 3, 2026
columns: Record<string, BoardColumnResponse>;
tasksByColumn: Record<string, unknown[]>;
};

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Сюда закладывай как фабрику, вы будете тут через ?layout получать большой список, и по айдишникам вставлять все

Во фабрике нужно сделать виды, kanban/gant/matrix, ну и в таком духе, это на будущее

<Controller
name="settings"
control={form.control}
render={({ field, fieldState }) => (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

import { useLayoutEffect } from 'react';

export function useClickOutside(id: string, handler: () => void) {
useLayoutEffect(() => {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use callback ref можно посмотреть в эту сторону

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config domain Business entities and models features User scenarios and sliced features ui-kit Shared UI components, styles and storybook views Pages, widgets and layouts

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants