-
Notifications
You must be signed in to change notification settings - Fork 279
feat(ui5-popover): implement resizable popover #12623
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
base: main
Are you sure you want to change the base?
Conversation
|
🚀 Deployed on https://pr-12623--ui5-webcomponents-preview.netlify.app |
packages/website/docs/_samples/main/Popover/Resizable/sample.html
Outdated
Show resolved
Hide resolved
packages/website/docs/_samples/main/Popover/Resizable/sample.html
Outdated
Show resolved
Hide resolved
Stoev
left a comment
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.
Looks good from my UA perspective.
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.
packages/main/src/Popover.ts
Outdated
| _width?: string; | ||
| _height?: string; | ||
|
|
||
| _resizeMouseMoveHandler: (e: MouseEvent) => void; |
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.
you may consider moving all those private properties and most of the resize related logic inside a second class, e.g. PopoverResize.ts. It can contain the methods you need, like getResizeHandleClasses, onClose, attachMouseEvents, reset, isResizeHandleClicked and etc.
This will make the Popover.ts easier to read.
Could be separate BLI
alexandar-mitsev
left a comment
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.
(partial review)
- the error for popovers without opener is back
To reproduce - set resizable: true for all popovers at Popover.html test page.
The console has the exception:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'getBoundingClientRect')
at PopoverResize.getResizeHandlePlacement (PopoverResize.ts?t=1766136059469:80:31)
at PopoverResize.setCorrectResizeHandleClass (PopoverResize.ts?t=1766136059469:57:18)
Done |
|
|
||
| const opener = popover.getOpenerHTMLElement(popover.opener); | ||
|
|
||
| if (!opener) { |
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 seems to result in wrong placement of resize handle sometimes. The handle moves to the correct spot only after the user clicks on it. Maybe the position should be re-calculated once more after open, but before the user clicks on it
To reproduce - use Popover.html, first sample in section Dynamic. When you click the three dots and open the popover - the handle is bottom right, but if you drag it it moves to bottom left.

JIRA: BGSOFUIRODOPI-3384
Certain styles for slotted elements in the footer and header are overridden, similar to how it is done in the UI5 dialog.
fixes #8167
fixes #12088