Skip to content

Commit 83ce619

Browse files
sanua356illright
andauthored
chore: add message in overview (#782)
Co-authored-by: Lev Chelyadinov <[email protected]>
1 parent 31addca commit 83ce619

File tree

2 files changed

+17
-6
lines changed
  • i18n
    • en/docusaurus-plugin-content-docs/current/get-started
    • ru/docusaurus-plugin-content-docs/current/get-started

2 files changed

+17
-6
lines changed

i18n/en/docusaurus-plugin-content-docs/current/get-started/overview.mdx

+8-3
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,21 @@ Layers, slices, and segments form a hierarchy like this:
6565

6666
Layers are standardized across all FSD projects. You don't have to use all of the layers, but their names are important. There are currently seven of them (from top to bottom):
6767

68-
1. **App\*** — everything that makes the app run — routing, entrypoints, global styles, providers.
68+
1. **App** — everything that makes the app run — routing, entrypoints, global styles, providers.
6969
2. **Processes** (deprecated) — complex inter-page scenarios.
7070
3. **Pages** — full pages or large parts of a page in nested routing.
7171
4. **Widgets** — large self-contained chunks of functionality or UI, usually delivering an entire use case.
7272
5. **Features**_reused_ implementations of entire product features, i.e. actions that bring business value to the user.
7373
6. **Entities** — business entities that the project works with, like `user` or `product`.
74-
7. **Shared\*** — reusable functionality, especially when it's detached from the specifics of the project/business, though not necessarily.
74+
7. **Shared** — reusable functionality, especially when it's detached from the specifics of the project/business, though not necessarily.
7575

76-
_\* — these layers, **App** and **Shared**, unlike the other layers, don't have slices, and are made up of segments directly._
76+
:::warning
7777

78+
Layers **App** and **Shared**, unlike other layers, do not have slices and are divided into segments directly.
79+
80+
However, all other layers — **Entities**, **Features**, **Widgets**, and **Pages**, retain the structure in which you must first create slices, inside which you create the segments.
81+
82+
:::
7883
The trick with layers is that modules on one layer can only know about and import from modules from the layers strictly below.
7984

8085
### Slices {#slices}

i18n/ru/docusaurus-plugin-content-docs/current/get-started/overview.mdx

+9-3
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,21 @@ FSD можно внедрять в проектах и командах любо
6565

6666
Слои стандартизированы во всех проектах FSD. Вам не обязательно использовать все слои, но их названия важны. На данный момент их семь (сверху вниз):
6767

68-
1. **App\*** — всё, благодаря чему приложение запускается — роутинг, точки входа, глобальные стили, провайдеры и т. д.
68+
1. **App** — всё, благодаря чему приложение запускается — роутинг, точки входа, глобальные стили, провайдеры и т. д.
6969
2. **Processes** (процессы, устаревший) — сложные межстраничные сценарии.
7070
3. **Pages** (страницы) — полные страницы или большие части страницы при вложенном роутинге.
7171
4. **Widgets** (виджеты) — большие самодостаточные куски функциональности или интерфейса, обычно реализующие целый пользовательский сценарий.
7272
5. **Features** (фичи) — _повторно используемые_ реализации целых фич продукта, то есть действий, приносящих бизнес-ценность пользователю.
7373
6. **Entities** (сущности) — бизнес-сущности, с которыми работает проект, например `user` или `product`.
74-
7. **Shared\*** — переиспользуемый код, особенно когда он отделён от специфики проекта/бизнеса, хотя это не обязательно.
74+
7. **Shared** — переиспользуемый код, особенно когда он отделён от специфики проекта/бизнеса, хотя это не обязательно.
7575

76-
_\* — эти слои, **App** и **Shared**, в отличие от других слоев, не имеют слайсов и состоят из сегментов напрямую._
76+
:::warning Важно
77+
78+
Слои **App** и **Shared**, в отличие от других слоев, не имеют слайсов и состоят из сегментов напрямую.
79+
80+
Однако для всех остальных слоёв — **Entities**, **Features**, **Widgets** и **Pages**, сохраняется структура, в которой необходимо сначала создать слайс, внутри которого создавать сегменты.
81+
82+
:::
7783

7884
Фишка слоев в том, что модули на одном слое могут знать только о модулях со слоев строго ниже, и как следствие, импортировать только с них.
7985

0 commit comments

Comments
 (0)