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
/
editors
/
automerge
/
at
edit-view-mode
1 folder
3 files
Ethan Graf
Add Edit/View mode toggle with per-tab state and link navigation
4d ago
f4534c4d
livePreview
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>
4 days ago
automergeDocumentEditor.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>
4 days ago
automergeEditor.css
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>
4 days ago
automergeEditorBinding.ts
Add pre-commit hook (format, lint, test) and format the repo - .githooks/pre-commit runs `format:check`, `lint`, and `test`; commits are blocked unless all pass. Enabled via core.hooksPath, wired by a `prepare` npm script so `npm install` activates it on fresh clones. - Ran `prettier --write .` across the repo so it's now Prettier-clean and the hook's format:check passes going forward. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 month ago