Skip to content

Commit 2e7f27d

Browse files
authored
feat: add new decomposition cheatsheet (#627)
1 parent 49d6f43 commit 2e7f27d

File tree

13 files changed

+34
-36
lines changed

13 files changed

+34
-36
lines changed

β€Žconfig/docusaurus/extensions.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ const plugins = [
123123
steps: 2, // the max number of images generated between min and max (inclusive)
124124
},
125125
],
126+
"plugin-image-zoom",
126127
process.env.HOTJAR_ID && "docusaurus-plugin-hotjar", // For preventing crashing
127128
// FIXME: Docusaurus Open Graph Plugin Experimental.
128129
process.env.OG_EXP && DOCUSAURUS_PLUGIN_OG,

β€Ždocusaurus.config.jsβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,11 @@ module.exports = {
4545
algolia: cfg.algolia,
4646
metadata: cfg.metadata,
4747
hotjar: cfg.metrics.hotjar,
48+
imageZoom: {
49+
options: {
50+
background: "rgb(255 255 255 / 0.3)",
51+
},
52+
},
4853
},
4954
};
5055

β€Ži18n/en/docusaurus-plugin-content-docs/current/get-started/cheatsheet.mdxβ€Ž

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,16 @@
11
---
22
sidebar_position: 3
3-
sidebar_class_name: sidebar-item--wip
43
---
54

6-
import WIP from '@site/src/shared/ui/wip/tmpl.mdx'
7-
85
# Decomposition cheatsheet
96

10-
<WIP ticket="213" />
11-
12-
## The role and meaning of decomposition
13-
14-
> Problem? Costs of ignoring? How can it help? Why is it matter? Resistance to change
15-
16-
## How to determine the scope of responsibility
7+
Use this as a quick reference when you're deciding how to decompose your UI. PDF versions are also available below, so you can print it out and keep one under your pillow.
178

18-
> Layers criteria
9+
## Choosing a layer
1910

11+
[Download PDF](/files/choosing-a-layer-en.pdf)
2012

21-
![layers-criteria-bordered-w100-bgLight](/img/layers/criteria.png)
13+
![Definitions of all layers and self-check questions](/img/choosing-a-layer-en.jpg)
2214

2315
## Examples
2416

@@ -30,12 +22,6 @@ import WIP from '@site/src/shared/ui/wip/tmpl.mdx'
3022

3123
![decomposed-github-bordered](/img/decompose-github.jpg)
3224

