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

Web code duplication #2156

Closed
emilk opened this issue May 16, 2023 · 0 comments · Fixed by #4720
Closed

Web code duplication #2156

emilk opened this issue May 16, 2023 · 0 comments · Fixed by #4720
Labels
🧑‍💻 dev experience developer experience (excluding CI) 🕸️ web regarding running the viewer in a browser

Comments

@emilk
Copy link
Member

emilk commented May 16, 2023

Our HTML and JavaScript code for setting up the web-viewer is currently duplicated across four files:

❯ rg wasm_bindgen.WebHandle
scripts/demo_assets/static/index.js
41:  let handle = new wasm_bindgen.WebHandle();

web_viewer/index_bundled.html
186:            let handle = new wasm_bindgen.WebHandle();

web_viewer/index.html
189:            let handle = new wasm_bindgen.WebHandle();

this makes it tedious and error prone to work to update. It's not a lot of code though, so perhaps it's fine for now.

@emilk emilk added 🕸️ web regarding running the viewer in a browser 🧑‍💻 dev experience developer experience (excluding CI) labels May 16, 2023
jprochazk added a commit that referenced this issue Jan 8, 2024
### What

It turns out this was already mostly done. The only change needed was
removing the analytics script and adding it via JS when we are served on
`app.rerun.io`.

Fixes #2156
Fixes #2428

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4720/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4720/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4720/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4720)
- [Docs
preview](https://rerun.io/preview/9d10741f8a8a21de05f24fca7f82ebb130d2d063/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/9d10741f8a8a21de05f24fca7f82ebb130d2d063/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
jprochazk added a commit that referenced this issue Jan 9, 2024
### What

It turns out this was already mostly done. The only change needed was
removing the analytics script and adding it via JS when we are served on
`app.rerun.io`.

Fixes #2156
Fixes #2428

### Checklist
* [x] I have read and agree to [Contributor
Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and
the [Code of
Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md)
* [x] I've included a screenshot or gif (if applicable)
* [x] I have tested the web demo (if applicable):
* Using newly built examples:
[app.rerun.io](https://app.rerun.io/pr/4720/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/4720/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json)
* Using full set of examples from `nightly` build:
[app.rerun.io](https://app.rerun.io/pr/4720/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json)
* [x] The PR title and labels are set such as to maximize their
usefulness for the next release's CHANGELOG

- [PR Build Summary](https://build.rerun.io/pr/4720)
- [Docs
preview](https://rerun.io/preview/9d10741f8a8a21de05f24fca7f82ebb130d2d063/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/9d10741f8a8a21de05f24fca7f82ebb130d2d063/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🧑‍💻 dev experience developer experience (excluding CI) 🕸️ web regarding running the viewer in a browser
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant