Open Juliakas opened 2 weeks ago
Is this a bug in iTwinUI or in AppUI? If it's in iTwinUI, it'd be helpful to see a minimal repro.
Interaction bug, so I guess both until determined :D
There is a lot of appui logic involved for this, not very feasible to make iTwinUI sandbox - when popping out React state is intact, dom gets reparented instead. I reproduced it in appui storybook at my local build by just putting a spinner in widget with preview popout feature. Didn't figure out permissions to push branch
I just tested that ProgressRadial
works fine when rendering in a popout window.
So the issue is probably in AppUI's reparenting logic. I guess it makes sense that if you're forcing the state to be preserved, it's not going to re-add its internal styles in the new window. We might need to detect if the component is moved to a new window and re-run that logic.
Yeah so on initial render in appui's popout it also works fine. The issue happens when transferring dom, it doesn't copy over shadow dom styles somehow
Describe the bug
When![image](https://github.com/iTwin/appui/assets/36437897/8f59dade-82dd-42dc-bbf7-57afa5772f17)
ProgressRadial
is popped out, it's shadow dom loses it's styling and "Loading" text is being displayed even though it was supposed to be hidden:This doesn't happen when component is rendered initially in new window, only when transition from main to new window is happening and widget dom is being moved.
I reproduced everything on appui storybook (on release/4.15.0 tag) by changing widget content to
ProgressRadial
inReparentPopoutWidgets.tsx
file.To Reproduce
ProgressRadial
spinner.Expected Behavior
Expected for loading text to remain hidden when transitioning.
Screenshots
Desktop (please complete the applicable information)
OS: Windows 11 Browser: Microsoft Edge Browser version: Version 126.0.2592.68 (Official build) (64-bit) Appui version: 4.15.0 (reproduced on source)
Additional context
Would need this fixed before our Modeler's release, our feature freeze is at beggining of next month. At worst we would need a workaround or to opt out of iTwinUI's accessibility shadow dom usage