Skip to content

PLASMA-7356: add edited view#2882

Open
oki1oki wants to merge 4 commits into
devfrom
PLASMA-7356
Open

PLASMA-7356: add edited view#2882
oki1oki wants to merge 4 commits into
devfrom
PLASMA-7356

Conversation

@oki1oki

@oki1oki oki1oki commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

SDDS-FINAI

TextField like components

  • добавлен view - edited

What/why changed

  • добавлен view - edited
📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @salutejs/plasma-asdk@0.381.0-canary.2882.27683818406.0
npm install @salutejs/plasma-b2c@1.623.0-canary.2882.27683818406.0
npm install @salutejs/plasma-core@1.230.0-canary.2882.27683818406.0
npm install @salutejs/plasma-giga@0.350.0-canary.2882.27683818406.0
npm install @salutejs/plasma-homeds@0.350.0-canary.2882.27683818406.0
npm install @salutejs/plasma-hope@1.377.0-canary.2882.27683818406.0
npm install @salutejs/plasma-new-hope@0.367.0-canary.2882.27683818406.0
npm install @salutejs/plasma-ui@1.353.0-canary.2882.27683818406.0
npm install @salutejs/plasma-web@1.625.0-canary.2882.27683818406.0
npm install @salutejs/sdds-bizcom@0.355.0-canary.2882.27683818406.0
npm install @salutejs/sdds-cs@0.359.0-canary.2882.27683818406.0
npm install @salutejs/sdds-dfa@0.353.0-canary.2882.27683818406.0
npm install @salutejs/sdds-finai@0.346.0-canary.2882.27683818406.0
npm install @salutejs/sdds-insol@0.350.0-canary.2882.27683818406.0
npm install @salutejs/sdds-netology@0.354.0-canary.2882.27683818406.0
npm install @salutejs/sdds-os@0.25.0-canary.2882.27683818406.0
npm install @salutejs/sdds-platform-ai@0.354.0-canary.2882.27683818406.0
npm install @salutejs/sdds-sbcom@0.355.0-canary.2882.27683818406.0
npm install @salutejs/sdds-scan@0.353.0-canary.2882.27683818406.0
npm install @salutejs/sdds-serv@0.354.0-canary.2882.27683818406.0
npm install @salutejs/sdds-api-tests@0.12.0-canary.2882.27683818406.0
npm install @salutejs/plasma-cy-utils@0.160.0-canary.2882.27683818406.0
npm install @salutejs/plasma-sb-utils@0.231.0-canary.2882.27683818406.0
# or 
yarn add @salutejs/plasma-asdk@0.381.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-b2c@1.623.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-core@1.230.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-giga@0.350.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-homeds@0.350.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-hope@1.377.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-new-hope@0.367.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-ui@1.353.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-web@1.625.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-bizcom@0.355.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-cs@0.359.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-dfa@0.353.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-finai@0.346.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-insol@0.350.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-netology@0.354.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-os@0.25.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-platform-ai@0.354.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-sbcom@0.355.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-scan@0.353.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-serv@0.354.0-canary.2882.27683818406.0
yarn add @salutejs/sdds-api-tests@0.12.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-cy-utils@0.160.0-canary.2882.27683818406.0
yarn add @salutejs/plasma-sb-utils@0.231.0-canary.2882.27683818406.0

Summary by CodeRabbit

  • New Features
    • Added an “edited” visual state across date/time and text input components (DatePicker, DateTimePicker, TimePicker, Range) and finai inputs (TextField, TextArea, Autocomplete, Combobox, Select), including new edited props/controls for single and range endpoints.
  • Style
    • Updated styling and theme tokens so the edited state adjusts text, background, borders, helper/divider colors, including hover/focus behavior.
  • Documentation
    • Extended Storybook stories and website examples to demonstrate view="edited"/valueEdited.
  • Tests
    • Added gated visual snapshot coverage for the edited state.
  • Refactor
    • Improved story arg construction and enhanced Cypress decorators for package-specific gating.

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new valueEdited boolean prop and corresponding "edited" visual state to TimePicker, DatePicker, DateTimePicker, and Range components in plasma-new-hope. New CSS class tokens, design tokens, hook logic, and styled-component selectors are introduced. The sdds-finai package wires the "edited" view variant using blue/info-palette CSS variables across TextField, TextArea, Select, Autocomplete, Combobox, and all picker configs. Cypress test utilities, component visual tests, Storybook stories, and MDX docs are updated to expose and demonstrate the new state.

