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

Add width/height properties to web viewer #6636

Merged
merged 5 commits into from
Jun 26, 2024
Merged

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Jun 25, 2024

What

We now set the web viewer CSS width/height to some default values, which can be modified by the user. Setting them to empty strings is allowed to disable the default values completely, and allow styling the canvas through other means as before.

This is meant as a mitigation for emilk/egui#4699 - by setting the CSS width/height to something, the canvas width/height attributes won't contribute to the display size of the canvas.

Tested in https://github.com/rerun-io/web-viewer-example by manually linking the package

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!

To run all checks from main, comment on the PR with @rerun-bot full-check.

@jprochazk jprochazk added 🕸️ web regarding running the viewer in a browser include in changelog labels Jun 25, 2024
@jprochazk jprochazk marked this pull request as ready for review June 26, 2024 08:03
Copy link
Member

@abey79 abey79 left a comment

Choose a reason for hiding this comment

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

These changes lgtm (though obviously the underlying DOM geopolitics are way above my head)

@jprochazk jprochazk merged commit de17e1e into main Jun 26, 2024
30 checks passed
@jprochazk jprochazk deleted the jan/web-viewer-size branch June 26, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants