fluentui icon indicating copy to clipboard operation
fluentui copied to clipboard

All Fluent `Portal` components can share the same mount node

Open ling1726 opened this issue 2 years ago • 6 comments

Appending elements to document.body can potentially trigger style recalcs of all the DOM elements in body. This has observed to be the case with Tabster which moves dummy input elements to the first and last elements of DOM every time a new element is appended.

Investigate whether this is a perf impact on the Portal component and possible implement a feature to mount all Portal components in the same mount node to avoid appending new elements to body

ling1726 avatar Oct 13 '22 06:10 ling1726

Appending elements to document.body can potentially trigger style recalcs of all the DOM elements in body.

Is there a confirmation for this statement?

layershifter avatar Oct 13 '22 07:10 layershifter

Appending elements to document.body can potentially trigger style recalcs of all the DOM elements in body.

Is there a confirmation for this statement?

That's why I said can potentially :) and also there is the keyword investigate 😜

ling1726 avatar Oct 13 '22 07:10 ling1726

V8 has an API to support this because appending to body triggers unacceptably long style recalcs in some apps.

See: https://github.com/microsoft/fluentui/blob/master/packages/react/src/components/Layer/Layer.notification.ts#L119

@dzearing is a good contact for more details.

spmonahan avatar Dec 15 '22 17:12 spmonahan

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

msft-fluent-ui-bot avatar Jun 22 '23 13:06 msft-fluent-ui-bot

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.

Because this issue has not had activity for over 150 days, we're automatically closing it for house-keeping purposes.

Still require assistance? Please, create a new issue with up-to date details.