Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DISCOVERY-293: Add local nav pointers #310

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,35 @@ const OPEN_COLLECTIVE = "https://opencollective.com/feature-sliced";
const DEFAULT_LOCALE = "ru";

// Конкретные страницы нужны, т.к. отдельно секции доки не индексируются
// FIXME: Будет исправлено позднее
// FIXME: Привести в порядок формат урлов
const SECTIONS = {
INTRO: {
shortPath: "/docs",
fullPath: "/docs/intro",
},
GET_STARTED: {
shortPath: "/docs/get-started",
fullPath: "/docs/get-started/overview",
fullPath: "/docs/get-started",
},
CONCEPTS: {
shortPath: "/docs/concepts",
fullPath: "/docs/concepts/architecture",
fullPath: "/docs/concepts",
},
GUIDES: {
shortPath: "/docs/guides",
fullPath: "/docs/guides/migration-from-v1",
fullPath: "/docs/guides",
},
REFERENCE: {
shortPath: "/docs/reference",
fullPath: "/docs/reference/glossary",
fullPath: "/docs/reference",
Comment on lines +11 to +31
Copy link
Member Author

Choose a reason for hiding this comment

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

Позже выпилить бы совсем, но out-of-scope пока

},
LAYERS: {
shortPath: "/docs/reference/layers",
fullPath: "/docs/reference/layers/overview",
},
ABOUT: {
shortPath: "/docs/about",
fullPath: "/docs/about/mission",
fullPath: "/docs/about",
},
EXAMPLES: {
shortPath: "/examples",
Expand All @@ -63,29 +63,29 @@ const navbar = {
},
{
label: "🚀 Get Started",
to: SECTIONS.GET_STARTED.fullPath,
to: SECTIONS.GET_STARTED.shortPath,
activeBasePath: SECTIONS.GET_STARTED.shortPath,
},
{
label: "🎯 Guides",
to: SECTIONS.GUIDES.fullPath,
to: SECTIONS.GUIDES.shortPath,
activeBasePath: SECTIONS.GUIDES.shortPath,
},
{
label: "🧩 Concepts",
to: SECTIONS.CONCEPTS.fullPath,
to: SECTIONS.CONCEPTS.shortPath,
activeBasePath: SECTIONS.CONCEPTS.shortPath,
},
{
label: "📚 Reference",
to: SECTIONS.REFERENCE.fullPath,
to: SECTIONS.REFERENCE.shortPath,
activeBasePath: SECTIONS.REFERENCE.shortPath,
},
{
label: "🍰 About",
to: SECTIONS.ABOUT.fullPath,
position: "left",
to: SECTIONS.ABOUT.shortPath,
activeBasePath: SECTIONS.ABOUT.shortPath,
position: "left",
},
{
label: "🛠 Examples",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
sidebar_position: 0
sidebar_class_name: sidebar-item--root
hide_table_of_contents: true
slug: /about
pagination_prev: reference/knowledge-types
---

# 🍰 About

<span class="badge badge--violet margin-bottom--md">COMMUNITY-ORIENTED</span>

<p class="summary">
General information about methodology, team, community and development history
</p>

## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import { StarOutlined } from "@ant-design/icons";

<Row
title="Mission"
description="Goals and limitations of the methodology"
to="/docs/about/mission"
Icon={StarOutlined}
/>
Comment on lines +1 to +27
Copy link
Member Author

Choose a reason for hiding this comment

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

Здесь опишу на примере одной index-овой статьи, дальше можно ревьювить по аналогии

Copy link
Member Author

Choose a reason for hiding this comment

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

sidebar_position: 0

Отображается выше всех

sidebar_class_name: sidebar-item--root

Для доп стилей поинтера в сайдбаре (чтобы отличался от других визуально)

hide_table_of_contents: true

Иначе выглядит странно, т.к. TOC состоит из одного пункта ## Main

Да и визуально от обычных статей отличается - тоже хорошо

slug: /about

Было два пути:

  • либо так, с индексовым файлом внутри,
  • либо выносить в файл /about.mdx с кучей проблем

Выбрал меньшее зло, и кмк - вполне неплохой компромисс по итогу вышел

pagination_prev: reference/knowledge-types

Каждая такая индексовая страница линкуется с концом предыдущего раздела

Copy link
Member Author

Choose a reason for hiding this comment

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

# 🍰 About

Сделал вместе с эмодзи для визуального отличия в пагинации и сайдбаре

image

image

<span class="badge badge--violet margin-bottom--md">COMMUNITY-ORIENTED</span>

Попробовал ради интереса отобразить семантичные теги согласно diataxis - вышло неплохо кмк 🤔

image

image

image

image

image

image

<p class="summary">

Взял как у аналогов

image

## Main

Тож как у аналогов - отображаю ключевые статьи из раздела, чтобы не распылялось внимание читателя

title="Mission" 
description="Goals and limitations of the methodology"
to="/docs/about/mission"
Icon={StarOutlined}

С тайтлом карточки, саммари для понимания о чем статья и семантичной иконкой

image

Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
sidebar_position: 1
pagination_prev: reference/knowledge-types
Copy link
Member Author

Choose a reason for hiding this comment

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

Ну а здесь и далее убрал старую индексацию основных страниц категорий, т.к. теперь ими стали наши навпоинтеры

---

# Mission
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 7
sidebar_class_name: sidebar-item--wip
pagination_next: reference/glossary
pagination_next: reference/index
---

import WIP from '@site/src/shared/ui/wip/tmpl.mdx'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
sidebar_position: 1
pagination_prev: guides/usage-with-nextjs
sidebar_position: 2
---

# About architecture
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
sidebar_position: 0
sidebar_class_name: sidebar-item--root
hide_table_of_contents: true
slug: /concepts
pagination_prev: guides/usage-with-nextjs
---

# 🧩 Concepts

<span class="badge badge--warning margin-bottom--md">UNDERSTANDING-ORIENTED</span>

<p class="summary">
A section with key concepts of the methodology, for an advanced understanding of the Feature Sliced philosophy and application in practice.
</p>

## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import { BlockOutlined, ApiOutlined, ApartmentOutlined } from "@ant-design/icons";

<Row
title="App splitting"
description="Usage of a layered sliced structure in the decomposition of logic"
to="/docs/concepts/app-splitting"
Icon={BlockOutlined}
/>
<Row
title="Public API"
description="Practices for designing scalable and easy-to-integrate modules"
to="/docs/concepts/public-api"
Icon={ApiOutlined}
/>
<Row
title="Cross-communication"
description="Rules for scalable and efficient interaction of modules"
to="/docs/concepts/cross-communication"
Icon={ApartmentOutlined}
/>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_position: -1
sidebar_position: 1
sidebar_class_name: sidebar-item--wip
---

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
sidebar_position: 20
pagination_next: guides/migration-from-legacy
pagination_next: guides/index
---

# FAQ
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
sidebar_position: 0
sidebar_class_name: sidebar-item--root
slug: /get-started
hide_table_of_contents: true
pagination_prev: intro
---

# 🚀 Get Started

<span class="badge badge--success margin-bottom--md">LEARNING-ORIENTED</span>

<p class="summary">
Welcome! This section helps you to get acquainted with the application of Feature Sliced and the basics of the methodology. You will also understand the key advantages of the methodology and the reasons for its creation.
</p>

## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import { RocketOutlined, BuildOutlined, SettingOutlined } from "@ant-design/icons";

<Row
title="Basics"
description="Fundamentals of methodology (briefly)"
to="/docs/get-started/basics"
Icon={SettingOutlined}
/>
<Row
title="Quick Start"
description="Introductory tutorial on the usage of the methodology"
to="/docs/get-started/tutorial/quick-start"
Icon={RocketOutlined}
/>
<Row
title="Decomposition of logic"
description="A memo on the decomposition of logic with examples and criteria"
to="/docs/get-started/tutorial/decompose"
Icon={BuildOutlined}
/>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
sidebar_position: 1
pagination_prev: intro
---

# Overview
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
sidebar_position: 0
sidebar_class_name: sidebar-item--root
hide_table_of_contents: true
slug: /guides
pagination_prev: get-started/faq
---

# 🎯 Guides

<span class="badge badge--primary margin-bottom--md">PRACTICE-ORIENTED</span>

<p class="summary">
Practical guides and examples on the use of Feature Sliced. There is also describe migration guides and a handbook of harmful practices. It is most useful when you are trying to implement something specific or want to look at the methodology "in battle"
</p>

## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import { PartitionOutlined, NodeIndexOutlined, ImportOutlined } from "@ant-design/icons";

<Row
title="Desegmented"
description="The problem of redundant desegmentation of logic"
to="/docs/guides/handbook/desegmented"
Icon={NodeIndexOutlined}
/>
<Row
title="Decouple entities"
description="Decomposition of logic with allocation of business entities"
to="/docs/guides/decouple-entities"
Icon={PartitionOutlined}
/>
<Row
title="Migration from legacy"
description="Step-by-step implementation of practices in legacy projects"
to="/docs/guides/migration-from-legacy"
Icon={ImportOutlined}
/>
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
sidebar_position: 3
sidebar_class_name: sidebar-item--wip
pagination_prev: get-started/faq
---

import WIP from '@site/src/shared/ui/wip/tmpl.mdx'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 10
sidebar_class_name: sidebar-item--wip
pagination_next: concepts/architecture
pagination_next: concepts/index
---

import WIP from '@site/src/shared/ui/wip/tmpl.mdx'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
sidebar_position: 1
pagination_next: get-started/overview
pagination_next: get-started/index
---

# Intro
# 🔎 Intro

A methodology for designing *frontend projects*, aimed [**at dividing the application according to business logic and scopes of responsibility.**][refs-splitting]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
sidebar_position: 1
pagination_prev: concepts/abstractions
---

# Glossary
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
sidebar_position: 0
sidebar_class_name: sidebar-item--root
hide_table_of_contents: true
slug: /reference
pagination_prev: concepts/abstractions
---

# 📚 Reference

<span class="badge badge--danger margin-bottom--md">INFORMATION-ORIENTED</span>

<p class="summary">
A detailed description of the concepts on which the methodology is based.
</p>


## Main

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import { MenuOutlined, GoldOutlined, ReadOutlined } from "@ant-design/icons";

<Row
title="Glossary"
description="Basic concepts of methodology"
to="/docs/reference/glossary"
Icon={ReadOutlined}
/>
<Row
title="Layers"
description="Reference information about layers"
to="/docs/reference/layers/overview"
Icon={MenuOutlined}
/>
<Row
title="Segments"
description="Reference information about segments"
to="/docs/reference/segments"
Icon={GoldOutlined}
/>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
sidebar_position: 10
sidebar_label: Knowledge types
pagination_next: about/mission
pagination_next: about/index
---

# Types of knowledge in the project
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
sidebar_position: 0
sidebar_class_name: sidebar-item--root
hide_table_of_contents: true
slug: /about
pagination_prev: reference/knowledge-types
---

# 🍰 О методологии
Copy link
Member Author

Choose a reason for hiding this comment

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

А теперь все тож самое но на русском 🤯🤯🤯


<span class="badge badge--violet margin-bottom--md">COMMUNITY-ORIENTED</span>

<p class="summary">
Общая информация о методологии, команде, сообщества и истории развития
</p>

## Главное

import Row from "@site/src/shared/ui/row/tmpl.mdx"
import { StarOutlined } from "@ant-design/icons";

<Row
title="Миссия"
description="Цели и ограничения методологии"
to="/docs/about/mission"
Icon={StarOutlined}
/>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
---
sidebar_position: 1
pagination_prev: reference/knowledge-types
---

# Миссия
Expand Down
Loading