Skip to content

PLASMA-8275: add custom quarterNames in Calendar-like - #3198

Merged
TitanKuzmich merged 2 commits into
devfrom
PLASMA-8275
Sep 28, 2026
Merged

TitanKuzmich merged 2 commits into
devfrom
PLASMA-8275

Conversation

@TitanKuzmich

@TitanKuzmich TitanKuzmich commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Core

Calendar, Datepicker, DateTimePicker

  • добавлено свойство для задания пользовательских подписей кварталов

What/why changed

  • добавлено свойство для задания пользовательских подписей кварталов

Summary by CodeRabbit

  • New Features
    • Calendar, DatePicker, and DateTimePicker now support custom quarter labels, with Q1–Q4 as the default. Labels can be localized and are reflected in selected quarter values.
  • Documentation
    • Added examples of custom quarter labels to component documentation.
📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @salutejs/plasma-asdk@0.396.0-canary.3198.36391526963.0
npm install @salutejs/plasma-b2c@1.638.0-canary.3198.36391526963.0
npm install @salutejs/plasma-colors@0.24.0-canary.3198.36391526963.0
npm install @salutejs/plasma-core@1.245.0-canary.3198.36391526963.0
npm install @salutejs/plasma-giga@0.365.0-canary.3198.36391526963.0
npm install @salutejs/plasma-homeds@0.365.0-canary.3198.36391526963.0
npm install @salutejs/plasma-hope@1.392.0-canary.3198.36391526963.0
npm install @salutejs/plasma-icons@1.251.0-canary.3198.36391526963.0
npm install @salutejs/plasma-new-hope@0.382.0-canary.3198.36391526963.0
npm install @salutejs/plasma-tokens@1.156.0-canary.3198.36391526963.0
npm install @salutejs/plasma-tokens-b2b@1.67.0-canary.3198.36391526963.0
npm install @salutejs/plasma-tokens-b2c@0.78.0-canary.3198.36391526963.0
npm install @salutejs/plasma-tokens-core@0.15.0-canary.3198.36391526963.0
npm install @salutejs/plasma-tokens-web@1.82.0-canary.3198.36391526963.0
npm install @salutejs/plasma-typo@0.55.0-canary.3198.36391526963.0
npm install @salutejs/plasma-web@1.640.0-canary.3198.36391526963.0
npm install @salutejs/sdds-bizcom@0.370.0-canary.3198.36391526963.0
npm install @salutejs/sdds-cs@0.374.0-canary.3198.36391526963.0
npm install @salutejs/sdds-dfa@0.368.0-canary.3198.36391526963.0
npm install @salutejs/sdds-finai@0.361.0-canary.3198.36391526963.0
npm install @salutejs/sdds-icons@0.9.0-canary.3198.36391526963.0
npm install @salutejs/sdds-insol@0.365.0-canary.3198.36391526963.0
npm install @salutejs/sdds-insol-next@0.364.0-canary.3198.36391526963.0
npm install @salutejs/sdds-netology@0.369.0-canary.3198.36391526963.0
npm install @salutejs/sdds-os@0.40.0-canary.3198.36391526963.0
npm install @salutejs/sdds-platform-ai@0.369.0-canary.3198.36391526963.0
npm install @salutejs/sdds-sbcom@0.370.0-canary.3198.36391526963.0
npm install @salutejs/sdds-scan@0.368.0-canary.3198.36391526963.0
npm install @salutejs/sdds-serv@0.369.0-canary.3198.36391526963.0
npm install @salutejs/sdds-vc@0.4.0-canary.3198.36391526963.0
npm install @salutejs/core-themes@0.43.0-canary.3198.36391526963.0
npm install @salutejs/plasma-themes@0.65.0-canary.3198.36391526963.0
npm install @salutejs/sdds-themes@0.83.0-canary.3198.36391526963.0
npm install @salutejs/sdds-api-tests@0.27.0-canary.3198.36391526963.0
npm install @salutejs/plasma-cy-utils@0.175.0-canary.3198.36391526963.0
npm install @salutejs/plasma-sb-utils@0.246.0-canary.3198.36391526963.0
npm install @salutejs/plasma-tokens-utils@0.63.0-canary.3198.36391526963.0
# or 
yarn add @salutejs/plasma-asdk@0.396.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-b2c@1.638.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-colors@0.24.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-core@1.245.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-giga@0.365.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-homeds@0.365.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-hope@1.392.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-icons@1.251.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-new-hope@0.382.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-tokens@1.156.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-tokens-b2b@1.67.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-tokens-b2c@0.78.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-tokens-core@0.15.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-tokens-web@1.82.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-typo@0.55.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-web@1.640.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-bizcom@0.370.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-cs@0.374.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-dfa@0.368.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-finai@0.361.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-icons@0.9.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-insol@0.365.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-insol-next@0.364.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-netology@0.369.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-os@0.40.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-platform-ai@0.369.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-sbcom@0.370.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-scan@0.368.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-serv@0.369.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-vc@0.4.0-canary.3198.36391526963.0
yarn add @salutejs/core-themes@0.43.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-themes@0.65.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-themes@0.83.0-canary.3198.36391526963.0
yarn add @salutejs/sdds-api-tests@0.27.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-cy-utils@0.175.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-sb-utils@0.246.0-canary.3198.36391526963.0
yarn add @salutejs/plasma-tokens-utils@0.63.0-canary.3198.36391526963.0

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: e59f07b4-20d1-4908-b002-61e8000d7241

📥 Commits

Reviewing files that changed from the base of the PR and between 840f11f and 8c4f82f.

📒 Files selected for processing (65)
  • packages/plasma-new-hope/src/components/Calendar/Calendar.component-test.tsx
  • packages/plasma-new-hope/src/components/Calendar/Calendar.template-doc.mdx
  • packages/plasma-new-hope/src/components/Calendar/Calendar.types.ts
  • packages/plasma-new-hope/src/components/Calendar/CalendarBase/CalendarBase.tsx
  • packages/plasma-new-hope/src/components/Calendar/CalendarDouble/CalendarDouble.tsx
  • packages/plasma-new-hope/src/components/Calendar/hooks/types.ts
  • packages/plasma-new-hope/src/components/Calendar/hooks/useQuarters.ts
  • packages/plasma-new-hope/src/components/Calendar/ui/CalendarQuarters/CalendarQuarters.tsx
  • packages/plasma-new-hope/src/components/Calendar/ui/CalendarQuarters/CalendarQuarters.types.ts
  • packages/plasma-new-hope/src/components/Calendar/utils/constants.ts
  • packages/plasma-new-hope/src/components/DatePicker/DatePicker.component-test.tsx
  • packages/plasma-new-hope/src/components/DatePicker/DatePicker.template-doc.mdx
  • packages/plasma-new-hope/src/components/DatePicker/DatePickerBase.types.ts
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDate.tsx
  • packages/plasma-new-hope/src/components/DatePicker/RangeDate/RangeDatePopover/RangeDatePopover.tsx
  • packages/plasma-new-hope/src/components/DatePicker/SingleDate/SingleDate.tsx
  • 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.template-doc.mdx
  • 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
  • website/plasma-b2c-docs/docs/components/Calendar.mdx
  • website/plasma-b2c-docs/docs/components/DatePicker.mdx
  • website/plasma-b2c-docs/docs/components/DateTimePicker.mdx
  • website/plasma-giga-docs/docs/components/data-entry/Calendar.mdx
  • website/plasma-giga-docs/docs/components/data-entry/DatePicker.mdx
  • website/plasma-giga-docs/docs/components/data-entry/DateTimePicker.mdx
  • website/plasma-homeds-docs/docs/components/DatePicker.mdx
  • website/plasma-homeds-docs/docs/components/DateTimePicker.mdx
  • website/plasma-web-docs/docs/components/Calendar.mdx
  • website/plasma-web-docs/docs/components/DatePicker.mdx
  • website/plasma-web-docs/docs/components/DateTimePicker.mdx
  • website/sdds-bizcom-docs/docs/components/data-entry/Calendar.mdx
  • website/sdds-bizcom-docs/docs/components/data-entry/DatePicker.mdx
  • website/sdds-bizcom-docs/docs/components/data-entry/DateTimePicker.mdx
  • website/sdds-cs-docs/docs/components/data-entry/Calendar.mdx
  • website/sdds-cs-docs/docs/components/data-entry/DatePicker.mdx
  • website/sdds-dfa-docs/docs/components/Calendar.mdx
  • website/sdds-dfa-docs/docs/components/DatePicker.mdx
  • website/sdds-dfa-docs/docs/components/DateTimePicker.mdx
  • website/sdds-finai-docs/docs/components/data-entry/Calendar.mdx
  • website/sdds-finai-docs/docs/components/data-entry/DatePicker.mdx
  • website/sdds-finai-docs/docs/components/data-entry/DateTimePicker.mdx
  • website/sdds-insol-docs/docs/components/Calendar.mdx
  • website/sdds-insol-docs/docs/components/DatePicker.mdx
  • website/sdds-insol-docs/docs/components/DateTimePicker.mdx
  • website/sdds-insol-next-docs/docs/components/Calendar.mdx
  • website/sdds-insol-next-docs/docs/components/DatePicker.mdx
  • website/sdds-insol-next-docs/docs/components/DateTimePicker.mdx
  • website/sdds-netology-docs/docs/components/data-entry/Calendar.mdx
  • website/sdds-netology-docs/docs/components/data-entry/DatePicker.mdx
  • website/sdds-netology-docs/docs/components/data-entry/DateTimePicker.mdx
  • website/sdds-platform-ai-docs/docs/components/data-entry/Calendar.mdx
  • website/sdds-platform-ai-docs/docs/components/data-entry/DatePicker.mdx
  • website/sdds-platform-ai-docs/docs/components/data-entry/DateTimePicker.mdx
  • website/sdds-sbcom-docs/docs/components/Calendar.mdx
  • website/sdds-sbcom-docs/docs/components/DatePicker.mdx
  • website/sdds-sbcom-docs/docs/components/DateTimePicker.mdx
  • website/sdds-scan-docs/docs/components/data-entry/Calendar.mdx
  • website/sdds-scan-docs/docs/components/data-entry/DatePicker.mdx
  • website/sdds-scan-docs/docs/components/data-entry/DateTimePicker.mdx
  • website/sdds-serv-docs/docs/components/data-entry/Calendar.mdx
  • website/sdds-serv-docs/docs/components/data-entry/DatePicker.mdx
  • website/sdds-serv-docs/docs/components/data-entry/DateTimePicker.mdx

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

