-
Notifications
You must be signed in to change notification settings - Fork 20
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-core, plasma-web, plasma-b2c): ModalBase component #774
Conversation
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-774/ |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-774/ |
Component performance testing Result: 🟢 Success Check out report in job artifacts! |
f71ea01
to
3b4f15d
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-774/ |
Component performance testing Result: 🟢 Success Check out report in job artifacts! |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-774/ |
3b4f15d
to
6940969
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-774/ |
Component performance testing Result: 🟢 Success Check out report in job artifacts! |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-774/ |
6940969
to
507f435
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-774/ |
Component performance testing Result: 🟢 Success Check out report in job artifacts! |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-774/ |
507f435
to
63cfdf7
Compare
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-774/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Можно ребебейз то я уже плыву в одинаковых изменениях после radiobox/lcheckobxo/link/...
вот отребейзил, мб надо обновить страницу |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-774/ |
Component performance testing Result: 🔴 Fail Check out report in job artifacts! Top 5 significant rerender changes: |
Component performance testing Result: 🟢 Success Check out report in job artifacts! |
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-774/ |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-774/ |
Component performance testing Result: 🟢 Success Check out report in job artifacts! |
b9b15b3
to
e052d20
Compare
*/ | ||
const getLastModal = (items: ModalInfo[]) => { | ||
const modals = items.filter((item: ModalInfo) => item?.info?.isModal); | ||
const lastModal = modals && (modals[modals.length - 1] as ModalInfo); |
Check warning
Code scanning / Semgrep
Semgrep Finding: gitlab.eslint.detect-object-injection Warning
Theme Builder app deployed! http://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-774/ |
Component performance testing Result: 🟢 Success Check out report in job artifacts! |
Documentation preview deployed! website: http://plasma.sberdevices.ru/pr/pr-774/ |
popupInfo={modalInfo} | ||
overlay={ | ||
<StyledOverlay | ||
transparent={getIdLastModal(popupController.items) !== innerId} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
типа один только оверлей оставляем ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
не очень понял вопрос. Просто теперь еще его можем прокидывать
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а, про транспарент. Да, типо только самый верхний оверлей виден
🚀 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], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected] 🚀 |
1 similar comment
🚀 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], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected], @salutejs/[email protected] 🚀 |
Реализован компонент
ModalBase
, сделанный на основеPopupBase
, который сохраняет все его свойства(исключаяframe
), но также добавляет:withBlur?: boolean
- Нужно ли применять blur для подложки.сloseOnEsc?: boolean
- Закрывать модальное окно при нажатии на ESC(по умолчанию true).сloseOnOverlayClick?: boolean
- Закрывать модальное окно при нажатии вне области модального окна(по умолчанию true).onEscKeyDown?: (event: KeyboardEvent) => void
- Обработчик клика при нажатии на ESC(если не передан, то при нажатии используется onClose).onOverlayClick?: (event: React.MouseEvent<HTMLDivElement>) => void
- Обработчик клика при нажатии вне области модального окна(если не передан, то при нажатии используется onClose).initialFocusRef?: React.RefObject<HTMLElement>
- Первый элемент для фокуса внутри модального окна.focusLaterRef?: React.RefObject<HTMLElement>
- Элемент для фокуса после закрытия модального окна(по умолчанию фокус на последнем перед открытием активном элементе).showCloseButton?: boolean
- Отображать кнопку "закрыть"(по умолчанию true).Также добавлено поле
overlay?: React.ReactNode
дляPopupBase
.🐤 Download canary assets:
📦 Published PR as canary version:
Canary Versions
✨ Test out this PR locally via:
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]
@salutejs/[email protected]
@salutejs/[email protected]
@salutejs/[email protected]
@salutejs/[email protected]
@salutejs/[email protected]
@salutejs/[email protected]
Changelog
🐛 Bug Fix
@salutejs/plasma-b2c
,@salutejs/plasma-core
,@salutejs/plasma-hope
,@salutejs/plasma-web
@salutejs/plasma-new-hope
Authors: 2