Some editor nits and updates#873
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
necolas
reviewed
Jun 23, 2026
necolas
reviewed
Jun 23, 2026
necolas
reviewed
Jun 23, 2026
Comment on lines
+164
to
+180
| <Button | ||
| variant="outline" | ||
| className="justify-between gap-3 pr-11 pl-3" | ||
| onClick={() => setMode(mode === 'edit' ? 'review' : 'edit')} | ||
| > | ||
| <div className="flex items-center gap-2"> | ||
| <IconPencil className="-ml-0.5" /> | ||
| Edit mode | ||
| </div> | ||
| </Button> | ||
| <Switch | ||
| checked={mode === 'edit'} | ||
| onCheckedChange={(checked) => setMode(checked ? 'edit' : 'review')} | ||
| onClick={(e) => e.stopPropagation()} | ||
| className="pointer-events-none mr-3 place-self-center justify-self-end" | ||
| aria-label="Edit mode" | ||
| /> |
Contributor
There was a problem hiding this comment.
Is the Button and Switch doing the same thing?
Contributor
Author
There was a problem hiding this comment.
Ya it's a stylistic thing—I use a CSS grid to stack the switch on the button. Not great, but fine lol. We do this in a lot of places, so we could refactor at some point.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
…ply to markers and popovers
necolas
approved these changes
Jun 24, 2026
amadeus
added a commit
that referenced
this pull request
Jun 24, 2026
* chore: empty commit for beta branch * Prevent transparent borders * Fix the editing example * fix cursor jumping in history demo * wip * updates * button fixes, history improvement * refactor(diffs): show the selection action in a floating popover Selecting text in an editable surface used to surface a lightning icon in the gutter; clicking it inserted the consumer's action element as a new inline row, which reflowed the document and took two interactions. Replace that with a floating popover that appears automatically once a ranged selection settles, anchored just below the selection's head and mounted in the overlay layer so it never reflows the content. The `renderSelectionAction` API is unchanged, and its handlers now read the live primary selection so keyboard-extending a selection keeps acting on the current range. Drop the now-unused gutter icon, its `quick` sprite, and the inline-row styling. * docs(docs): rebuild the selection action demo as "Add to chat" The edit page's selection demo wrapped the selection in t() or shouted it in caps from a toolbar. Rebuild it around the new popover: selecting code pops an indigo "Add to chat" action (plus a secondary copy) that sends the snippet to a mock chat panel beside the editor, complete with an inert composer mirroring the homepage agent UI. Snippets render with a read-only File. The page's shared worker pool is wired for the editable surface and doesn't highlight a dynamically mounted read-only File, so opt these out with disableWorkerPool and highlight on the main thread. The panel is height-matched to the editor so the list scrolls while the header and composer stay put. * docs(docs): describe the selection action popover Update the editor docs and copy to match the new behavior: the action appears in a floating popover anchored to the selection instead of a gutter icon you click, and it can hold any number of actions. Refresh the edit-page blurb, the Editor guide prose, and the option comment, and drop the selection action from the standalone EditorDemo so it stays focused on plain editing. * chore(demo): match the renamed selection action popover hook The selection action now renders as a popover, so target the new [data-selection-action-popover] selector and drop the inline margin that spaced the old inline action row. * test(diffs): cover selection action popover lifecycle Add cases for the popover's auto show/teardown: it disappears once the selection collapses, and it never renders (nor calls the consumer's callback) when enabledSelectionAction is left off. * feature updates * New replace and replaceall icons * better search shortcuts * Update keyboard shorcuts table * refactor search, fix some nits, redo icons in search, combine marker severity styles * remove labels * use claude to restore the delta between X's and my changes, then reapply to markers and popovers * improve focus, rearrange * localize the padding/margin for now --------- Co-authored-by: Amadeus Demarzi <amadeusdemarzi@gmail.com>
amadeus
added a commit
that referenced
this pull request
Jun 24, 2026
* chore: empty commit for beta branch * Prevent transparent borders * Fix the editing example * fix cursor jumping in history demo * wip * updates * button fixes, history improvement * refactor(diffs): show the selection action in a floating popover Selecting text in an editable surface used to surface a lightning icon in the gutter; clicking it inserted the consumer's action element as a new inline row, which reflowed the document and took two interactions. Replace that with a floating popover that appears automatically once a ranged selection settles, anchored just below the selection's head and mounted in the overlay layer so it never reflows the content. The `renderSelectionAction` API is unchanged, and its handlers now read the live primary selection so keyboard-extending a selection keeps acting on the current range. Drop the now-unused gutter icon, its `quick` sprite, and the inline-row styling. * docs(docs): rebuild the selection action demo as "Add to chat" The edit page's selection demo wrapped the selection in t() or shouted it in caps from a toolbar. Rebuild it around the new popover: selecting code pops an indigo "Add to chat" action (plus a secondary copy) that sends the snippet to a mock chat panel beside the editor, complete with an inert composer mirroring the homepage agent UI. Snippets render with a read-only File. The page's shared worker pool is wired for the editable surface and doesn't highlight a dynamically mounted read-only File, so opt these out with disableWorkerPool and highlight on the main thread. The panel is height-matched to the editor so the list scrolls while the header and composer stay put. * docs(docs): describe the selection action popover Update the editor docs and copy to match the new behavior: the action appears in a floating popover anchored to the selection instead of a gutter icon you click, and it can hold any number of actions. Refresh the edit-page blurb, the Editor guide prose, and the option comment, and drop the selection action from the standalone EditorDemo so it stays focused on plain editing. * chore(demo): match the renamed selection action popover hook The selection action now renders as a popover, so target the new [data-selection-action-popover] selector and drop the inline margin that spaced the old inline action row. * test(diffs): cover selection action popover lifecycle Add cases for the popover's auto show/teardown: it disappears once the selection collapses, and it never renders (nor calls the consumer's callback) when enabledSelectionAction is left off. * feature updates * New replace and replaceall icons * better search shortcuts * Update keyboard shorcuts table * refactor search, fix some nits, redo icons in search, combine marker severity styles * remove labels * use claude to restore the delta between X's and my changes, then reapply to markers and popovers * improve focus, rearrange * localize the padding/margin for now --------- Co-authored-by: Amadeus Demarzi <amadeusdemarzi@gmail.com>
tjni
pushed a commit
to tjni/pierre
that referenced
this pull request
Jun 25, 2026
* chore: empty commit for beta branch * Prevent transparent borders * Fix the editing example * fix cursor jumping in history demo * wip * updates * button fixes, history improvement * refactor(diffs): show the selection action in a floating popover Selecting text in an editable surface used to surface a lightning icon in the gutter; clicking it inserted the consumer's action element as a new inline row, which reflowed the document and took two interactions. Replace that with a floating popover that appears automatically once a ranged selection settles, anchored just below the selection's head and mounted in the overlay layer so it never reflows the content. The `renderSelectionAction` API is unchanged, and its handlers now read the live primary selection so keyboard-extending a selection keeps acting on the current range. Drop the now-unused gutter icon, its `quick` sprite, and the inline-row styling. * docs(docs): rebuild the selection action demo as "Add to chat" The edit page's selection demo wrapped the selection in t() or shouted it in caps from a toolbar. Rebuild it around the new popover: selecting code pops an indigo "Add to chat" action (plus a secondary copy) that sends the snippet to a mock chat panel beside the editor, complete with an inert composer mirroring the homepage agent UI. Snippets render with a read-only File. The page's shared worker pool is wired for the editable surface and doesn't highlight a dynamically mounted read-only File, so opt these out with disableWorkerPool and highlight on the main thread. The panel is height-matched to the editor so the list scrolls while the header and composer stay put. * docs(docs): describe the selection action popover Update the editor docs and copy to match the new behavior: the action appears in a floating popover anchored to the selection instead of a gutter icon you click, and it can hold any number of actions. Refresh the edit-page blurb, the Editor guide prose, and the option comment, and drop the selection action from the standalone EditorDemo so it stays focused on plain editing. * chore(demo): match the renamed selection action popover hook The selection action now renders as a popover, so target the new [data-selection-action-popover] selector and drop the inline margin that spaced the old inline action row. * test(diffs): cover selection action popover lifecycle Add cases for the popover's auto show/teardown: it disappears once the selection collapses, and it never renders (nor calls the consumer's callback) when enabledSelectionAction is left off. * feature updates * New replace and replaceall icons * better search shortcuts * Update keyboard shorcuts table * refactor search, fix some nits, redo icons in search, combine marker severity styles * remove labels * use claude to restore the delta between X's and my changes, then reapply to markers and popovers * improve focus, rearrange * localize the padding/margin for now --------- Co-authored-by: Amadeus Demarzi <amadeusdemarzi@gmail.com>
amadeus
added a commit
that referenced
this pull request
Jul 21, 2026
* chore: empty commit for beta branch * Prevent transparent borders * Fix the editing example * fix cursor jumping in history demo * wip * updates * button fixes, history improvement * refactor(diffs): show the selection action in a floating popover Selecting text in an editable surface used to surface a lightning icon in the gutter; clicking it inserted the consumer's action element as a new inline row, which reflowed the document and took two interactions. Replace that with a floating popover that appears automatically once a ranged selection settles, anchored just below the selection's head and mounted in the overlay layer so it never reflows the content. The `renderSelectionAction` API is unchanged, and its handlers now read the live primary selection so keyboard-extending a selection keeps acting on the current range. Drop the now-unused gutter icon, its `quick` sprite, and the inline-row styling. * docs(docs): rebuild the selection action demo as "Add to chat" The edit page's selection demo wrapped the selection in t() or shouted it in caps from a toolbar. Rebuild it around the new popover: selecting code pops an indigo "Add to chat" action (plus a secondary copy) that sends the snippet to a mock chat panel beside the editor, complete with an inert composer mirroring the homepage agent UI. Snippets render with a read-only File. The page's shared worker pool is wired for the editable surface and doesn't highlight a dynamically mounted read-only File, so opt these out with disableWorkerPool and highlight on the main thread. The panel is height-matched to the editor so the list scrolls while the header and composer stay put. * docs(docs): describe the selection action popover Update the editor docs and copy to match the new behavior: the action appears in a floating popover anchored to the selection instead of a gutter icon you click, and it can hold any number of actions. Refresh the edit-page blurb, the Editor guide prose, and the option comment, and drop the selection action from the standalone EditorDemo so it stays focused on plain editing. * chore(demo): match the renamed selection action popover hook The selection action now renders as a popover, so target the new [data-selection-action-popover] selector and drop the inline margin that spaced the old inline action row. * test(diffs): cover selection action popover lifecycle Add cases for the popover's auto show/teardown: it disappears once the selection collapses, and it never renders (nor calls the consumer's callback) when enabledSelectionAction is left off. * feature updates * New replace and replaceall icons * better search shortcuts * Update keyboard shorcuts table * refactor search, fix some nits, redo icons in search, combine marker severity styles * remove labels * use claude to restore the delta between X's and my changes, then reapply to markers and popovers * improve focus, rearrange * localize the padding/margin for now --------- Co-authored-by: Amadeus Demarzi <amadeusdemarzi@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copy edits, design updates, and more.