-
Notifications
You must be signed in to change notification settings - Fork 39
fix(popover): positioning and dev-example updates (UIM-447) #467
fix(popover): positioning and dev-example updates (UIM-447) #467
Conversation
Preview docs changes for f9ddd6c at https://positive-js.github.io/mosaic-previews/pr467-f9ddd6c/ |
Preview docs changes for 9c90f87 at https://positive-js.github.io/mosaic-previews/pr467-9c90f87/ |
@@ -440,6 +455,10 @@ export class McPopover implements OnInit, OnDestroy { | |||
|
|||
private manualListeners = new Map<string, EventListenerOrEventListenerObject>(); | |||
private readonly destroyed = new Subject<void>(); | |||
// @ts-ignore | |||
private readonly resizeObserver = new ResizeObserver(() => { |
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.
I think that you should't use ResizeObserver, will better if you use window resize event, also you should use _ngZone.runOutsideAngular
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.
I do not see any possibility to watch\observe popover size dynamic changes (content size changed) without monitoring it via ResizeObserver, otherwise I do not get an idea on how we should determine if the window:resize
event should be fired on our side manually.
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.
I do not see any possibility to watch\observe popover size dynamic changes (content size changed) without monitoring it via ResizeObserver.
For most cases, it will be sufficient to use the window resize event.
In other cases, user must trigger window resize event manually.
For example you can see https://github.com/angular/components/blob/e7c7dce13a5a77ca66a92650b79199da697d0734/src/material-experimental/mdc-slider/slider.ts#L262
Please NOTE: new attribute for directive added mcPopoverPlacementPriority |
Preview docs changes for 93a7d35 at https://positive-js.github.io/mosaic-previews/pr467-93a7d35/ |
Preview docs changes for 22d4ef0 at https://positive-js.github.io/mosaic-previews/pr467-22d4ef0/ |
Preview docs changes for 23ba8e2 at https://positive-js.github.io/mosaic-previews/pr467-23ba8e2/ |
Preview docs changes for 17984fb at https://positive-js.github.io/mosaic-previews/pr467-17984fb/ |
Preview docs changes for e2ae08e at https://positive-js.github.io/mosaic-previews/pr467-e2ae08e/ |
Preview docs changes for 55c07f2 at https://positive-js.github.io/mosaic-previews/pr467-55c07f2/ |
Preview docs changes for 6102c44 at https://positive-js.github.io/mosaic-previews/pr467-6102c44/ |
Preview docs changes for 496df01 at https://positive-js.github.io/mosaic-previews/pr467-496df01/ |
Preview docs changes for bbba73a at https://positive-js.github.io/mosaic-previews/pr467-bbba73a/ |
Preview docs changes for 844ee1c at https://positive-js.github.io/mosaic-previews/pr467-844ee1c/ |
Preview docs changes for c25f232 at https://positive-js.github.io/mosaic-previews/pr467-c25f232/ |
Preview docs changes for de5e993 at https://positive-js.github.io/mosaic-previews/pr467-de5e993/ |
Kudos, SonarCloud Quality Gate passed! 0 Bugs |
@fost please take a look.
Dev example updated.
Add ResizeObserver for monitoring of content resize.