-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Isolate treescope renderings to improve performance and duplication-s…
…afety. Includes a number of changes to improve the robustness and performance of treescope output renderings: - Isolates each rendering in the "Shadow DOM", ensuring CSS styles do not conflict between different renderings. - Isolates JS definitions as properties of a custom container element, avoiding conflicts between different output versions. - Adds duplication safety: making two copies of a treescope rendering will correctly render it twice instead of having interference between copies. - Improves performance by adding CSS container content visibility annotations. This change should significantly improve performance and responsiveness of Penzai's visualizations when used in a notebook environment like JupyterLab, which does not apply strong sandboxing between different output cells. PiperOrigin-RevId: 648720934
- Loading branch information
1 parent
c1592fd
commit b97c1c0
Showing
13 changed files
with
550 additions
and
333 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.