Skip to content

PLASMA-7745: share IconButton stories - #3348

Open
vmytnik wants to merge 1 commit into
devfrom
PLASMA-7745.icon-button-story-fix
Open

vmytnik wants to merge 1 commit into
devfrom
PLASMA-7745.icon-button-story-fix

Conversation

@vmytnik

@vmytnik vmytnik commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

What/why changed

IconButtom

  • вынес story в plasma-sb-utils

Summary by CodeRabbit

  • Documentation
    • Updated IconButton Storybook examples across product themes to use a shared format, with consistent default stories and controls.
    • Preserved theme-specific defaults and icon sizing where needed.

Move IconButton stories into getIconButtonStories
so vertical packages reuse one factory.
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 015508f2-f3e2-4bde-996b-1a1b0d7dadcb
Commits

Reviewing files that changed from the base of the PR and between f016555 and 5c78dd5.

Files selected for processing: 23
  • packages/plasma-b2c/src/components/IconButton/IconButton.stories.tsx
  • packages/plasma-giga/src/components/IconButton/IconButton.stories.tsx
  • packages/plasma-homeds/src/components/IconButton/IconButton.stories.tsx
  • packages/plasma-new-hope/src/examples/components/IconButton/IconButton.stories.tsx
  • packages/plasma-web/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-bizcom/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-cs/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-dfa/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-finai/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-insol-next/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-insol/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-netology/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-os/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-platform-ai/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-sbcom/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-scan/src/components/IconButton/IconButton.stories.tsx
  • packages/sdds-serv/src/components/IconButton/IconButton.stories.tsx
  • utils/plasma-sb-utils/src/components/IconButton/IconButton.tsx
  • utils/plasma-sb-utils/src/components/IconButton/fixtures.ts
  • utils/plasma-sb-utils/src/components/IconButton/index.ts
  • utils/plasma-sb-utils/src/components/IconButton/meta.ts
  • utils/plasma-sb-utils/src/components/IconButton/stories.tsx
  • utils/plasma-sb-utils/src/components/index.ts

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

Shared Storybook utilities now create IconButton metadata and default stories. Seventeen package stories use the utilities, with selected packages retaining custom options or icon renderers.

Changes: IconButton Storybook stories

Layer / File(s) Summary
Metadata and rendering helpers
utils/plasma-sb-utils/src/components/IconButton/meta.ts, utils/plasma-sb-utils/src/components/IconButton/fixtures.ts, utils/plasma-sb-utils/src/components/IconButton/stories.tsx
Added helpers for metadata controls and default story rendering, plus fixtures for appearances and pin values.
Story generation and exports
utils/plasma-sb-utils/src/components/IconButton/IconButton.tsx, utils/plasma-sb-utils/src/components/IconButton/index.ts, utils/plasma-sb-utils/src/components/index.ts
Added getIconButtonStories to combine component configuration, metadata, and a default story. Exported the utility through component indexes.
Standard package story migrations
packages/plasma-b2c/.../IconButton.stories.tsx, packages/plasma-giga/.../IconButton.stories.tsx, packages/plasma-new-hope/.../IconButton.stories.tsx, packages/plasma-web/.../IconButton.stories.tsx, packages/sdds-bizcom/.../IconButton.stories.tsx, packages/sdds-dfa/.../IconButton.stories.tsx, packages/sdds-netology/.../IconButton.stories.tsx, packages/sdds-os/.../IconButton.stories.tsx, packages/sdds-sbcom/.../IconButton.stories.tsx, packages/sdds-scan/.../IconButton.stories.tsx, packages/sdds-serv/.../IconButton.stories.tsx
Replaced locally defined metadata and default stories with values from the shared generator.
Package-specific story options
packages/plasma-homeds/.../IconButton.stories.tsx, packages/sdds-cs/.../IconButton.stories.tsx, packages/sdds-finai/.../IconButton.stories.tsx, packages/sdds-insol-next/.../IconButton.stories.tsx, packages/sdds-insol/.../IconButton.stories.tsx, packages/sdds-platform-ai/.../IconButton.stories.tsx
Migrated stories while retaining package-specific disabled props, defaults, controls, configurations, or icon-size rendering.

Priority: Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Refactor

Suggested labels: plasma-homeds, sdds-cs, sdds-dfa, sdds-platform-ai, changelog-skip

Suggested reviewers: yakutoc, titankuzmich, shuga2704

Merge Risk: Minimal · up to 5c78d

The shared IconButton story preserves the inspected outline behavior. No merge-blocking issue is established.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "PLASMA-7745: share IconButton stories" matches the main change. The PR moves the IconButton story logic into the shared plasma-sb-utils package through a new getIconButtonStories factory, a…
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "PLASMA-7745: share IconButton stories" matches the main change. The PR moves the IconButton story logic into the shared plasma-sb-utils package through a new getIconButtonStories factory, and the vertical packages now import it. The title names the ticket, the component, and the action of sharing the stories. It omits the factory name, which the commit message gives, but it still names the primary change.

Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 23 files.

Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install timed out. The project may have too many dependencies for the sandbox.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Documentation preview deployed!

website: https://plasma.sberdevices.ru/pr/pr-3348/
landing: https://plasma.sberdevices.ru/pr/pr-3348/landing/
asdk storybook: https://plasma.sberdevices.ru/pr/pr-3348/asdk-storybook/
b2c storybook: https://plasma.sberdevices.ru/pr/pr-3348/b2c-storybook/
giga storybook: https://plasma.sberdevices.ru/pr/pr-3348/giga-storybook/
homeds storybook: https://plasma.sberdevices.ru/pr/pr-3348/homeds-storybook/
new-hope storybook: https://plasma.sberdevices.ru/pr/pr-3348/new-hope-storybook/
web storybook: https://plasma.sberdevices.ru/pr/pr-3348/web-storybook/
sdds-bizcom storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-bizcom-storybook/
sdds-cs storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-cs-storybook/
sdds-dfa storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-dfa-storybook/
sdds-finai storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-finai-storybook/
sdds-insol storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-insol-storybook/
sdds-insol-next storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-insol-next-storybook/
sdds-netology storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-netology-storybook/
sdds-os storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-os-storybook/
sdds-platform-ai storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-platform-ai-storybook/
sdds-sbcom storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-sbcom-storybook/
sdds-scan storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-scan-storybook/
sdds-serv storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-serv-storybook/
sdds-vc storybook: https://plasma.sberdevices.ru/pr/pr-3348/sdds-vc-storybook/

@Yakutoc
Yakutoc requested review from IgorYar and removed request for Yeti-or, neretin-trike and shuga2704 October 30, 2026 13:06

This branch was successfully deployed

1 active deployment
internal — 5c78dd56 Deployed Oct 29, 2026 by vmytnik via authorize / Approved #237
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