Skip to content

Conversation

@IvanDetch
Copy link

Task: https://otus.ru/learning/335195/#/homework-chat/37434/
Screenshots:
image
Git: https://github.com/IvanDetch/IvanDetch.github.io/tree/homework-patterns
Deploy: https://ivandetch.github.io/?path=/story/components-e-commerce-productlist-patterns--default
Score: 10 / 10
-[x] Применение ключевых паттернов React (3 балла)
-[x] Рефакторинг компонентов для повышения читаемости и качества кода (3 балла)
-[x] Минимизация дублирования кода (2 балла)
-[x] Работа с состоянием и контекстом (2 балла)

Ivan Komrakov added 8 commits March 11, 2025 23:07
feat: modify style App.css
feat: modify package.json
feat: modify webpack.config.json
…f, transactionFull, addToCartButton, cartItem, productBrief, productFull.
feat: (i18n) wrap stories with LocalizationProvider

refactor: (header) memoize Header and group controls

chore: (storybook) migrate Header stories to CSF3 render

feat: (modal) autofocus input on open via useRef

perf: (ui) memoize LanguageToggle and ThemeToggle
feat(ui/modal): implement portal mount to body with ESC close and backdrop click
feat(lib): add random data generators for Product and Operation
feat(ecommerce/product-list): render products array via ProductBrief
feat(ecommerce/product-list): append items by "show more" button
feat(ecommerce/product-list): auto-load next page via IntersectionObserver
feat(finance/operation): add Operation and OperationFull components
feat(finance/operation-list): implement infinite list with IO and "show more"
feat(storybook): add ProductList playground with generatedCount and pageSize controls
feat(storybook): add OperationList playground with generatedCount and pageSize controls
feat(patterns/list): add generic List with function-as-children and renderEmpty
feat(shared/hooks): add useIntersection hook for infinite loading
feat(ecommerce/product-list-pattern): add ProductListPattern with renderItem and IO-based infinite scroll
feat(storybook): add ProductListPattern stories with generatedCount/pageSize/useInfinite controls

feat(ecommerce/product-brief): support actions slot via children and spread HTML props
fix(ecommerce/product-brief): replace default AddToCartButton with children fallback to avoid duplicates

feat(ui/modal): add renderTrigger API while keeping controlled mode and ESC/backdrop close
feat(ui/modal): add focus trap, restoreFocus, initialFocusRef and disableBackdropClose

feat(ui/theme-toggle): support controlled/uncontrolled over ThemeProvider (state hoisting)

feat(ecommerce/add-to-cart-button-pattern): support controlled/uncontrolled, onChange/onAdd/onIncrease/onDecrease and forwardRef
feat(storybook): add AddToCartButtonPattern stories for controlled and uncontrolled modes

feat(ecommerce/cart-item-pattern): support controlled/uncontrolled qty, onQuantityChange/onRemove and renderActions prop; improve a11y
feat(storybook): add CartItemPattern stories (Uncontrolled, Controlled, WithCustomActions)

feat(components/index): export List and ProductListPattern
feat(storybook): add Modal “Focus & Restore” story to demonstrate focus management
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant