Conversation
createViewer() now accepts a title option that sets document.title when provided, and is also injected as the toolbar's heading text (previously hardcoded "COMPAS ThreeJs") via a new toolbarTitleKey/ useToolbarTitle(), following the same provide/inject pattern as toolbarPlacement/openbarPlacement/objectActionsPlacement. The standalone websocket entry point (main.ts) reads the title from a `title` URL query param, matching how ws_host/ws_port are already passed through, so a Python App can set both per instance without any frontend-side wiring. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Interactive demo of createViewer's title option: retyping it recreates the viewer, showing the browser tab title and the toolbar heading (normally hardcoded "COMPAS ThreeJs") both update. Verified in a real browser via Playwright. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
ericgozzi
added this pull request to stack #29
September 21, 2026 13:05
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds support for customizing the viewer's toolbar title and browser tab title via a new
titleoption. The title can now be set when creating a viewer instance, and it will update both the toolbar heading and the browser tab if provided. The changes also include an example HTML file demonstrating this feature and updates to the type definitions and context injection.Customizable Viewer Title:
titleoption toCompasViewerOptions, allowing the browser tab and toolbar heading to be set at viewer creation.createViewerinsrc/library/index.tsto setdocument.titleand provide the title for dependency injection if the option is present. [1] [2]Toolbar Heading Update:
toolbarTitleKeyand auseToolbarTitlecomposable to retrieve the toolbar title, defaulting to "COMPAS ThreeJs". [1] [2]Toolbar.vueto use the injectedtoolbarTitleinstead of the hardcoded heading. [1] [2] [3]Examples and Usage:
examples/embedded_tab_title.htmlto demonstrate live updating of the viewer and tab title using the new option.src/main.tsto use thetitleoption from the query string for standalone viewer demos.Checklist
npm run checkis green (formatting, lint, types, unit tests, both builds).npm run test:browserandnpm run test:packagepass.