Changes

Edited state for picker and range components

Layer / File(s) Summary
Token and type contracts
packages/plasma-new-hope/src/components/DatePicker/DatePicker.tokens.ts, DatePickerBase.types.ts, SingleDate/SingleDate.types.ts, DateTimePicker/DateTimePicker.tokens.ts, DateTimePicker.types.ts, Range/Range.tokens.ts, Range.types.ts, TimePicker/TimePicker.tokens.ts, TimePicker.types.ts
Adds *Edited CSS class keys to all classes maps; adds backgroundEdited, borderColorEdited, leftHelperColorEdited, textFieldColorEdited, textFieldBackground/BorderColorEdited* token keys to all tokens maps; extends UseDatePickerProps, DatePickerTextFieldProps, UseDateTimePickerArgs, TextFieldProps, and RangeInnerProps with optional valueEdited/firstValueEdited/secondValueEdited booleans.
Hook logic
packages/plasma-new-hope/src/components/DatePicker/hooks/useDatePicker.ts, DateTimePicker/hooks/useDateTimePicker.ts
useDatePicker destructures valueEdited and derives datePickerEditedClass; useDateTimePicker destructures valueEdited, derives editedClass, and returns it alongside errorClass/successClass.
Styled-component CSS
packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.styles.ts, RangeDate/RangeDate.styles.ts, DateTimePicker/DateTimePicker.styles.ts, DateTimePicker/ui/Input/Input.styles.ts, Range/Range.styles.ts, Range/variations/_view/base.ts, TimePicker/TimePicker.styles.ts
Extends StyledInput, StyledRange, and LeftHelper with &.${classes.*Edited} CSS selectors that map all new *Edited* tokens to TextField CSS variable overrides for background, border, divider, and helper text colors.
Component wiring
packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.tsx, RangeDate/RangeDate.tsx, DateTimePicker/DateTimePicker.tsx, Range/Range.tsx, TimePicker/TimePicker.tsx
Each component destructures valueEdited/firstValueEdited/secondValueEdited, passes them into the appropriate hooks, and applies the returned edited CSS classes to StyledInput, wrapper elements, and LeftHelper className compositions.
sdds-finai theme configurations
packages/sdds-finai/src/components/DatePicker/DatePicker.config.ts, DateTimePicker/DateTimePicker.config.ts, DateTimePicker.clear.config.ts, Range/Range.config.ts, TimePicker/TimePicker.config.ts, TimePicker.clear.config.ts, TextField/TextField.config.ts, TextField.clear.config.ts, TextArea/TextArea.config.ts, Select/Select.config.ts, Autocomplete/Autocomplete.config.ts, Combobox/Combobox.config.ts
Adds edited view variation CSS blocks across all sdds-finai component configs, binding new *Edited* token keys to --data-blue-light* and --outline-transparent-info* design-system variables.
Cypress test helper and component tests
utils/plasma-cy-utils/lib/CypressDecorator.d.ts, CypressDecorator.js, src/CypressDecorator.tsx, packages/plasma-new-hope/src/components/*/...component-test.tsx
Adds onlyForPackages(packages) helper to gate tests to specific packages; adds visual snapshot tests for valueEdited, firstValueEdited, secondValueEdited states in DatePicker, DateTimePicker, Range, and TimePicker, all wrapped with itOnlyEdited for sdds-finai.
Storybook stories, meta refactor, and docs
packages/sdds-finai/src/components/*/...stories.tsx, utils/plasma-sb-utils/src/components/DatePicker/meta.ts, DatePicker/stories.tsx, DateTimePicker/stories.tsx, Range/stories.tsx, website/sdds-finai-docs/docs/components/TextArea.mdx, TextField.mdx
Refactors getCommonArgTypes in DatePicker meta to separate additionalArgTypes merging; adds valueEdited boolean arg and inputView/firstInputView/secondInputView select controls with edited option to all relevant stories; updates story factories to forward valueEdited props; adds view="edited" examples to TextArea and TextField docs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • TitanKuzmich
  • Irinkv

Poem

🐇 Hop hop, a new hue appears today,
Blue tokens blooming in the CSS fray,
valueEdited true, the fields turn bright,
--data-blue-light glows just right,
The rabbit stamps each config with glee —
Edited state, as fresh as can be! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'PLASMA-7356: add edited view' directly describes the main objective of adding an 'edited' view variant to components in the SDDS-FINAI design system, which aligns with the extensive changes across multiple components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch PLASMA-7356

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 and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

