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-b2c,plasma-web): Button size_xs/xxs #780

Merged
merged 1 commit into from
Sep 28, 2023
Merged

Conversation

Yeti-or
Copy link
Contributor

@Yeti-or Yeti-or commented Sep 28, 2023

Button_size_xs / Button_size_xxs

Добавили два размера кнопки: 'xs', 'xxs'

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

✨ Test out this PR locally via:

npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
npm install @salutejs/[email protected]
# or 
yarn add @salutejs/[email protected]
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]
@salutejs/[email protected]
@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-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
  • @salutejs/plasma-ui
    • feat(plasma-ui): add prop "buttonsDirection" #701 (@Yakutoc)

🐛 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-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-hope, @salutejs/plasma-web
  • @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

@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

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

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@@ -1,11 +1,40 @@
import styled from 'styled-components';
import { ButtonRoot, getButtonSizesMixin, buttonSizes, buttonTypography } from '@salutejs/plasma-core';
import type { ButtonSizeProps, ButtonViewProps } from '@salutejs/plasma-core';
import { bodyXSBold, bodyXXSBold } from '@salutejs/plasma-typo';
Copy link
Collaborator

@neretin-trike neretin-trike Sep 28, 2023

Choose a reason for hiding this comment

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

кажется, что тут пока нельзя использовать новую типографику, т.к. без подключения файла compatible токены не подянутся, и будет как у тебя на снапшоте

Screenshot 2023-09-28 at 16 20 40

то есть тут лучше использовать старые токены

Copy link
Collaborator

Choose a reason for hiding this comment

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

как в файле Button.props.ts

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fuck
но откуда их взять то

Copy link
Contributor Author

Choose a reason for hiding this comment

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

нет токенов для таких размеров ж

Copy link
Collaborator

@neretin-trike neretin-trike Sep 28, 2023

Choose a reason for hiding this comment

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

для xs размера можно использовать миксин caption , а вот для xxs пока хз 🤔

image

Copy link
Collaborator

Choose a reason for hiding this comment

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

в принципе можно underline попробовать. Только нужно будет его добавить в мапу compatible + перебить text-transform
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

слушай я решил долбануть прям as-is

Copy link
Collaborator

Choose a reason for hiding this comment

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

а почему не захотел так сделать?

@Yakutoc Yakutoc self-requested a review September 28, 2023 10:36
@neretin-trike neretin-trike changed the title feat(plasma-b2c,plasma-web): Button size_xs/xss feat(plasma-b2c,plasma-web): Button size_xs/xxs Sep 28, 2023
@Yeti-or Yeti-or force-pushed the yeti-or.button-sizes branch from 2975f21 to c85ae94 Compare September 28, 2023 13:09
contentLeft={(contentType === 'Left' || contentType === 'Text+Left') && <IconPlaceholder />}
contentRight={contentType === 'Text+Right' && <IconPlaceholder />}
contentLeft={
(contentType === 'Left' || contentType === 'Text+Left') && <IconPlaceholder size={iconSize[rest.size]} />

Check warning

Code scanning / Semgrep

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

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.
contentLeft={
(contentType === 'Left' || contentType === 'Text+Left') && <IconPlaceholder size={iconSize[rest.size]} />
}
contentRight={contentType === 'Text+Right' && <IconPlaceholder size={iconSize[rest.size]} />}

Check warning

Code scanning / Semgrep

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

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.
contentLeft={(contentType === 'Left' || contentType === 'Text+Left') && <IconPlaceholder />}
contentRight={contentType === 'Text+Right' && <IconPlaceholder />}
contentLeft={
(contentType === 'Left' || contentType === 'Text+Left') && <IconPlaceholder size={iconSize[rest.size]} />

Check warning

Code scanning / Semgrep

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

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.
contentLeft={
(contentType === 'Left' || contentType === 'Text+Left') && <IconPlaceholder size={iconSize[rest.size]} />
}
contentRight={contentType === 'Text+Right' && <IconPlaceholder size={iconSize[rest.size]} />}

Check warning

Code scanning / Semgrep

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

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.
contentRight={contentType === 'Text+Right' && <IconPlaceholder />}
contentLeft={
(contentType === 'Left' || contentType === 'Text+Left') && (
<IconPlaceholder size={iconSize[rest.size]} />

Check warning

Code scanning / Semgrep

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

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.
<IconPlaceholder size={iconSize[rest.size]} />
)
}
contentRight={contentType === 'Text+Right' && <IconPlaceholder size={iconSize[rest.size]} />}

Check warning

Code scanning / Semgrep

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

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.
@Salute-Eva
Copy link
Contributor

Theme Builder app deployed!

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

@Salute-Eva
Copy link
Contributor

@Salute-Eva
Copy link
Contributor

Component performance testing

Result: 🟢 Success

Check out report in job artifacts!

@Yeti-or Yeti-or added this pull request to the merge queue Sep 28, 2023
@Yeti-or Yeti-or removed this pull request from the merge queue due to a manual request Sep 28, 2023
@Yeti-or Yeti-or added this pull request to the merge queue Sep 28, 2023
Merged via the queue into dev with commit fb73b05 Sep 28, 2023
21 of 22 checks passed
@Yeti-or Yeti-or deleted the yeti-or.button-sizes branch September 28, 2023 14:13
@Salute-Eva
Copy link
Contributor

🚀 This PR is included in version: @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @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