Skip to content

adds StackingOrder module to project, to manage different layers/stackingContexts in the dom#434

Open
benptc wants to merge 2797 commits intomainfrom
stacking-order
Open

adds StackingOrder module to project, to manage different layers/stackingContexts in the dom#434
benptc wants to merge 2797 commits intomainfrom
stacking-order

Conversation

@benptc
Copy link
Copy Markdown
Contributor

@benptc benptc commented Apr 24, 2023

I didn't manage to finish this up and get to the point where it actually fixes the issue of the drawing app's z-index on Safari, but I've put into place the beginnings of a system to better manage the stacking order of the application.

The stackingOrder creates a number of different layers in the app (background / scene / GUI, with more granularity), and all HTML elements that were added directly to the body are now assigned (and appended, instead) to one of these layers.

By giving each stacking layer a z-index, it establishes a separate stacking context for each layer, so that an element in a lower layer (theoretically) could never render above an element from a higher layer, and vice-versa.

Some more work may be needed to update the CSS for the various elements that are now part of these layers, or eliminate now-redundant/unnecessary CSS for some elements.

Additionally, I still want to move the tools from the GUI element in the SCENE_APP_ICONS_AND_WIDGETS to either the SCENE_APP_BACKGROUND or the GUI_APP_FOREGROUND depending on if they open in fullscreenFull2D mode or not (chat app would go to foreground layer, drawing app would go to background layer). This should fix the issue in safari where the drawing needs to be sandwiched above the scan but below the icons, while the chat app is above everything.

dangond-ptc and others added 30 commits February 28, 2023 09:08
fix addToolAtScreenCenter when you tap on a tool button
…ene nodes are updated through realtime channel using node public data (see updateObjectFromRawPose).
Analytics UI, AnalyticsLenses, and refactoring
…rmance

Performance improvements for history spaghetti generation
Made Analyzer Settings UI less dependent on other UI elements
benptc and others added 22 commits April 21, 2023 11:32
…reenCenter-fix

Updated addToolAtScreenCenter() to work with the new off-center camera system.
Works in conjunction with the new PR in remote-operator-addon
…SC-key-fix

Remote operator fly mode esc key fix
… 3d tool is open; fullscreen2d tools stay in front
Allow clicking on icons while drawing is open
… z-index of full2D when multiple opened in a row
…bug-fix

Fixed iOS add tool when spatial cursor outside of AreaTarget mesh bug
smaller minimized icons; callbacks for full2D toggled; more robust z-index of full2D tools
if a toolId is present in the URL, attempts to open the envelope when it loads
@hobinjk-ptc
Copy link
Copy Markdown
Contributor

I think this is a good start! Taking a look at https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context this feels like a pretty ideal approach

@benptc
Copy link
Copy Markdown
Contributor Author

benptc commented May 25, 2023

I was planning to move the tools' iframes to different parent elements when they open/close to adjust which stacking context they belong to (moving chat to foreground, drawing tool to background, keeping tool icons in the middle). But this has run into an unexpected issue. It seems there is no way to prevent an iframe from reloading when it is appended to a different part of the DOM tree (https://stackoverflow.com/a/39895407). So when I tap on the chat icon, opening it fullscreen, and then move it to the foreground layer, the iframe reloads and it reverts back to its initial icon state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants