Skip to content

Conversation

@IvanDetch
Copy link

Task: https://otus.ru/learning/335195/#/homework-chat/37435/
Screenshots:
image
image
image

Git: https://github.com/IvanDetch/IvanDetch.github.io/tree/homework-complex-components
Deploy: https://ivandetch.github.io/?path=/story/components-complex-componentinfo--default
Score: 10 / 10
-[x] Компонент доступен в сторибук (2 балла)
-[x] Реализация компонента (7 баллов)
-[x] Дополнительные критерии (1 балл)

Ivan Komrakov and others added 9 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
feat(complex/component-info): add ComponentInfo with title/desc/fullWidth and css-modules
feat(storybook): add ComponentInfo stories (default, full width)

feat(complex/infinity-list): implement virtualized bidirectional list with overscan/reserve, start/end loaders, height prop and scrollTo api
feat(complex/infinity-list): integrate ResizeObserver with rAF throttling and preserve scroll position on prepend
feat(storybook): add InfinityList stories using ComponentInfo with controls (height, itemHeight, reserve, overscan, generatedCount, timeout)

feat(complex/cropped-text): add CroppedText with binary-search truncation by rows and customizable ellipsis
feat(complex/cropped-text): integrate ResizeObserver to recalc on width change
feat(storybook): add CroppedText stories (default, responsive width, opened) using ComponentInfo

feat(components/index): export ComponentInfo, InfinityList and CroppedText
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