Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Block edit renderer #5988

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Block edit renderer #5988

wants to merge 2 commits into from

Conversation

beyang
Copy link
Member

@beyang beyang commented Oct 24, 2024

Render a proposed edit as a find-replace block:

image

Adds a test command under the shortcut ctrl + Enter. This test command parses a proposed edit from the last instance in the current file of a string like this:

<<<<
String to replace
====
Replacement string
~~~~
{ "minReplacerCol": 80 }
>>>>

It then applies this edit in the file.

The test command only serves to show the format of the renderer. The rendering function is renderBlockEdit. This is what should be reused to displaying proposed edits.

To try out the test command, open up a file like ContextCell.tsx (or any file with occurrences of the find-replace pattern above) and run the ctrl + Enter shortcut at a location after the find-replace pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant