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

Allow overriding app blueprint from web #6419

Merged
merged 19 commits into from
May 27, 2024
Merged

Conversation

jprochazk
Copy link
Member

@jprochazk jprochazk commented May 23, 2024

What

This adds a PanelStateOverride to the AppBlueprint which can be set via JS.

Also adds ToggleTopPannel UI command

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 🟦 blueprint The data that defines our UI include in changelog labels May 23, 2024
@jprochazk jprochazk marked this pull request as ready for review May 23, 2024 13:17
@emilk emilk self-requested a review May 24, 2024 13:40
Copy link
Member

@emilk emilk left a comment

Choose a reason for hiding this comment

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

Very nice, but I think we should support toggling panels even after they have been overriden.

crates/re_viewer/src/app.rs Outdated Show resolved Hide resolved
crates/re_viewer/src/app_blueprint.rs Outdated Show resolved Hide resolved
@jprochazk
Copy link
Member Author

I added a toggle for the panel overrides, exposed through a UI command and a JS function (toggle_panel_overrides)

@@ -380,6 +380,8 @@
if (window.location !== window.parent.location) {
window.parent.postMessage("READY", "*");
}

window._handle = handle;
Copy link
Member Author

Choose a reason for hiding this comment

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

When serving the web viewer locally this ends up being quite useful to test the "raw API" of the WebHandle

@jprochazk jprochazk merged commit b31ed0a into main May 27, 2024
34 checks passed
@jprochazk jprochazk deleted the jan/app-blueprint-controls branch May 27, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🟦 blueprint The data that defines our UI 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