Skip to content
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

Fix Overlay sizing #543

Merged
merged 8 commits into from
Jul 12, 2022
Merged

Fix Overlay sizing #543

merged 8 commits into from
Jul 12, 2022

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Jun 9, 2022

We need to make the overlay a child of the app root, so that it can size relative to it. Took the opportunity to remove a few hacks from the RenderPanel related to its communication with the canvas

Screen.Recording.2022-06-09.at.18.45.57.mov

@render
Copy link

render bot commented Jun 9, 2022

@oliviertassinari oliviertassinari temporarily deployed to fix-overlay-sizing - toolpad-db PR #543 June 9, 2022 16:50 — with Render Destroyed
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 6, 2022
@render
Copy link

render bot commented Jul 11, 2022

@oliviertassinari oliviertassinari requested a deployment to fix-overlay-sizing - toolpad-db PR #543 July 11, 2022 09:04 — with Render Abandoned
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 11, 2022
Copy link
Member

@apedroferreira apedroferreira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great job, thanks for this, we definitely should make the RenderPanel file much lighter and this helps a lot :D
doesn't seem like anything should conflict with my work!

const [editorOverlayRoot, setEditorOverlayRoot] = React.useState<HTMLElement | null>(null);
const [appRoot, setAppRoot] = React.useState<HTMLElement | null>(null);

React.useImperativeHandle(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one, seems like a good idea to have moved these to the ref, as they have to do with the app root more than the render panel

@Janpot Janpot merged commit 93e98f0 into master Jul 12, 2022
@Janpot Janpot deleted the fix-overlay-sizing branch July 12, 2022 12:52
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.

3 participants