Add splitscreen tools architecture documentation for #107#503
Add splitscreen tools architecture documentation for #107#503
Conversation
|
closes #107 |
|
I'm not sure where you will draw the line, but just make sure things are accurate as you need them to be. Static Review Comments
Critical Issues 🔴None. Major Issues 🟠Issue 1: Dismissal lifecycle is inaccurate —
|
There was a problem hiding this comment.
Pull request overview
Adds a new architecture document describing how “splitscreen tools” are configured and integrated into the TPEN transcription interfaces, including tool modes, lifecycle, and event contracts.
Changes:
- Introduces
SPLITSCREEN_TOOLS_ARCHITECTURE.mdto document tool types (pane/sidebar/drawer/dialog) and their intended behaviors. - Documents tool configuration via
TPEN.activeProject.toolsand the rendering decision tree (custom element vs iframe vs fallback). - Describes activation/dismissal flow and event contracts (
splitscreen-toggle,tools-dismiss,tpen-{tool}-show/hide).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| **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 |
There was a problem hiding this comment.
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.
| **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 | |
| **Visual behavior (planned)**: Fixed-width panel that slides in from the right, non-resizable. | |
| **Current behavior**: Rendered in the same resizable split-pane layout as `"pane"` tools; no slide-in animation or location-specific sizing yet. | |
| **Use cases**: Compact tools, configuration panels, quick reference materials. | |
| **Current implementation**: | |
| - Location identifier: `"sidebar"` | |
| - Shares activation mechanism with pane tools | |
| - Uses the same split-pane layout and resizing behavior as `"pane"` tools | |
| - `location === "sidebar"` is currently a semantic/future-facing flag; dedicated sidebar layout is not yet implemented |
| **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 |
There was a problem hiding this comment.
This “Drawer Tools” section points to components/magnifier-tool/index.js as the current implementation, but the magnifier is implemented as a floating overlay (toggled via the toolbar button) rather than a drawer/tray. The actual drawer-style implementation in this codebase is tpen-page-tool, which opens a .drawer and dispatches drawer-opened/drawer-closed events; consider updating this section accordingly.
| **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 |
| 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) |
There was a problem hiding this comment.
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) |
…/github.com/CenterForDigitalHumanities/TPEN-interfaces into 107-splitscreen-tools-in-core-transcription
No description provided.