Theme Builder app deployed!

https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-2882/

@github-actions

Copy link
Copy Markdown
Contributor

Documentation preview deployed!

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/plasma-new-hope/src/components/Range/Range.tokens.ts (1)

199-215: ⚠️ Potential issue | 🟡 Minor

Add missing textFieldDividerColorEdited token to Range.

Range token map includes edited tokens for textFieldBackgroundEditedColor, textFieldBorderColorEdited, and related state variants (lines 199–215), but lacks a corresponding edited divider token. DatePicker, DateTimePicker, and TimePicker all define textFieldDividerColorEdited in their token maps and apply it during edited state. Range should include this token for consistency and complete edited-state styling coverage.

🤖 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 `@packages/plasma-new-hope/src/components/Range/Range.tokens.ts` around lines
199 - 215, The Range token map in Range.tokens.ts is missing the
textFieldDividerColorEdited token that exists in other similar components like
DatePicker and DateTimePicker. Add the textFieldDividerColorEdited token
definition to the token map following the same naming convention as the existing
edited tokens (using the CSS variable pattern
--plasma-range-textfield-divider-color-edited). Place it logically with the
other divider-related tokens or edited state tokens to maintain consistency with
the component structure and ensure complete edited-state styling coverage for
the divider element.
🤖 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-finai/src/components/DatePicker/DatePicker.stories.tsx`:
- Line 16: The inputView option contains a typo where 'negaitve' is misspelled
and does not match the downstream mapping that checks for 'negative', preventing
the negative visual state from being selectable in Storybook controls. Correct
the typo in the inputView options array by changing 'negaitve' to 'negative' so
it aligns with the expected control mapping.

In `@packages/sdds-finai/src/components/DatePicker/DatePickerRange.stories.tsx`:
- Around line 16-17: The control options for firstInputView and secondInputView
in the DatePickerRange.stories.tsx file are missing the 'default' option in
their options arrays. This prevents users in Storybook from reverting to the
default state once they have selected a different value. Add 'default' to the
beginning of the options array for both firstInputView and secondInputView
controls so that all possible states (including the neutral default) are
selectable from the dropdown.

In `@packages/sdds-finai/src/components/TimePicker/TimePicker.clear.config.ts`:
- Line 58: The textFieldDividerColorEdited token in TimePicker.clear.config.ts
is set to var(--text-accent), which is inconsistent with how this token is
configured in TimePicker.config.ts. To fix this, locate the definition of
tokens.textFieldDividerColorEdited in TimePicker.config.ts (the default config
that uses the info/outline palette mapping) and apply the same token value to
TimePicker.clear.config.ts at line 58 where it currently references
var(--text-accent). This will ensure the edited state divider color remains
consistent between the clear and default variants.

---

Outside diff comments:
In `@packages/plasma-new-hope/src/components/Range/Range.tokens.ts`:
- Around line 199-215: The Range token map in Range.tokens.ts is missing the
textFieldDividerColorEdited token that exists in other similar components like
DatePicker and DateTimePicker. Add the textFieldDividerColorEdited token
definition to the token map following the same naming convention as the existing
edited tokens (using the CSS variable pattern
--plasma-range-textfield-divider-color-edited). Place it logically with the
other divider-related tokens or edited state tokens to maintain consistency with
the component structure and ensure complete edited-state styling coverage for
the divider element.
🪄 Autofix (Beta)

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: c6f44efa-33e9-438f-9909-45faa5f0c299

📥 Commits

Reviewing files that changed from the base of the PR and between 8809dc1 and 41c7659.

📒 Files selected for processing (46)
  • packages/plasma-new-hope/src/components/DatePicker/DatePicker.tokens.ts
  • packages/plasma-new-hope/src/components/DatePicker/DatePickerBase.types.ts
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.styles.ts
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.tsx
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.styles.ts
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.tsx
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.types.ts
  • packages/plasma-new-hope/src/components/DatePicker/hooks/useDatePicker.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.styles.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.tokens.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.tsx
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.types.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/hooks/useDateTimePicker.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/ui/Input/Input.styles.ts
  • packages/plasma-new-hope/src/components/Range/Range.styles.ts
  • packages/plasma-new-hope/src/components/Range/Range.tokens.ts
  • packages/plasma-new-hope/src/components/Range/Range.tsx
  • packages/plasma-new-hope/src/components/Range/Range.types.ts
  • packages/plasma-new-hope/src/components/Range/variations/_view/base.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.styles.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.tokens.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.tsx
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.types.ts
  • packages/sdds-finai/src/components/Autocomplete/Autocomplete.config.ts
  • packages/sdds-finai/src/components/Combobox/Combobox.config.ts
  • packages/sdds-finai/src/components/DatePicker/DatePicker.config.ts
  • packages/sdds-finai/src/components/DatePicker/DatePicker.stories.tsx
  • packages/sdds-finai/src/components/DatePicker/DatePickerRange.stories.tsx
  • packages/sdds-finai/src/components/DateTimePicker/DateTimePicker.clear.config.ts
  • packages/sdds-finai/src/components/DateTimePicker/DateTimePicker.config.ts
  • packages/sdds-finai/src/components/DateTimePicker/DateTimePicker.stories.tsx
  • packages/sdds-finai/src/components/Range/Range.config.ts
  • packages/sdds-finai/src/components/Range/Range.stories.tsx
  • packages/sdds-finai/src/components/Select/Select.config.ts
  • packages/sdds-finai/src/components/TextArea/TextArea.config.ts
  • packages/sdds-finai/src/components/TextField/TextField.clear.config.ts
  • packages/sdds-finai/src/components/TextField/TextField.config.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.clear.config.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.config.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.stories.tsx
  • utils/plasma-sb-utils/src/components/DatePicker/meta.ts
  • utils/plasma-sb-utils/src/components/DatePicker/stories.tsx
  • utils/plasma-sb-utils/src/components/DateTimePicker/stories.tsx
  • utils/plasma-sb-utils/src/components/Range/stories.tsx
  • website/sdds-finai-docs/docs/components/TextArea.mdx
  • website/sdds-finai-docs/docs/components/TextField.mdx

Comment thread packages/sdds-finai/src/components/DatePicker/DatePicker.stories.tsx Outdated
Comment on lines +16 to +17
firstInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },
secondInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },

@coderabbitai coderabbitai Bot Jun 16, 2026

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Include default in input view controls.

These control options exclude the neutral state. Once changed in Storybook, users can’t select default back from the dropdown.

Suggested fix
-        firstInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },
-        secondInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },
+        firstInputView: { options: ['default', 'positive', 'negative', 'edited'], control: { type: 'select' } },
+        secondInputView: { options: ['default', 'positive', 'negative', 'edited'], control: { type: 'select' } },
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
firstInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },
secondInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },
firstInputView: { options: ['default', 'positive', 'negative', 'edited'], control: { type: 'select' } },
secondInputView: { options: ['default', 'positive', 'negative', 'edited'], control: { type: 'select' } },
🤖 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 `@packages/sdds-finai/src/components/DatePicker/DatePickerRange.stories.tsx`
around lines 16 - 17, The control options for firstInputView and secondInputView
in the DatePickerRange.stories.tsx file are missing the 'default' option in
their options arrays. This prevents users in Storybook from reverting to the
default state once they have selected a different value. Add 'default' to the
beginning of the options array for both firstInputView and secondInputView
controls so that all possible states (including the neutral default) are
selectable from the dropdown.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Резонно

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@TitanKuzmich, glad it makes sense! When you apply the fix, you can update both lines like so:

firstInputView: { options: ['default', 'positive', 'negative', 'edited'], control: { type: 'select' } },
secondInputView: { options: ['default', 'positive', 'negative', 'edited'], control: { type: 'select' } },

(ミ^ ᴥ ^ミ)

@IgorYar IgorYar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Нужны тесты на view=edited во всех затронутых компонентах

@coderabbitai coderabbitai 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.

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
`@packages/plasma-new-hope/src/components/DatePicker/DatePicker.component-test.tsx`:
- Line 707: Locate the itOnlyEdited function call where the test name parameter
contains "secondaValueEdited" and fix the typo by changing it to
"secondValueEdited" to properly match the intended test name which references
both firstValueEdited and secondValueEdited.

In `@packages/plasma-new-hope/src/components/Range/Range.component-test.tsx`:
- Line 223: Fix the typo in the test name parameter of the itOnlyEdited function
call. In the test name string "firstValueEdited, secondaValueEdited", change
"secondaValueEdited" to "secondValueEdited" by adding the missing 'e' before the
'V'. This is a simple spelling correction in the test description passed to
itOnlyEdited.
🪄 Autofix (Beta)

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: 7f35c14f-8a98-4598-9815-29903fc2f322

📥 Commits

Reviewing files that changed from the base of the PR and between 7f8d05d and ad4a1eb.

⛔ Files ignored due to path filters (29)
  • cypress/snapshots/finai/chromium/Autocomplete/Autocomplete -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/Combobox/Combobox -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/DatePicker/DatePicker -- valueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/DatePicker/DatePickerRange -- firstValueEdited, secondaValueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/DateTimePicker/DateTimePicker -- valueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/Range/Range -- firstValueEdited, secondaValueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/Select/Select -- chipView=accent multiselect.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/Select/Select -- view=edited target=button-like.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/Select/Select -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/TextArea/TextArea -- view=edited appearance=clear,hasDivider=true.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/TextArea/TextArea -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/TextField/TextField -- view=edited appearance=clear,hasDivider=true.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/TextField/TextField -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/TimePicker/TimePicker -- input time.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/TimePicker/TimePicker -- size=xs.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/chromium/TimePicker/TimePicker -- valueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/Autocomplete/Autocomplete -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/Combobox/Combobox -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/DatePicker/DatePicker -- valueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/DatePicker/DatePickerRange -- firstValueEdited, secondaValueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/DateTimePicker/DateTimePicker -- valueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/Range/Range -- firstValueEdited, secondaValueEdited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/Select/Select -- view=edited target=button-like.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/Select/Select -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/TextArea/TextArea -- view=edited appearance=clear,hasDivider=true.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/TextArea/TextArea -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/TextField/TextField -- view=edited appearance=clear,hasDivider=true.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/TextField/TextField -- view=edited.snap.png is excluded by !**/*.png
  • cypress/snapshots/finai/webkit/TimePicker/TimePicker -- valueEdited.snap.png is excluded by !**/*.png
📒 Files selected for processing (53)
  • packages/plasma-new-hope/src/components/DatePicker/DatePicker.component-test.tsx
  • packages/plasma-new-hope/src/components/DatePicker/DatePicker.tokens.ts
  • packages/plasma-new-hope/src/components/DatePicker/DatePickerBase.types.ts
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.styles.ts
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.tsx
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.styles.ts
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.tsx
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.types.ts
  • packages/plasma-new-hope/src/components/DatePicker/hooks/useDatePicker.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.component-test.tsx
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.styles.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.tokens.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.tsx
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.types.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/hooks/useDateTimePicker.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/ui/Input/Input.styles.ts
  • packages/plasma-new-hope/src/components/Range/Range.component-test.tsx
  • packages/plasma-new-hope/src/components/Range/Range.styles.ts
  • packages/plasma-new-hope/src/components/Range/Range.tokens.ts
  • packages/plasma-new-hope/src/components/Range/Range.tsx
  • packages/plasma-new-hope/src/components/Range/Range.types.ts
  • packages/plasma-new-hope/src/components/Range/variations/_view/base.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.component-test.tsx
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.styles.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.tokens.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.tsx
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.types.ts
  • packages/sdds-finai/src/components/Autocomplete/Autocomplete.config.ts
  • packages/sdds-finai/src/components/Combobox/Combobox.config.ts
  • packages/sdds-finai/src/components/DatePicker/DatePicker.config.ts
  • packages/sdds-finai/src/components/DatePicker/DatePicker.stories.tsx
  • packages/sdds-finai/src/components/DatePicker/DatePickerRange.stories.tsx
  • packages/sdds-finai/src/components/DateTimePicker/DateTimePicker.clear.config.ts
  • packages/sdds-finai/src/components/DateTimePicker/DateTimePicker.config.ts
  • packages/sdds-finai/src/components/DateTimePicker/DateTimePicker.stories.tsx
  • packages/sdds-finai/src/components/Range/Range.config.ts
  • packages/sdds-finai/src/components/Range/Range.stories.tsx
  • packages/sdds-finai/src/components/Select/Select.config.ts
  • packages/sdds-finai/src/components/TextArea/TextArea.config.ts
  • packages/sdds-finai/src/components/TextField/TextField.clear.config.ts
  • packages/sdds-finai/src/components/TextField/TextField.config.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.clear.config.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.config.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.stories.tsx
  • utils/plasma-cy-utils/lib/CypressDecorator.d.ts
  • utils/plasma-cy-utils/lib/CypressDecorator.js
  • utils/plasma-cy-utils/src/CypressDecorator.tsx
  • utils/plasma-sb-utils/src/components/DatePicker/meta.ts
  • utils/plasma-sb-utils/src/components/DatePicker/stories.tsx
  • utils/plasma-sb-utils/src/components/DateTimePicker/stories.tsx
  • utils/plasma-sb-utils/src/components/Range/stories.tsx
  • website/sdds-finai-docs/docs/components/TextArea.mdx
  • website/sdds-finai-docs/docs/components/TextField.mdx
✅ Files skipped from review due to trivial changes (6)
  • utils/plasma-cy-utils/lib/CypressDecorator.d.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.stories.tsx
  • website/sdds-finai-docs/docs/components/TextField.mdx
  • packages/sdds-finai/src/components/DatePicker/DatePicker.stories.tsx
  • website/sdds-finai-docs/docs/components/TextArea.mdx
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.styles.ts
🚧 Files skipped from review as they are similar to previous changes (39)
  • packages/sdds-finai/src/components/Range/Range.stories.tsx
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.types.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.styles.ts
  • packages/plasma-new-hope/src/components/Range/Range.types.ts
  • packages/plasma-new-hope/src/components/DatePicker/DatePickerBase.types.ts
  • packages/plasma-new-hope/src/components/Range/Range.styles.ts
  • utils/plasma-sb-utils/src/components/Range/stories.tsx
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.styles.ts
  • packages/sdds-finai/src/components/DatePicker/DatePickerRange.stories.tsx
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.tsx
  • packages/plasma-new-hope/src/components/Range/variations/_view/base.ts
  • packages/sdds-finai/src/components/TextArea/TextArea.config.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.tsx
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.types.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/ui/Input/Input.styles.ts
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.types.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.clear.config.ts
  • packages/sdds-finai/src/components/TimePicker/TimePicker.config.ts
  • utils/plasma-sb-utils/src/components/DateTimePicker/stories.tsx
  • packages/plasma-new-hope/src/components/DatePicker/hooks/useDatePicker.ts
  • packages/sdds-finai/src/components/Range/Range.config.ts
  • packages/sdds-finai/src/components/Autocomplete/Autocomplete.config.ts
  • packages/plasma-new-hope/src/components/TimePicker/TimePicker.tokens.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/hooks/useDateTimePicker.ts
  • packages/sdds-finai/src/components/TextField/TextField.clear.config.ts
  • packages/sdds-finai/src/components/Select/Select.config.ts
  • packages/sdds-finai/src/components/TextField/TextField.config.ts
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.tokens.ts
  • utils/plasma-sb-utils/src/components/DatePicker/meta.ts
  • utils/plasma-sb-utils/src/components/DatePicker/stories.tsx
  • packages/sdds-finai/src/components/DatePicker/DatePicker.config.ts
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.styles.ts
  • packages/plasma-new-hope/src/components/DatePicker/DatePicker.tokens.ts
  • packages/sdds-finai/src/components/DateTimePicker/DateTimePicker.clear.config.ts
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.tsx
  • packages/plasma-new-hope/src/components/DateTimePicker/DateTimePicker.tsx
  • packages/plasma-new-hope/src/components/Range/Range.tokens.ts
  • packages/sdds-finai/src/components/Combobox/Combobox.config.ts
  • packages/plasma-new-hope/src/components/Range/Range.tsx

Comment thread packages/plasma-new-hope/src/components/DatePicker/DatePicker.component-test.tsx Outdated
Comment thread packages/plasma-new-hope/src/components/Range/Range.component-test.tsx Outdated
@Yakutoc

Yakutoc commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

Ждем ок продуктовой команды

cy.matchImageSnapshot();
});

itOnlyEdited('valueEdited', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Обычно мы такие тесты уносим в конечную либу.

@Yakutoc

Yakutoc commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

ок получен от продукта

cy.matchImageSnapshot();
});

itOnlyEdited('valueEdited', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

То же самое. Если только для одной либы, то уносим в конечных пакет

Comment on lines +16 to +17
firstInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },
secondInputView: { options: ['positive', 'negative', 'edited'], control: { type: 'select' } },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Резонно

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants