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

Position and scale the extensions browserview based on renderer content #4330

Merged

Conversation

rak-phillip
Copy link
Contributor

@rak-phillip rak-phillip commented Mar 30, 2023

This positions the extension's browser view by anchoring it to the title element in the main window. I chose to anchor to the title because

  1. It was fairly trivial to get the coordinates of this element
  2. It's persistent across every page

Alternative approaches would be to either locate the top left of the extension by locating he primary nav and the header, or supplying some sort of dummy element to anchor the browser view to. Both of these approaches come with a bit more complexity and are a little less direct than anchoring to the title.

🗒️ Testing Notes

  • Extensions should zoom along with the main window when adjusting zoom levels via ctrl++/ctrl+-/ctrl+0
  • Extensions should zoom along with the main windows when adjusting through the application menu via View => Actual Size/Zoom In/Zoom Out

👓 Considerations

closes #4301

Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
@rak-phillip rak-phillip marked this pull request as draft March 30, 2023 23:43
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
@rak-phillip rak-phillip marked this pull request as ready for review March 31, 2023 19:18
Copy link
Contributor

@ericpromislow ericpromislow left a comment

Choose a reason for hiding this comment

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

Looks ok to me on all three platforms -- the conflict is easy to fix.

I didn't find any concerns.

@rak-phillip rak-phillip merged commit ac9be3b into rancher-sandbox:main Mar 31, 2023
@rak-phillip rak-phillip deleted the feature/4301-rdx-view-position branch March 31, 2023 22:33
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.

Get extension view offset and zoom level from main window
2 participants