alpha
Login
or
Join now
eagraf.dev
/
textile
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
A local-first note taking app
Star
0
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
textile
/
src
/
workspaces
/
tiling
/
at
main
11 files
Ethan Graf
Add Edit/View mode toggle with per-tab state and link navigation
1d ago
561eaa9b
TileStartView.tsx
Add Edit/View mode toggle with per-tab state and link navigation Introduce a distinct read-only "view" rendering mode alongside the existing live-preview "edit" mode, toggled per-tab from a segmented control in the bottom bar. Rendering: view mode is expressed as "the cursor is nowhere" — the four cursor-proximity helpers in livePreview/context.ts short-circuit when the new editorModeFacet is 'view', so every element hides its syntax and stays rendered with no per-builder change. The editor drives the facet (plus EditorState.readOnly) through a runtime-reconfigured compartment, so toggling preserves cursor/scroll/history. State: mode lives on each TileTab so it rides along on drag/move and persists per tab (layout VERSION 2, reads v1). The toggle reads/writes the active tab's mode via the tiling workspace's tab-state hook. Links: in view mode a plain click opens a link (edit mode keeps cmd/ctrl-click); external URLs open in the browser, internal targets resolve against the current document and open in the same tile. Links show a pointer cursor in view mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 day ago
TileTabStrip.css
Tabs per tile (phase 5b): drag-and-drop tabs + drop-zone splits Drag tab chips to reorder, move between tiles, or split. - tabsModel.moveTab: reorder within / move across tiles (pure + tested); creates the destination tile if absent and reports sourceEmptied. - tabDnd: shared drag payload + computeDropZone (5 zones; pure + tested). - model.splitLeaf gains `before` so a drop on a left/top edge puts the new tile first. - tiling.tsx: TilingTile shows a translucent zone overlay (raised via a capture overlay so the editor can't swallow drag events); dropping on an edge splits the tile and moves the tab; center moves it in. - TileTabStrip: draggable chips with an insertion marker, cleared on dragleave/dragend; an independent off-screen clone is used as the drag image so the clipped live chip can't corrupt it. Thin, non-overlay tab scrollbar (TileTabStrip.css). Fixes found while testing: - White-screen crash: read currentTarget synchronously, not inside a setState updater (React nulls it after the handler). - Tiles overlapped: split panes now flex-grow to share the space the fixed splitter leaves, so panes + divider sum to 100% with no hardcoded splitter width. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4 weeks ago
TileTabStrip.tsx
Prevent editor scrollbar shift and enable wheel-scroll on tab strip Reserve the CodeMirror scroller's scrollbar gutter with `scrollbar-gutter: stable` so content no longer shifts left when a document first grows tall enough to need a vertical scrollbar. Add a non-passive wheel listener to the tile tab strip so a vertical mouse wheel scrolls it horizontally while the pointer is over it (trackpad horizontal gestures still work via the dominant axis). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 week ago
tabDnd.test.ts
Tabs per tile (phase 5b): drag-and-drop tabs + drop-zone splits Drag tab chips to reorder, move between tiles, or split. - tabsModel.moveTab: reorder within / move across tiles (pure + tested); creates the destination tile if absent and reports sourceEmptied. - tabDnd: shared drag payload + computeDropZone (5 zones; pure + tested). - model.splitLeaf gains `before` so a drop on a left/top edge puts the new tile first. - tiling.tsx: TilingTile shows a translucent zone overlay (raised via a capture overlay so the editor can't swallow drag events); dropping on an edge splits the tile and moves the tab; center moves it in. - TileTabStrip: draggable chips with an insertion marker, cleared on dragleave/dragend; an independent off-screen clone is used as the drag image so the clipped live chip can't corrupt it. Thin, non-overlay tab scrollbar (TileTabStrip.css). Fixes found while testing: - White-screen crash: read currentTarget synchronously, not inside a setState updater (React nulls it after the handler). - Tiles overlapped: split panes now flex-grow to share the space the fixed splitter leaves, so panes + divider sum to 100% with no hardcoded splitter width. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4 weeks ago
tabDnd.ts
Tabs per tile (phase 5b): drag-and-drop tabs + drop-zone splits Drag tab chips to reorder, move between tiles, or split. - tabsModel.moveTab: reorder within / move across tiles (pure + tested); creates the destination tile if absent and reports sourceEmptied. - tabDnd: shared drag payload + computeDropZone (5 zones; pure + tested). - model.splitLeaf gains `before` so a drop on a left/top edge puts the new tile first. - tiling.tsx: TilingTile shows a translucent zone overlay (raised via a capture overlay so the editor can't swallow drag events); dropping on an edge splits the tile and moves the tab; center moves it in. - TileTabStrip: draggable chips with an insertion marker, cleared on dragleave/dragend; an independent off-screen clone is used as the drag image so the clipped live chip can't corrupt it. Thin, non-overlay tab scrollbar (TileTabStrip.css). Fixes found while testing: - White-screen crash: read currentTarget synchronously, not inside a setState updater (React nulls it after the handler). - Tiles overlapped: split panes now flex-grow to share the space the fixed splitter leaves, so panes + divider sum to 100% with no hardcoded splitter width. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
4 weeks ago
tabsModel.test.ts
Add Edit/View mode toggle with per-tab state and link navigation Introduce a distinct read-only "view" rendering mode alongside the existing live-preview "edit" mode, toggled per-tab from a segmented control in the bottom bar. Rendering: view mode is expressed as "the cursor is nowhere" — the four cursor-proximity helpers in livePreview/context.ts short-circuit when the new editorModeFacet is 'view', so every element hides its syntax and stays rendered with no per-builder change. The editor drives the facet (plus EditorState.readOnly) through a runtime-reconfigured compartment, so toggling preserves cursor/scroll/history. State: mode lives on each TileTab so it rides along on drag/move and persists per tab (layout VERSION 2, reads v1). The toggle reads/writes the active tab's mode via the tiling workspace's tab-state hook. Links: in view mode a plain click opens a link (edit mode keeps cmd/ctrl-click); external URLs open in the browser, internal targets resolve against the current document and open in the same tile. Links show a pointer cursor in view mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 day ago
tabsModel.ts
Add Edit/View mode toggle with per-tab state and link navigation Introduce a distinct read-only "view" rendering mode alongside the existing live-preview "edit" mode, toggled per-tab from a segmented control in the bottom bar. Rendering: view mode is expressed as "the cursor is nowhere" — the four cursor-proximity helpers in livePreview/context.ts short-circuit when the new editorModeFacet is 'view', so every element hides its syntax and stays rendered with no per-builder change. The editor drives the facet (plus EditorState.readOnly) through a runtime-reconfigured compartment, so toggling preserves cursor/scroll/history. State: mode lives on each TileTab so it rides along on drag/move and persists per tab (layout VERSION 2, reads v1). The toggle reads/writes the active tab's mode via the tiling workspace's tab-state hook. Links: in view mode a plain click opens a link (edit mode keeps cmd/ctrl-click); external URLs open in the browser, internal targets resolve against the current document and open in the same tile. Links show a pointer cursor in view mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 day ago
tiling.tsx
Add Edit/View mode toggle with per-tab state and link navigation Introduce a distinct read-only "view" rendering mode alongside the existing live-preview "edit" mode, toggled per-tab from a segmented control in the bottom bar. Rendering: view mode is expressed as "the cursor is nowhere" — the four cursor-proximity helpers in livePreview/context.ts short-circuit when the new editorModeFacet is 'view', so every element hides its syntax and stays rendered with no per-builder change. The editor drives the facet (plus EditorState.readOnly) through a runtime-reconfigured compartment, so toggling preserves cursor/scroll/history. State: mode lives on each TileTab so it rides along on drag/move and persists per tab (layout VERSION 2, reads v1). The toggle reads/writes the active tab's mode via the tiling workspace's tab-state hook. Links: in view mode a plain click opens a link (edit mode keeps cmd/ctrl-click); external URLs open in the browser, internal targets resolve against the current document and open in the same tile. Links show a pointer cursor in view mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 day ago
tilingPersistence.test.ts
Add Edit/View mode toggle with per-tab state and link navigation Introduce a distinct read-only "view" rendering mode alongside the existing live-preview "edit" mode, toggled per-tab from a segmented control in the bottom bar. Rendering: view mode is expressed as "the cursor is nowhere" — the four cursor-proximity helpers in livePreview/context.ts short-circuit when the new editorModeFacet is 'view', so every element hides its syntax and stays rendered with no per-builder change. The editor drives the facet (plus EditorState.readOnly) through a runtime-reconfigured compartment, so toggling preserves cursor/scroll/history. State: mode lives on each TileTab so it rides along on drag/move and persists per tab (layout VERSION 2, reads v1). The toggle reads/writes the active tab's mode via the tiling workspace's tab-state hook. Links: in view mode a plain click opens a link (edit mode keeps cmd/ctrl-click); external URLs open in the browser, internal targets resolve against the current document and open in the same tile. Links show a pointer cursor in view mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 day ago
tilingPersistence.ts
Add Edit/View mode toggle with per-tab state and link navigation Introduce a distinct read-only "view" rendering mode alongside the existing live-preview "edit" mode, toggled per-tab from a segmented control in the bottom bar. Rendering: view mode is expressed as "the cursor is nowhere" — the four cursor-proximity helpers in livePreview/context.ts short-circuit when the new editorModeFacet is 'view', so every element hides its syntax and stays rendered with no per-builder change. The editor drives the facet (plus EditorState.readOnly) through a runtime-reconfigured compartment, so toggling preserves cursor/scroll/history. State: mode lives on each TileTab so it rides along on drag/move and persists per tab (layout VERSION 2, reads v1). The toggle reads/writes the active tab's mode via the tiling workspace's tab-state hook. Links: in view mode a plain click opens a link (edit mode keeps cmd/ctrl-click); external URLs open in the browser, internal targets resolve against the current document and open in the same tile. Links show a pointer cursor in view mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 day ago
useTilingDocumentSlots.ts
Add Edit/View mode toggle with per-tab state and link navigation Introduce a distinct read-only "view" rendering mode alongside the existing live-preview "edit" mode, toggled per-tab from a segmented control in the bottom bar. Rendering: view mode is expressed as "the cursor is nowhere" — the four cursor-proximity helpers in livePreview/context.ts short-circuit when the new editorModeFacet is 'view', so every element hides its syntax and stays rendered with no per-builder change. The editor drives the facet (plus EditorState.readOnly) through a runtime-reconfigured compartment, so toggling preserves cursor/scroll/history. State: mode lives on each TileTab so it rides along on drag/move and persists per tab (layout VERSION 2, reads v1). The toggle reads/writes the active tab's mode via the tiling workspace's tab-state hook. Links: in view mode a plain click opens a link (edit mode keeps cmd/ctrl-click); external URLs open in the browser, internal targets resolve against the current document and open in the same tile. Links show a pointer cursor in view mode. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 day ago