Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(plasma-ui): add labels for time pickers #749

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

Yakutoc
Copy link
Collaborator

@Yakutoc Yakutoc commented Sep 22, 2023

Release Notes

Добавлены label для компонента TimePicker.

What/why Changed

Что бы было понятно с чем пользователь имеет дело было решено добавить label.

Стало

Screenshot 2023-09-27 at 19 46 27 Screenshot 2023-09-27 at 19 46 34
🐤 Download canary assets:
borderRadius
borderRadius_default_react-native--canary.749.6340893068.ts
borderRadius_plasma_b2c_react-native--canary.749.6340893068.ts
borderRadius_plasma_web_react-native--canary.749.6340893068.ts
borderRadius_sberHealth_react-native--canary.749.6340893068.ts
borderRadius_sbermarket_business_react-native--canary.749.6340893068.ts
borderRadius_sbermarket_metro_react-native--canary.749.6340893068.ts
borderRadius_sbermarket_react-native--canary.749.6340893068.ts
borderRadius_sbermarket_selgros_react-native--canary.749.6340893068.ts
borderRadius_sbermarket_wlbusiness_react-native--canary.749.6340893068.ts
borderRadius_sberonline_react-native--canary.749.6340893068.ts
borderRadius_sberprime_react-native--canary.749.6340893068.ts
borderRadius_stylesSalute_react-native--canary.749.6340893068.ts
color
color_default_ios-swift--canary.749.6340893068.swift
color_default_kotlin--canary.749.6340893068.kt
color_default_react-native--canary.749.6340893068.ts
color_default_xml--canary.749.6340893068.xml
color_plasma_b2c_ios-swift--canary.749.6340893068.swift
color_plasma_b2c_kotlin--canary.749.6340893068.kt
color_plasma_b2c_react-native--canary.749.6340893068.ts
color_plasma_b2c_xml--canary.749.6340893068.xml
color_plasma_web_ios-swift--canary.749.6340893068.swift
color_plasma_web_kotlin--canary.749.6340893068.kt
color_plasma_web_react-native--canary.749.6340893068.ts
color_plasma_web_xml--canary.749.6340893068.xml
color_sberHealth_ios-swift--canary.749.6340893068.swift
color_sberHealth_kotlin--canary.749.6340893068.kt
color_sberHealth_react-native--canary.749.6340893068.ts
color_sberHealth_xml--canary.749.6340893068.xml
color_sbermarket_business_ios-swift--canary.749.6340893068.swift
color_sbermarket_business_kotlin--canary.749.6340893068.kt
color_sbermarket_business_react-native--canary.749.6340893068.ts
color_sbermarket_business_xml--canary.749.6340893068.xml
color_sbermarket_ios-swift--canary.749.6340893068.swift
color_sbermarket_kotlin--canary.749.6340893068.kt
color_sbermarket_metro_ios-swift--canary.749.6340893068.swift
color_sbermarket_metro_kotlin--canary.749.6340893068.kt
color_sbermarket_metro_react-native--canary.749.6340893068.ts
color_sbermarket_metro_xml--canary.749.6340893068.xml
color_sbermarket_react-native--canary.749.6340893068.ts
color_sbermarket_selgros_ios-swift--canary.749.6340893068.swift
color_sbermarket_selgros_kotlin--canary.749.6340893068.kt
color_sbermarket_selgros_react-native--canary.749.6340893068.ts
color_sbermarket_selgros_xml--canary.749.6340893068.xml
color_sbermarket_wlbusiness_ios-swift--canary.749.6340893068.swift
color_sbermarket_wlbusiness_kotlin--canary.749.6340893068.kt
color_sbermarket_wlbusiness_react-native--canary.749.6340893068.ts
color_sbermarket_wlbusiness_xml--canary.749.6340893068.xml
color_sbermarket_xml--canary.749.6340893068.xml
color_sberonline_ios-swift--canary.749.6340893068.swift
color_sberonline_kotlin--canary.749.6340893068.kt
color_sberonline_react-native--canary.749.6340893068.ts
color_sberonline_xml--canary.749.6340893068.xml
color_sberprime_ios-swift--canary.749.6340893068.swift
color_sberprime_kotlin--canary.749.6340893068.kt
color_sberprime_react-native--canary.749.6340893068.ts
color_sberprime_xml--canary.749.6340893068.xml
color_stylesSalute_ios-swift--canary.749.6340893068.swift
color_stylesSalute_kotlin--canary.749.6340893068.kt
color_stylesSalute_react-native--canary.749.6340893068.ts
color_stylesSalute_xml--canary.749.6340893068.xml
shadow
shadow_default_react-native--canary.749.6340893068.ts
shadow_plasma_b2c_react-native--canary.749.6340893068.ts
shadow_plasma_web_react-native--canary.749.6340893068.ts
shadow_sberHealth_react-native--canary.749.6340893068.ts
shadow_sbermarket_business_react-native--canary.749.6340893068.ts
shadow_sbermarket_metro_react-native--canary.749.6340893068.ts
shadow_sbermarket_react-native--canary.749.6340893068.ts
shadow_sbermarket_selgros_react-native--canary.749.6340893068.ts
shadow_sbermarket_wlbusiness_react-native--canary.749.6340893068.ts
shadow_sberonline_react-native--canary.749.6340893068.ts
shadow_sberprime_react-native--canary.749.6340893068.ts
shadow_stylesSalute_react-native--canary.749.6340893068.ts
spacing
spacing_default_react-native--canary.749.6340893068.ts
spacing_plasma_b2c_react-native--canary.749.6340893068.ts
spacing_plasma_web_react-native--canary.749.6340893068.ts
spacing_sberHealth_react-native--canary.749.6340893068.ts
spacing_sbermarket_business_react-native--canary.749.6340893068.ts
spacing_sbermarket_metro_react-native--canary.749.6340893068.ts
spacing_sbermarket_react-native--canary.749.6340893068.ts
spacing_sbermarket_selgros_react-native--canary.749.6340893068.ts
spacing_sbermarket_wlbusiness_react-native--canary.749.6340893068.ts
spacing_sberonline_react-native--canary.749.6340893068.ts
spacing_sberprime_react-native--canary.749.6340893068.ts
spacing_stylesSalute_react-native--canary.749.6340893068.ts
typo
typo_mage_ios-swift--canary.749.6340893068.swift
typo_mage_kotlin--canary.749.6340893068.kt
typo_mage_react-native--canary.749.6340893068.ts
typo_plasma_ios-swift--canary.749.6340893068.swift
typo_plasma_kotlin--canary.749.6340893068.kt
typo_plasma_react-native--canary.749.6340893068.ts
typo_ruler_ios-swift--canary.749.6340893068.swift
typo_ruler_kotlin--canary.749.6340893068.kt
typo_ruler_react-native--canary.749.6340893068.ts
typo_sage_ios-swift--canary.749.6340893068.swift
typo_sage_kotlin--canary.749.6340893068.kt
typo_sage_react-native--canary.749.6340893068.ts
typo_sbermarket_ios-swift--canary.749.6340893068.swift
typo_sbermarket_kotlin--canary.749.6340893068.kt
typo_sbermarket_react-native--canary.749.6340893068.ts
typo_soulmate_ios-swift--canary.749.6340893068.swift
typo_soulmate_kotlin--canary.749.6340893068.kt
typo_soulmate_react-native--canary.749.6340893068.ts
📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
# or 
yarn add @salutejs/[email protected]
yarn add @salutejs/[email protected]

Version

Published prerelease version: @salutejs/[email protected]
@salutejs/[email protected]
@salutejs/[email protected]
@salutejs/[email protected]

Changelog

Release Notes

plasma-web: Pass ref to DropdownItem (#769)

Добавлена возможность использовать свойство ref для компонента DropdownItem


plasma-infra: Update version (#770)

Выключили sync package-lock's файлов для приватных пакетов.

What/why Changed

При попытке установить приватный пакет, получаем ошибку 404 - Not found.

Поэтому принято решение не запускать npm i --package-lock-only для приватнных пакетов.

Добавлен флаг --legacy-peer-deps что бы исключить ошибки:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: @salutejs/[email protected]
npm ERR! Found: @salutejs/[email protected]
npm ERR! node_modules/@salutejs/plasma-icons
npm ERR!   @salutejs/plasma-icons@"1.162.0-dev.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @salutejs/plasma-icons@"^1.0.0" from @salutejs/[email protected]
npm ERR! node_modules/@salutejs/plasma-b2c
npm ERR!   @salutejs/plasma-b2c@"1.228.0-dev.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

plasma-infra: Update private packages version with @auto-it (#734)

Включили обновление версий для всех пакетов, включая приватные.

What/why Changed

Сделали патчи для @auto-it/core и @auto-it/npm что бы можно было включить в обработку все пакеты.

Как оказалось в @auto-it/core в методе getLernaPackages(packages/core/src/utils/get-lerna-packages.ts) была логика фильтрующая пакеты по полю private:

   if (version !== "MISSING" && isPrivate !== "PRIVATE") {
      packages.push({ path: packagePath, name, version });
    }

C помощью patch-package сделал патчи для изменения этой логики.

В этом commit из песочнице можно посмотреть как это работает.

Запуск локально проекта auto next --dry-run (Report what command will do but do not actually do anything)

при изменениях в пакете plasma-web:

Так же откатили/удалили все что было связанно с ручным обновлением версий в приватных пакетах.



🚀 Enhancement

  • feat(plasma-web/b2c/new-hope): Add Link component with new design and core #696 (@neretin-trike)
  • feat(plasma-theme-builder): Update building tokens for new tokens value #729 (@neretin-trike)
  • feat(plasma-*): Add support linked tokens from color palette #729 (@neretin-trike)
  • @salutejs/plasma-ui
    • feat(plasma-ui): add labels for time pickers #749 (@Yakutoc)
    • feat(plasma-ui): add prop "buttonsDirection" #701 (@Yakutoc)
  • @salutejs/plasma-hope
  • @salutejs/plasma-web
    • feat(plasma-web/b2c/new-hope): Add Radiobox component with new design and core #775 (@neretin-trike)
    • feat(plasma-web): Replace Checkbox from plasma-new-hope and update snapshots #754 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Spinner component with new design and core #736 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Link component with new design and core #696 (@neretin-trike)
  • @salutejs/plasma-b2c
    • feat(plasma-web/b2c/new-hope): Add Radiobox component with new design and core #775 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Checkbox component with new design and core #754 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Spinner component with new design and core #736 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Link component with new design and core #696 (@neretin-trike)
  • @salutejs/plasma-new-hope
    • feat(plasma-web/b2c/new-hope): Add Radiobox component with new design and core #775 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Checkbox component with new design and core #754 (@neretin-trike)
    • fix(plasma-new-hope): Update hover and active colors for tertiary and paragraph tokens in themes #736 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Spinner component with new design and core #736 (@neretin-trike)
    • feat(plasma-web/b2c/new-hope): Add Link component with new design and core #696 (@neretin-trike)
    • feat(plasma-new-hope): 🚀 boostrap && init #691 (@Yeti-or)
  • @salutejs/plasma-core, @salutejs/plasma-new-hope
    • feat(plasma-web/b2c/new-hope): Add Spinner component with new design and core #736 (@neretin-trike)
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-icons, @salutejs/plasma-temple, @salutejs/plasma-ui, @salutejs/plasma-web, @salutejs/plasma-sb-utils
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-web
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-web
  • @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-web
  • @salutejs/plasma-tokens
  • @salutejs/plasma-tokens-utils
  • @salutejs/plasma-tokens, @salutejs/plasma-tokens-utils

🐛 Bug Fix

  • docs: update import deprecated darkSber #772 (@azeek21)
  • ci: enable semgrep workflow #738 (@Yakutoc)
  • plasma-infra: Update version #770 (@Yakutoc)
  • chore: up perftool #730 (@akhdrv)
  • ci: new endpoint for perftool-send-report #730 (@akhdrv)
  • chore: update package-locks (@Salute-Eva)
  • ci("PR Documentation and Storybook"): delete "HAS_PLASMA_WEBSITE" flag #734 (@Yakutoc)
  • plasma-infra: Update private packages version with @auto-it #734 (@Yakutoc)
  • chore(github): add pull request template #685 (@Yakutoc)
  • ci: fix website main-page in pr #700 (@kayman233)
  • @salutejs/plasma-b2c, @salutejs/plasma-hope, @salutejs/plasma-web
    • feat(plasma-b2c,plasma-web): Button size_xs/xss #780 (@Yeti-or)
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-web
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-web
  • @salutejs/plasma-core, @salutejs/plasma-hope
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-icons, @salutejs/plasma-temple, @salutejs/plasma-ui, @salutejs/plasma-web, @salutejs/plasma-sb-utils
  • @salutejs/plasma-core
    • fix(plasma-ui,plasma-web,plasma-b2c): Button Spinner checked color #748 (@Yeti-or)

⚠️ Pushed to dev

  • Update versions (@Salute-Eva)
  • @salutejs/plasma-b2c, @salutejs/plasma-hope, @salutejs/plasma-web
  • @salutejs/plasma-b2c, @salutejs/plasma-hope, @salutejs/plasma-new-hope, @salutejs/plasma-web
  • @salutejs/plasma-b2c, @salutejs/plasma-new-hope, @salutejs/plasma-web
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-icons, @salutejs/plasma-new-hope, @salutejs/plasma-temple, @salutejs/plasma-ui, @salutejs/plasma-web, @salutejs/plasma-sb-utils
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-icons, @salutejs/plasma-temple, @salutejs/plasma-ui, @salutejs/plasma-web, @salutejs/plasma-sb-utils
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-icons, @salutejs/plasma-temple, @salutejs/plasma-tokens-b2b, @salutejs/plasma-tokens-b2c, @salutejs/plasma-tokens-web, @salutejs/plasma-tokens, @salutejs/plasma-ui, @salutejs/plasma-web, @salutejs/plasma-cy-utils, @salutejs/plasma-sb-utils, @salutejs/plasma-tokens-utils
  • @salutejs/plasma-b2c, @salutejs/plasma-core, @salutejs/plasma-hope, @salutejs/plasma-icons, @salutejs/plasma-temple, @salutejs/plasma-tokens-web, @salutejs/plasma-ui, @salutejs/plasma-web, @salutejs/plasma-sb-utils, @salutejs/plasma-tokens-utils
  • @salutejs/plasma-new-hope
  • @salutejs/plasma-temple, @salutejs/plasma-ui

Authors: 7

@Yakutoc Yakutoc self-assigned this Sep 22, 2023
@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-749/

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@Yakutoc Yakutoc force-pushed the feat-ui-picker-labels branch from 1f178f4 to 5e83e5c Compare September 27, 2023 09:46
@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-749/

@Salute-Eva
Copy link
Contributor

color: ${whiteTertiary};
${footnote1};
font-weight: normal;
font-size: ${({ size = DEFAULT_PICKER_SIZE }) => labelFontSize[size]};

Check warning

Code scanning / Semgrep

Semgrep Finding: gitlab.eslint.detect-object-injection

Bracket object notation with user input is present, this might allow an attacker to access all properties of the object and even it's prototype, leading to possible code execution.
Copy link
Contributor

Choose a reason for hiding this comment

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

кажется это не кореектно в этом месте

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Yeti-or Ты про то что он кинул алерт?

Copy link
Contributor

Choose a reason for hiding this comment

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

ну либо я не понял идею, типа можно заполютить object если в size прописать что-то не то
но это точно нам надо править?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@Yeti-or

Нам точно править не нужно. Скорее нужно скорректировать правила.

Copy link
Contributor

Choose a reason for hiding this comment

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

А ты понял где прочитать пример эксплоита?

Copy link
Collaborator Author

@Yakutoc Yakutoc Sep 28, 2023

Choose a reason for hiding this comment

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

@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-749/

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@Yakutoc Yakutoc force-pushed the feat-ui-picker-labels branch from d029f9f to 20b6374 Compare September 27, 2023 12:41
@Yakutoc Yakutoc changed the title feat(plasma-ui): add labels for time pickers [WIP] feat(plasma-ui): add labels for time pickers Sep 27, 2023
@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-749/

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@Yakutoc Yakutoc marked this pull request as ready for review September 27, 2023 13:09
color: ${whiteTertiary};
${footnote1};
font-weight: normal;
font-size: ${({ size = DEFAULT_PICKER_SIZE }) => labelFontSize[size]};
Copy link
Contributor

Choose a reason for hiding this comment

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

кажется это не кореектно в этом месте

packages/plasma-ui/src/components/Pickers/TimePicker.tsx Outdated Show resolved Hide resolved
@Yakutoc Yakutoc force-pushed the feat-ui-picker-labels branch from 20b6374 to 21c7e32 Compare September 28, 2023 08:38
@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-749/

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@Yakutoc Yakutoc force-pushed the feat-ui-picker-labels branch from 21c7e32 to c6cf110 Compare September 28, 2023 09:47
@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-749/

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@Yakutoc Yakutoc force-pushed the feat-ui-picker-labels branch from c6cf110 to 4ce30bd Compare September 28, 2023 15:16
@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-749/

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@Yakutoc Yakutoc merged commit 9c18c45 into dev Sep 29, 2023
@Yakutoc Yakutoc deleted the feat-ui-picker-labels branch September 29, 2023 01:42
@Salute-Eva
Copy link
Contributor

🚀 This PR is included in version: @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected] 🚀

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.

5 participants