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 missing props to @rerun-io/web-viewer-react #6893

Closed
jprochazk opened this issue Jul 15, 2024 · 0 comments · Fixed by #6895
Closed

Add missing props to @rerun-io/web-viewer-react #6893

jprochazk opened this issue Jul 15, 2024 · 0 comments · Fixed by #6895

Comments

@jprochazk
Copy link
Member

jprochazk commented Jul 15, 2024

We added new options to the web viewer, but other than a select few (hide_welcome_screen, width, height), there is no way to set them on the React component.

We'd have to update Props to extend WebViewerOptions here:

/**
* @typedef Props
* @property {string | string[]} rrd URL(s) of the `.rrd` file(s) to load.
* Changing this prop will open any new unique URLs as recordings,
* and close any URLs which are not present.
* @property {string} [width] CSS width of the viewer's parent div
* @property {string} [height] CSS height of the viewer's parent div
* @property {boolean} [hide_welcome_screen] Whether to hide the welcome screen. Default is `false`.
*/

And then pass those props into the handle.start in componentDidMount:

this.#handle.start(this.#recordings, current, {
hide_welcome_screen: this.#hide_welcome_screen,
width: "100%",
height: "100%",
});

Whenever the options change, we should restart the viewer, and add some documentation advising users not to change them very often.

@jprochazk jprochazk added this to the Next patch release milestone Jul 15, 2024
@Wumpf Wumpf removed this from the Next patch release milestone Oct 18, 2024
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 a pull request may close this issue.

2 participants