Skip to content

feat(switch): implement new web switch - #774

Open
comfrt1k wants to merge 6 commits into
feat/v2from
feat/web-switch
Open

feat(switch): implement new web switch#774
comfrt1k wants to merge 6 commits into
feat/v2from
feat/web-switch

Conversation

@comfrt1k

@comfrt1k comfrt1k commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

BREAKING CHANGE: Remove legacy Switch style and motion props in favor of appearance and shape.

Таска

Как проверять

  1. Контекст: Storybook → Components/Switch → Variants
    Действие: Переключить размеры, тему, состояния checked/disabled/focused и custom thumb; проверить переключение кликом и клавишами Space/Enter
    Ожидаемый результат: Switch корректно отображается во всех размерах и темах, disabled не переключается, focus виден, thumb плавно перемещается и поворачивается на 180°, пользовательский thumb работает так же

Пруфы

Details
2026-09-08.02.57.35.mov

BREAKING CHANGE: Remove legacy Switch style and motion props in favor of appearance and shape.
@comfrt1k comfrt1k self-assigned this Sep 8, 2026
@comfrt1k
comfrt1k changed the base branch from master to feat/v2 September 8, 2026 15:22
@comfrt1k
comfrt1k marked this pull request as ready for review September 8, 2026 16:28
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T23:20:07.650909Z ca21a21 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a686c06517

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui-parts/switch/src/styles/reset.css.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 351bbe7683

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ui-parts/switch/src/styles/reset.css.ts
Comment thread ui-parts/switch/src/component.tsx Outdated
width,
paddingBlock: spacing.component.xs2,
paddingInline: spacing.component.xs2,
borderRadius: radii.xs3,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В Figma для всех трёх размеров Switch указан Radius/2xs. В foundations ему соответствует radii.xs2 со значением 4px, а используемый здесь radii.xs3 — это 3xs, то есть 2px.

Из-за этого варианты Sm, Md и Lg получаются более квадратными, чем утверждённый компонент, во всех темах и состояниях. Здесь нужен radii.xs2.

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.

[Feature] Реализовать Switch для Hyperion Web

2 participants