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 rerun-web canvas size #6511

Merged
merged 1 commit into from
Jun 6, 2024
Merged

Fix rerun-web canvas size #6511

merged 1 commit into from
Jun 6, 2024

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented Jun 6, 2024

What

The canvas size was the default of 300x150 because we didn't update the CSS in index.html after

Closes

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 6, 2024
Copy link
Member

@jleibs jleibs left a comment

Choose a reason for hiding this comment

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

This looks much simpler. However, I don't have any context on the historical reasons for the previous complexity, which always makes me a bit nervous.

@emilk
Copy link
Member

emilk commented Jun 6, 2024

I don't have any context on the historical reasons for the previous complexity, which always makes me a bit nervous.

Context: the old CSS was me copy-pasting things that I don't understand

@jprochazk jprochazk merged commit 4470162 into main Jun 6, 2024
32 of 33 checks passed
@jprochazk jprochazk deleted the jan/fix-web-viewer-size branch June 6, 2024 12:13
@jprochazk
Copy link
Member Author

However, I don't have any context on the historical reasons for the previous complexity, which always makes me a bit nervous.

I believe the original CSS here was taken from the egui demo app, or its predecessor. All it did was move the canvas into place, and then some code in eframe took care of resizing the canvas to the equivalent of width: 100%; height: 100%. That code in eframe is gone now, so that the size of the canvas can be controlled fully through CSS like is being done in this PR.

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.

3 participants