PLASMA: revert comps deleting - #3018
Conversation
acef9df to
5ab366b
Compare
📝 WalkthroughWalkthroughThe PR enables Link, Overlay, Popup, and Table exports in SDDS DFA. It adds Storybook stories for each component and documentation pages with usage details, properties, and interactive examples. ChangesSDDS DFA component enablement
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Theme Builder app deployed! https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-3018/ |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (2)
website/sdds-dfa-docs/docs/components/Overlay.mdx (1)
8-11: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAdd a usage example for
Overlay.This page contains only the description and the props table.
Link.mdxandPopup.mdxin the same change include live examples. TheOverlay.stories.tsxstory added in this change provides a show/hide flow that you can adapt into atsx liveblock.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@website/sdds-dfa-docs/docs/components/Overlay.mdx` around lines 8 - 11, Add a live TSX usage example to the Overlay documentation page alongside the existing Description and PropsTable, adapting the show/hide interaction from Overlay.stories.tsx. Keep the example focused on demonstrating Overlay usage and preserve the existing props table.website/sdds-dfa-docs/docs/components/Table.mdx (1)
856-856: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueReplace the hardcoded row count with
rowsPagination.length.The guard uses the literal
100. The dataset length is already available. If a reader changes the dataset, the loading stops at the wrong point.♻️ Proposed refactor
- if (data.length < 100 && loading === false && scrollTop + clientHeight >= scrollHeight - 20) { + if (data.length < rowsPagination.length && loading === false && scrollTop + clientHeight >= scrollHeight - 20) {🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@website/sdds-dfa-docs/docs/components/Table.mdx` at line 856, The scroll-loading guard in the Table docs example is using a hardcoded row count, so update the condition in the Table.mdx snippet to compare against rowsPagination.length instead of 100. Keep the existing loading and scroll position checks unchanged, and reuse the already available rowsPagination collection symbol rather than introducing a new length source.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/sdds-dfa/src/components/Overlay/Overlay.stories.tsx`:
- Line 59: Update the StyledCloseButton usage in the overlay story to remove the
leading whitespace from its text prop, leaving the label as “Скрыть overlay”.
In `@packages/sdds-dfa/src/components/Popup/Popup.stories.tsx`:
- Around line 92-106: The StoryPopupProps story-only fields resizableDirections
and resizableHiddenIcons are too broad; reuse the exported Popup resizable union
types instead of string[]. Update the meta declaration to Meta<StoryPopupProps>
so all argTypes keys are valid, while preserving the existing Popup component
props intersection and control behavior.
In `@website/sdds-dfa-docs/docs/components/Popup.mdx`:
- Around line 125-154: Update the Popup documentation text and both styled
snippets to use the exported lowercase popupClasses identifier, matching
Popup.stories.tsx. Replace the child-combinator selectors targeting
popupClasses.root with descendant selectors so animations and transitions match
the rendered popup root regardless of nesting.
- Around line 232-243: Update both the Draggable and Resizable Popup examples to
use the supported opened prop instead of isOpen. In the Resizable example,
replace the bare resizable boolean with the documented object configuration
shape, matching the existing examples and Popup.stories.tsx usage.
In `@website/sdds-dfa-docs/docs/components/Table.mdx`:
- Line 338: Remove the debug console.log(selected) statement from the
documentation example while preserving the surrounding selection handling.
- Line 223: Define the DataRow type within the example before it is used by
filterHelper, sortedHelper, and useBackendImitation, or remove those annotations
consistently; ensure the copied example compiles without relying on an undefined
or unavailable type.
---
Nitpick comments:
In `@website/sdds-dfa-docs/docs/components/Overlay.mdx`:
- Around line 8-11: Add a live TSX usage example to the Overlay documentation
page alongside the existing Description and PropsTable, adapting the show/hide
interaction from Overlay.stories.tsx. Keep the example focused on demonstrating
Overlay usage and preserve the existing props table.
In `@website/sdds-dfa-docs/docs/components/Table.mdx`:
- Line 856: The scroll-loading guard in the Table docs example is using a
hardcoded row count, so update the condition in the Table.mdx snippet to compare
against rowsPagination.length instead of 100. Keep the existing loading and
scroll position checks unchanged, and reuse the already available rowsPagination
collection symbol rather than introducing a new length source.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: c6dfc40c-e12e-4a89-8540-2a63c1fbcd13
📒 Files selected for processing (9)
packages/sdds-dfa/src/components/Link/Link.stories.tsxpackages/sdds-dfa/src/components/Overlay/Overlay.stories.tsxpackages/sdds-dfa/src/components/Popup/Popup.stories.tsxpackages/sdds-dfa/src/components/Table/Table.stories.tsxpackages/sdds-dfa/src/index.tswebsite/sdds-dfa-docs/docs/components/Link.mdxwebsite/sdds-dfa-docs/docs/components/Overlay.mdxwebsite/sdds-dfa-docs/docs/components/Popup.mdxwebsite/sdds-dfa-docs/docs/components/Table.mdx
5ab366b to
5874d41
Compare
5874d41 to
e739c0b
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@website/sdds-dfa-docs/docs/components/Popup.mdx`:
- Around line 180-203: Wrap the Popup usage snippet’s existing useState and
return JSX in a named React component declaration, ensuring the closing brace
matches that component so the TSX example compiles and can be copied directly.
In `@website/sdds-dfa-docs/docs/components/Table.mdx`:
- Around line 374-385: Update the example row objects in the Table
documentation, including the corresponding rows near the later occurrence, so
population and area use values compatible with TableRowData instead of null;
only expand TableRowData to allow null if the Table implementation explicitly
supports nullable cells.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 02c3a7b3-3960-4879-95b6-bdc306c9ce17
📒 Files selected for processing (9)
packages/sdds-dfa/src/components/Link/Link.stories.tsxpackages/sdds-dfa/src/components/Overlay/Overlay.stories.tsxpackages/sdds-dfa/src/components/Popup/Popup.stories.tsxpackages/sdds-dfa/src/components/Table/Table.stories.tsxpackages/sdds-dfa/src/index.tswebsite/sdds-dfa-docs/docs/components/Link.mdxwebsite/sdds-dfa-docs/docs/components/Overlay.mdxwebsite/sdds-dfa-docs/docs/components/Popup.mdxwebsite/sdds-dfa-docs/docs/components/Table.mdx
🚧 Files skipped from review as they are similar to previous changes (7)
- packages/sdds-dfa/src/index.ts
- packages/sdds-dfa/src/components/Table/Table.stories.tsx
- website/sdds-dfa-docs/docs/components/Link.mdx
- website/sdds-dfa-docs/docs/components/Overlay.mdx
- packages/sdds-dfa/src/components/Popup/Popup.stories.tsx
- packages/sdds-dfa/src/components/Link/Link.stories.tsx
- packages/sdds-dfa/src/components/Overlay/Overlay.stories.tsx
SDDS-DFA
Popup, Link, Overlay, Table
What/why changed
Summary by CodeRabbit
📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install @salutejs/plasma-asdk@0.387.0-canary.3018.31146437224.0 npm install @salutejs/plasma-b2c@1.629.0-canary.3018.31146437224.0 npm install @salutejs/plasma-colors@0.18.0-canary.3018.31146437224.0 npm install @salutejs/plasma-core@1.236.0-canary.3018.31146437224.0 npm install @salutejs/plasma-giga@0.356.0-canary.3018.31146437224.0 npm install @salutejs/plasma-homeds@0.356.0-canary.3018.31146437224.0 npm install @salutejs/plasma-hope@1.383.0-canary.3018.31146437224.0 npm install @salutejs/plasma-icons@1.245.0-canary.3018.31146437224.0 npm install @salutejs/plasma-new-hope@0.373.0-canary.3018.31146437224.0 npm install @salutejs/plasma-tokens@1.147.0-canary.3018.31146437224.0 npm install @salutejs/plasma-tokens-b2b@1.61.0-canary.3018.31146437224.0 npm install @salutejs/plasma-tokens-b2c@0.72.0-canary.3018.31146437224.0 npm install @salutejs/plasma-tokens-core@0.9.0-canary.3018.31146437224.0 npm install @salutejs/plasma-tokens-web@1.76.0-canary.3018.31146437224.0 npm install @salutejs/plasma-typo@0.49.0-canary.3018.31146437224.0 npm install @salutejs/plasma-web@1.631.0-canary.3018.31146437224.0 npm install @salutejs/sdds-bizcom@0.361.0-canary.3018.31146437224.0 npm install @salutejs/sdds-cs@0.365.0-canary.3018.31146437224.0 npm install @salutejs/sdds-dfa@0.359.0-canary.3018.31146437224.0 npm install @salutejs/sdds-finai@0.352.0-canary.3018.31146437224.0 npm install @salutejs/sdds-insol@0.356.0-canary.3018.31146437224.0 npm install @salutejs/sdds-insol-next@0.355.0-canary.3018.31146437224.0 npm install @salutejs/sdds-netology@0.360.0-canary.3018.31146437224.0 npm install @salutejs/sdds-os@0.31.0-canary.3018.31146437224.0 npm install @salutejs/sdds-platform-ai@0.360.0-canary.3018.31146437224.0 npm install @salutejs/sdds-sbcom@0.361.0-canary.3018.31146437224.0 npm install @salutejs/sdds-scan@0.359.0-canary.3018.31146437224.0 npm install @salutejs/sdds-serv@0.360.0-canary.3018.31146437224.0 npm install @salutejs/core-themes@0.37.0-canary.3018.31146437224.0 npm install @salutejs/plasma-themes@0.59.0-canary.3018.31146437224.0 npm install @salutejs/sdds-themes@0.74.0-canary.3018.31146437224.0 npm install @salutejs/sdds-api-tests@0.18.0-canary.3018.31146437224.0 npm install @salutejs/plasma-cy-utils@0.166.0-canary.3018.31146437224.0 npm install @salutejs/plasma-sb-utils@0.237.0-canary.3018.31146437224.0 npm install @salutejs/plasma-tokens-utils@0.57.0-canary.3018.31146437224.0 # or yarn add @salutejs/plasma-asdk@0.387.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-b2c@1.629.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-colors@0.18.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-core@1.236.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-giga@0.356.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-homeds@0.356.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-hope@1.383.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-icons@1.245.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-new-hope@0.373.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-tokens@1.147.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-tokens-b2b@1.61.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-tokens-b2c@0.72.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-tokens-core@0.9.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-tokens-web@1.76.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-typo@0.49.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-web@1.631.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-bizcom@0.361.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-cs@0.365.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-dfa@0.359.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-finai@0.352.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-insol@0.356.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-insol-next@0.355.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-netology@0.360.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-os@0.31.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-platform-ai@0.360.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-sbcom@0.361.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-scan@0.359.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-serv@0.360.0-canary.3018.31146437224.0 yarn add @salutejs/core-themes@0.37.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-themes@0.59.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-themes@0.74.0-canary.3018.31146437224.0 yarn add @salutejs/sdds-api-tests@0.18.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-cy-utils@0.166.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-sb-utils@0.237.0-canary.3018.31146437224.0 yarn add @salutejs/plasma-tokens-utils@0.57.0-canary.3018.31146437224.0