33-
### Design mockup
34-
35-
<WIP ticket="224" />
36-
37-
> Use the example of the layout to show how the logic is decomposed and transformed into an architecture with modules - with a specific file structure
38-
3925
## See also
4026
- [(Thread) General logic for features and entities](https://t.me/feature_sliced/4262)
4127
- [(Thread) Decomposition of swollen logic](https://t.me/feature_sliced/4210)

β€Ži18n/ru/docusaurus-plugin-content-docs/current/get-started/cheatsheet.mdxβ€Ž

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,16 @@
11
---
22
sidebar_position: 3
3-
sidebar_class_name: sidebar-item--wip
43
---
54

6-
import WIP from '@site/src/shared/ui/wip/tmpl.mdx'
7-
85
# ΠŸΠ°ΠΌΡΡ‚ΠΊΠ° ΠΏΠΎ Π΄Π΅ΠΊΠΎΠΌΠΏΠΎΠ·ΠΈΡ†ΠΈΠΈ
96

10-
<WIP ticket="213" />
11-
12-
## Роль ΠΈ Π·Π½Π°Ρ‡Π΅Π½ΠΈΠ΅ Π΄Π΅ΠΊΠΎΠΌΠΏΠΎΠ·ΠΈΡ†ΠΈΠΈ {#the-role-and-meaning-of-decomposition}
13-
14-
> ΠŸΡ€ΠΎΠ±Π»Π΅ΠΌΠ°Ρ‚ΠΈΠΊΠ°, Π§Ρ‚ΠΎ Π±ΡƒΠ΄Π΅Ρ‚ Ссли ΠΈΠ³Π½ΠΎΡ€ΠΈΡ€ΠΎΠ²Π°Ρ‚ΡŒ, Π§Π΅ΠΌ ΠΌΠΎΠΆΠ΅Ρ‚ ΠΏΠΎΠΌΠΎΡ‡ΡŒ, ΠŸΠΎΡ‡Π΅ΠΌΡƒ это Π²Π°ΠΆΠ½ΠΎ, ΠŸΡ€ΠΎ ΡƒΡΡ‚ΠΎΠΉΡ‡ΠΈΠ²ΠΎΡΡ‚ΡŒ ΠΊ измСнСниям
7+
Π˜ΡΠΏΠΎΠ»ΡŒΠ·ΡƒΠΉΡ‚Π΅ Π΅Ρ‘ ΠΊΠ°ΠΊ быстрый справочник, ΠΊΠΎΠ³Π΄Π° Π²Ρ‹ Ρ€Π΅ΡˆΠ°Π΅Ρ‚Π΅, ΠΊΠ°ΠΊ Ρ€Π°Π·Π±ΠΈΡ‚ΡŒ ваш интСрфСйс ΠΏΠΎ слоям. НиТС Ρ‚Π°ΠΊΠΆΠ΅ доступна PDF-вСрсия, Ρ‡Ρ‚ΠΎΠ±Ρ‹ Π²Ρ‹ ΠΌΠΎΠ³Π»ΠΈ Ρ€Π°ΡΠΏΠ΅Ρ‡Π°Ρ‚Π°Ρ‚ΡŒ Π΅Ρ‘ ΠΈ Π΄Π΅Ρ€ΠΆΠ°Ρ‚ΡŒ ΠΏΠΎΠ΄ ΠΏΠΎΠ΄ΡƒΡˆΠΊΠΎΠΉ.
158

16-
## Как ΠΎΠΏΡ€Π΅Π΄Π΅Π»ΡΡ‚ΡŒ скоуп отвСтствСнности {#how-to-determine-the-scope-of-responsibility}
9+
## Π’Ρ‹Π±ΠΎΡ€ слоя {#choosing-a-layer}
1710

18-
> ΠšΡ€ΠΈΡ‚Π΅Ρ€ΠΈΠΈ слоСв
11+
[Π‘ΠΊΠ°Ρ‡Π°Ρ‚ΡŒ PDF](/files/choosing-a-layer-ru.pdf)
1912

20-
![layers-criteria-bordered-w100-bgLight](/img/layers/criteria.png)
13+
![ΠžΠΏΡ€Π΅Π΄Π΅Π»Π΅Π½ΠΈΡ всСх слоёв ΠΈ вопросы для самопровСрки](/img/choosing-a-layer-ru.jpg)
2114

2215
## ΠŸΡ€ΠΈΠΌΠ΅Ρ€Ρ‹ {#examples}
2316

@@ -29,12 +22,6 @@ import WIP from '@site/src/shared/ui/wip/tmpl.mdx'
2922

3023
![decomposed-github-bordered](/img/decompose-github.jpg)
3124

32-
### Π”Ρ€ΠΎΠ±Π»Π΅Π½ΠΈΠ΅ ΠΌΠ°ΠΊΠ΅Ρ‚Π° {design-mockup}
33-
34-
<WIP ticket="224" />
35-
36-
> ΠŸΠΎΠΊΠ°Π·Π°Ρ‚ΡŒ Π½Π° ΠΏΡ€ΠΈΠΌΠ΅Ρ€Π΅ ΠΌΠ°ΠΊΠ΅Ρ‚Π°, ΠΊΠ°ΠΊ дСкомпозируСтся Π»ΠΎΠ³ΠΈΠΊΠ° ΠΈ прСобраТаСтся Π² Π°Ρ€Ρ…ΠΈΡ‚Π΅ΠΊΡ‚ΡƒΡ€Ρƒ с модулями - с ΠΊΠΎΠ½ΠΊΡ€Π΅Ρ‚Π½ΠΎΠΉ Ρ„Π°ΠΉΠ»ΠΎΠ²ΠΎΠΉ структурой
37-
3825
## Π‘ΠΌ. Ρ‚Π°ΠΊΠΆΠ΅ {#see-also}
3926
- [(Π’Ρ€Π΅Π΄) ΠžΠ±Ρ‰Π°Ρ Π»ΠΎΠ³ΠΈΠΊΠ° для Ρ„ΠΈΡ‡ ΠΈ сущностСй](https://t.me/feature_sliced/4262)
4027
- [(Π’Ρ€Π΅Π΄) ДСкомпозиция Ρ€Π°Π·Π±ΡƒΡ…ΡˆΠ΅ΠΉ Π»ΠΎΠ³ΠΈΠΊΠΈ](https://t.me/feature_sliced/4210)

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"js-cookie": "^3.0.1",
4444
"lodash-es": "^4.17.21",
4545
"picocolors": "^1.0.0",
46+
"plugin-image-zoom": "^1.2.0",
4647
"react": "^17.0.1",
4748
"react-cookie-consent": "^6.4.1",
4849
"react-dom": "^17.0.1",

β€Žpnpm-lock.yamlβ€Ž

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žsrc/app/navbar.scssβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,8 @@ html[data-theme="dark"] .ext-link::before {
9696
font-size: 1rem; // #nowar
9797
}
9898
}
99+
100+
.medium-zoom-overlay,
101+
.medium-zoom-image--opened {
102+
z-index: 999;
103+
}

β€Žsrc/pages/examples/_config.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export const examples: Example[] = [
202202
updatedAt: "2023-06-21",
203203
tech: ["react", "react-router", "react-query", "zustand", "vite", "typescript"],
204204
},
205-
{
205+
{
206206
title: "E-Commerce",
207207
description:
208208
"This project is an online store built using React. It provides the ability to view the product catalog and product pages",
1.77 MB
Binary file not shown.
1.61 MB
Binary file not shown.

0 commit comments

Comments
Β (0)