New editor homepage demo#795
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b5d03f1051
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| this.#fileInstance = component; | ||
| this.#initialize(); | ||
| this.#detach = component.attachEditor(this); |
There was a problem hiding this comment.
Clean up previous editor attachment before re-editing
When the same Editor is moved by calling edit() on another component (which the new public docs explicitly describe as supported), the existing #detach and event/style cleanup are never run before #fileInstance and #detach are overwritten. That leaves the previous component still pointing at this editor and leaves the old document/content listeners active, so a later rerender of the old component can call syncToRenderedView and steal editing back or duplicate handlers. Call the previous cleanup/detach path before initializing the new attachment.
Useful? React with 👍 / 👎.
| if (line.startsWith('??')) { | ||
| const p = unquoteGitPath(line.slice(3).trimStart()); | ||
| if (p.length > 0) { | ||
| entries.push({ path: p, status: 'untracked' }); | ||
| } |
There was a problem hiding this comment.
Strip the pathspec from untracked git-status entries
For /git-status/packages/diffs, tracked changes are normalized to tree-relative paths later in this function, but this untracked branch pushes Git's repo-relative path unchanged. An untracked packages/diffs/src/new.ts is returned as packages/diffs/src/new.ts while the file tree paths from /fs/packages/diffs are src/new.ts, so new files under the scoped editor tree won't get their untracked badge/status until this branch applies the same pathspec stripping.
Useful? React with 👍 / 👎.
|
can you see this editor at the preview deploy? what's the url? |
0e3065f to
f6529b9
Compare
eea2a5d to
6efc737
Compare
@necolas Editor is no more basically, but there's a editor-like AUI demo now on the diffs homepage: https://pierre-docs-diffs-git-mdo-beta13-6f2fa0-pierre-computer-company.vercel.app/. |
Co-authored-by: Cursor <cursoragent@cursor.com>
Tag the marker hover popover with its severity so the popover renders as a solid chip filled in the severity color with white text, mirroring the underline. Drops the inset surface ring on severity popovers so the fill reads as one solid color.
Only observe the document/system color scheme when the surface follows it (themeType: 'system'). A surface pinned to an explicit dark/light theme must re-tokenize after an edit with the same theme the SSR markup used; otherwise edited tokens fall back to the default foreground.
Position the find/search panel absolutely in the top-right of the surface with a stacking z-index instead of stickily flowing at the top, so it overlays the content consistently while searching.
The marker hover popover is now filled with the severity color, so let the icon and description inherit the popover's white text instead of painting their own color (which would vanish against the fill).
Extract the platform-modifier logic into usePlatformModifier and add a ShortcutKeys component that renders a shortcut from plain string arrays, so a serializable shortcuts table can drive rendering without inlining JSX per row. Move the tree a11y shortcut table onto this model.
Switch the homepage editor demo from unified to split diff style.
Add a dedicated /edit feature page showcasing edit mode: live editing, selection actions, lint markers, find-in-file, undo history, and keyboard shortcuts, plus a reference section. Wire it into the header, mobile menu, and footer navigation, and link to it from the homepage agent demo. Rename the LiveEditor toggle from file/diff to a read-only Review vs editable Edit of the same File surface.
b3c582f to
7c11a3e
Compare
WIP, but building out a fun editor demo again. Lots to clean up in the Git history, lots more to polish.