fixes
Some checks failed
Architecture Governance / architecture (push) Has been cancelled

This commit is contained in:
sdarbinyan
2026-07-10 15:55:38 +04:00
parent 49d8226411
commit ee269a9e33
33 changed files with 559 additions and 52 deletions

View File

@@ -16,6 +16,7 @@
## Опциональные свойства
- catalog.navigationMode
- catalog.loadingStrategy
- catalog.showBreadcrumbs
- catalog.showCategoryBanner
- catalog.showSubcategoryChips
@@ -24,12 +25,16 @@
- catalog.showAvailability
- catalog.suggestionsEnabled
- catalog.searchHistoryEnabled
- catalog.features (via bootstrap.features)
- catalog.facets (future backend-driven)
## Строгие правила
- Каталог не содержит tenant-specific условий в frontend-коде.
- Сортировка и фильтры должны быть согласованы между frontend и backend.
- Видимость товаров контролируется данными backend, а не frontend-хардкодом.
- Пустая категория рендерит отдельный catalog empty-state, а не product grid empty-state.
- Корневой переход `All Categories` всегда возвращает category browser `/catalog`.
- Loading strategy выбирается конфигурацией без дублирования list logic.
## Reusable Domain Models
- SearchCriteria
@@ -43,7 +48,8 @@
```json
{
"catalog": {
"layout": "grid",
"layout": "grid-4",
"loadingStrategy": "pagination",
"defaultSort": "relevance",
"availableSorts": ["relevance", "latest", "price_asc", "price_desc", "rating", "popular", "discount"],
"enabledFilters": ["price", "availability", "rating", "brand", "category", "subcategory", "discount", "new", "color", "size", "attributes"],
@@ -54,6 +60,23 @@
}
```
## Loading Strategies
- `pagination`
- `loadMore`
- `infiniteScroll`
## Grid Modes
- `grid-2`
- `grid-3`
- `grid-4`
- `list`
- `compact`
Legacy aliases still normalize safely:
- `grid`
- `large-grid`
- `compact-grid`
## Ответственность Frontend
- Отобразить листинг, фильтры, сортировки и пагинацию.
- Синхронизировать состояние каталога с URL.