Walkthrough

Calendar, DatePicker, DatePickerRange, and DateTimePicker now accept custom names for the four quarters. The change passes those names to quarter views and date-info logic, retains default names when entries are absent, and adds tests and documentation.

Changes

Custom quarter labels in Calendar

Layer / File(s) Summary
Calendar quarter labels
packages/plasma-new-hope/src/components/Calendar/*, website/*-docs/docs/components/**/Calendar.mdx
Calendar props pass quarterNames through single and double calendar views to the quarter hook. The hook maps quarter dates by index, falls back to default names for missing entries, and recomputes when names change. Tests and documentation cover custom labels.
DatePicker quarter labels
packages/plasma-new-hope/src/components/DatePicker/*, website/*-docs/docs/components/**/DatePicker.mdx
DatePicker and DatePickerRange pass quarterNames to their hooks and calendar views. Date-info uses the configured name when available and otherwise uses the default. Tests check displayed labels and the name reported on date commit.
DateTimePicker quarter labels
packages/plasma-new-hope/src/components/DateTimePicker/*, website/*-docs/docs/components/**/DateTimePicker.mdx
DateTimePicker passes quarterNames to its hook and calendar grid. Date-info uses the configured name when available and otherwise uses the default. Tests check displayed labels and the name reported on date commit.

Priority: ➖ Normal

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

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant Caller
  participant DatePicker
  participant useDatePicker
  participant Calendar
  Caller->>DatePicker: quarterNames prop
  DatePicker->>useDatePicker: quarterNames option
  DatePicker->>Calendar: quarterNames prop
  Calendar-->>Caller: quarter labels in calendar view
  useDatePicker-->>Caller: quarter name in date info
Loading

Merge Risk: ⚪ Minimal · up to 8c4f8

Custom quarter labels appear ready to merge after normal checks; no actionable merge-blocking issue is established.

Security Architecture Review

Security architecture risk: 🔵 Low · up to 8c4f8

Custom labels change what applications display and receive in date callbacks. The inspected components retain their date-selection checks, and no new privileged operation was identified. Risk remains low rather than minimal because downstream applications may handle callback labels in ways that could not be assessed here.

Retained concerns
No architecture-level concerns identified.

Security review details

Security Blast Radius

  • inferred — The inspected new input is an application-supplied UI label within the Calendar and picker components. No new service, credential, or privileged operation is evidenced along that path; callback consumers outside the repository are unassessed.

Trust Boundaries and Controls

  • observed — Quarter selection still passes through canSelectDate before the callback. DatePicker's inspected input-change path also returns when disabled or readOnly.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
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.
Title check ✅ Passed The title clearly identifies the issue and the main change: adding custom quarterNames to Calendar-like components.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

Copy link
Copy Markdown
Contributor

Theme Builder app deployed!

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

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Documentation preview deployed!

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

@kenymook

Copy link
Copy Markdown

Ок

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

Ok

@TitanKuzmich
TitanKuzmich added this pull request to the merge queue Sep 28, 2026
Merged via the queue into dev with commit 08e0721 Sep 28, 2026
68 checks passed
@TitanKuzmich
TitanKuzmich deleted the PLASMA-8275 branch September 28, 2026 11:20

This branch was successfully deployed

1 active deployment
internal — 8c4f82fb Deployed Sep 28, 2026 by TitanKuzmich via Authorize external pull request / Approved #11702
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.

5 participants