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-new-hope): Added prop 'portal' into Dropdown component #1260

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

shuga2704
Copy link
Contributor

@shuga2704 shuga2704 commented Jun 19, 2024

Dropdown

  • добавлено новое свойство portal

What/why changed

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @salutejs/caldera-online@0.57.0-canary.1260.9777960646.0
npm install @salutejs/plasma-asdk@0.100.0-canary.1260.9777960646.0
npm install @salutejs/plasma-b2c@1.342.0-canary.1260.9777960646.0
npm install @salutejs/plasma-new-hope@0.97.0-canary.1260.9777960646.0
npm install @salutejs/plasma-web@1.343.0-canary.1260.9777960646.0
npm install @salutejs/sdds-serv@0.70.0-canary.1260.9777960646.0
# or 
yarn add @salutejs/caldera-online@0.57.0-canary.1260.9777960646.0
yarn add @salutejs/plasma-asdk@0.100.0-canary.1260.9777960646.0
yarn add @salutejs/plasma-b2c@1.342.0-canary.1260.9777960646.0
yarn add @salutejs/plasma-new-hope@0.97.0-canary.1260.9777960646.0
yarn add @salutejs/plasma-web@1.343.0-canary.1260.9777960646.0
yarn add @salutejs/sdds-serv@0.70.0-canary.1260.9777960646.0

Copy link
Contributor

Theme Builder app deployed!

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

Copy link
Contributor

⚡ Component performance testing

Result: 🟢 OK

/**
* Портал для выпадающего списка. Принимает id контейнера или ref.
*/
portal?: string | React.RefObject<HTMLElement>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

а в итоге на тэг нельзя ссылаться? portal='body' не сработает?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

не, только document

@@ -42,6 +42,7 @@ export const dropdownRoot = (Root: RootProps<HTMLDivElement, DropdownProps>) =>
trigger = 'click',
variant = 'normal',
hasArrow = true,
Copy link
Contributor

Choose a reason for hiding this comment

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

а почему проп просто portal ? почему не hasPortal или там usePortal ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hasPortal - boolean, не то
usePortal - так хук называется
frame - непонятно че за фрейм
portalRef - неплохо, но Popover принимает еще и строку

поэтому я решил оставить просто portal, не вижу в этом проблем

Copy link
Contributor

Choose a reason for hiding this comment

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

А господи я решил что это hasPortal,
типа это свойство на случай если ты хочешь конкретно куда указать, а по умолчанию портал есть ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Что значит по-умолчанию? Если не прокидывать portal - то его и не будет, если прокинуть - то будет.

@Yakutoc Yakutoc requested a review from Yeti-or July 2, 2024 13:49
@Yakutoc
Copy link
Collaborator

Yakutoc commented Jul 2, 2024

@shuga2704 В документации это свойство должно быть зафиксировано?

Verified

This commit was signed with the committer’s verified signature.
mislav Mislav Marohnić
Copy link
Contributor

github-actions bot commented Jul 3, 2024

⚡ Component performance testing

Result: 🟢 OK

@shuga2704 shuga2704 added this pull request to the merge queue Jul 3, 2024
Merged via the queue into dev with commit acc2f13 Jul 3, 2024
29 checks passed
@shuga2704 shuga2704 deleted the plasma-3056 branch July 3, 2024 14:40
This was referenced Jul 24, 2024
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