-
Notifications
You must be signed in to change notification settings - Fork 3
Add splitscreen tools architecture documentation for #107 #503
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
base: main
Are you sure you want to change the base?
Changes from all commits
26f8e09
22a5139
31f41ec
67889a4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,250 @@ | ||||||||||||||||||||||||||||||||
| # Splitscreen Tools Architecture | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Issue: #107 | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| This document explains the splitscreen tools system in TPEN transcription interfaces: tool types, lifecycle, event communication, and integration patterns. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## Purpose | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Provide a pluggable system for transcription-adjacent tools that appear alongside the main workspace without disrupting the core workflow. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## Scope | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| In scope: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| 1. Tool types and their visual/behavioral characteristics | ||||||||||||||||||||||||||||||||
| 2. Tool activation and dismissal lifecycle | ||||||||||||||||||||||||||||||||
| 3. Event communication between tools and interface | ||||||||||||||||||||||||||||||||
| 4. Tool configuration via TPEN.activeProject.tools | ||||||||||||||||||||||||||||||||
| 5. Integration points with the transcription interface shell | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Out of scope: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| 1. Individual tool implementation details (covered in component-specific docs) | ||||||||||||||||||||||||||||||||
| 2. Tool authentication/authorization beyond project-level permissions | ||||||||||||||||||||||||||||||||
| 3. Non-transcription interface tool usage patterns | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ## Tool Types | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| The system supports four distinct tool presentation modes: | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ### 1. Split Pane Tools | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Visual behavior**: Appear to the right of the main interface, creating a resizable horizontal division. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Use cases**: Full-featured tools that need substantial space (dictionaries, references, image viewers). | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Current implementation**: | ||||||||||||||||||||||||||||||||
| - Managed by tpen-simple-transcription interface state | ||||||||||||||||||||||||||||||||
| - Activated via splitscreen-toggle event | ||||||||||||||||||||||||||||||||
| - Location identifier: `"pane"` | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **References**: | ||||||||||||||||||||||||||||||||
| - [components/simple-transcription/index.js](../simple-transcription/index.js) (interface orchestration) | ||||||||||||||||||||||||||||||||
| - [components/splitscreen-tool/index.js](../splitscreen-tool/index.js) (tool selector dropdown) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ### 2. Sidebar Tools | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Visual behavior**: Fixed-width panel that slides in from the right, non-resizable. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Use cases**: Compact tools, configuration panels, quick reference materials. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Current implementation**: | ||||||||||||||||||||||||||||||||
| - Location identifier: `"sidebar"` | ||||||||||||||||||||||||||||||||
| - Shares activation mechanism with pane tools | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ### 3. Drawer Tools | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Visual behavior**: Floating tray that slides over content, dismissible without losing context. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Use cases**: Magnifier, inspector, temporary overlays. | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| **Current implementation**: | ||||||||||||||||||||||||||||||||
| - [components/magnifier-tool/index.js](../magnifier-tool/index.js) | ||||||||||||||||||||||||||||||||
| - Activated via specific tool buttons or shortcuts | ||||||||||||||||||||||||||||||||
|
Comment on lines
+58
to
+64
|
||||||||||||||||||||||||||||||||
| **Visual behavior**: Floating tray that slides over content, dismissible without losing context. | |
| **Use cases**: Magnifier, inspector, temporary overlays. | |
| **Current implementation**: | |
| - [components/magnifier-tool/index.js](../magnifier-tool/index.js) | |
| - Activated via specific tool buttons or shortcuts | |
| **Visual behavior**: Content-attached drawer (e.g., from bottom or side) that slides over part of the workspace while keeping the underlying context visible. | |
| **Use cases**: Page-level tools that need temporary, dismissible space without a full split-screen (e.g., navigation aids, page metadata, inline helpers). | |
| **Current implementation**: | |
| - Implemented by `tpen-page-tool`, which opens/closes a `.drawer` element | |
| - Dispatches `drawer-opened` / `drawer-closed` events for coordination with the host interface | |
| - Activated via page-level toolbar controls or equivalent triggers |
Copilot
AI
Mar 12, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magnifier tool isn’t “drawer-style” and, within MagnifierTool, there is no close button (it’s hidden via Escape or by toggling from the workspace toolbar). To avoid misleading implementers, update these bullets to reflect the current magnifier UI/interaction model, and consider listing tpen-page-tool as the drawer tool example instead.
| 3. **tpen-magnifier-tool** - Drawer-style image magnification overlay | |
| - Activated via toolbar button | |
| - Dismissible via Escape key or close button | |
| - Reference: [components/magnifier-tool/index.js](../magnifier-tool/index.js) | |
| 4. **Individual tool implementations** (e.g., tpen-page-tool, tpen-quicktype-tool) | |
| 3. **tpen-magnifier-tool** - Image magnification overlay | |
| - Activated via toolbar button | |
| - Dismissible via Escape key or by toggling the magnifier button in the workspace toolbar | |
| - Reference: [components/magnifier-tool/index.js](../magnifier-tool/index.js) | |
| 4. **Individual tool implementations** (e.g., tpen-page-tool (drawer-style), tpen-quicktype-tool) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The “Sidebar Tools” description says this mode is a fixed-width, sliding, non-resizable panel. In the current interfaces, tools with
location === "sidebar"are still rendered in the same resizable split-pane layout (no slide-in behavior and no location-specific sizing), so this section should be updated to match the actual behavior or explicitly label it as a planned/not-yet-implemented mode.