Skip to content

feat(plasma-web): Added TabsController in order to use keyboard arrows #687

Merged
merged 2 commits into from
Sep 3, 2021

Conversation

fanisco
Copy link
Contributor

@fanisco fanisco commented Aug 30, 2021

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @sberdevices/plasma-docs@0.1.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
npm install @sberdevices/demo-canvas-app@0.23.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
npm install @sberdevices/plasma-ui@1.46.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
npm install @sberdevices/plasma-web@1.44.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
npm install @sberdevices/extract-sb-docgen-info@0.1.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
npm install @sberdevices/showcase@0.51.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
# or 
yarn add @sberdevices/plasma-docs@0.1.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
yarn add @sberdevices/demo-canvas-app@0.23.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
yarn add @sberdevices/plasma-ui@1.46.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
yarn add @sberdevices/plasma-web@1.44.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
yarn add @sberdevices/extract-sb-docgen-info@0.1.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0
yarn add @sberdevices/showcase@0.51.0-canary.687.5f8b1e9d1c77ab9ade2e51de2ed471ca45a359c9.0

packages/plasma-web/src/components/Tabs/TabsController.tsx Outdated Show resolved Hide resolved

return (
<TabsContext.Provider value={{ refs }}>
<Tabs ref={listRef} stretch={stretch}>
Copy link
Contributor

Choose a reason for hiding this comment

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

Сейчас не совсем непонятно, почему у нас именно 2 компоненты - Tabs и TabsController, когда как у TabsController вроде как та же функциональность, но теперь есть возможность использовать стрелочки. Почему мы оставляем Tabs? И нормально ли, что у них api отличается - у TabsController(появляются items, itemsindex, onIndexChange)?

Copy link
Contributor Author

@fanisco fanisco Sep 1, 2021

Choose a reason for hiding this comment

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

Эти компоненты переименуются v2.0:
Tabs => TabsRoot
TabsController => Tabs

TabsRoot & TabItem будут использоваться для кастомной сборки
Tabs останется "умным" компонентом, с которым не нужно делать лишних настроек

#699

@fanisco fanisco force-pushed the fanisco/feat-tabs-arrows branch 2 times, most recently from 749c51a to 99e3e63 Compare September 1, 2021 08:09
@fanisco fanisco changed the title feat(plasma-web): Added TabsController in order to use keyboard arrows feat(plasma-web): Added TabsController in order to use keyboard arrows Sep 1, 2021
@SberDevices-Eva
Copy link
Collaborator

Demo canvas app deployed!

http://plasma.sberdevices.ru/demo-canvas-app-pr-687/

@SberDevices-Eva
Copy link
Collaborator

1 similar comment
@SberDevices-Eva
Copy link
Collaborator

@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@sberdevices sberdevices deleted a comment from SberDevices-Eva Sep 3, 2021
@fanisco fanisco marked this pull request as ready for review September 3, 2021 10:43
@fanisco fanisco merged commit c591529 into master Sep 3, 2021
@fanisco fanisco deleted the fanisco/feat-tabs-arrows branch September 3, 2021 11:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants