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.
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
feat(playground): Implement codemirror based template string editor #4943
feat(playground): Implement codemirror based template string editor #4943
Changes from 10 commits
f1f93e2
1bbf1f8
8ef11cb
f448731
6f8a0d3
e7e6fd1
e656c34
f5c7920
6cd2feb
d1792fa
46c9615
65adba3
511330d
7be950b
337d6a1
de8a835
d72c345
7bcedb8
f21d943
ff8a18e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
Large diffs are not rendered by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the ...props so I get that you are trying to keep this generic. Maybe you can expose under
/code
a version that doesn't have things like line numbers since I think that's the primary use-caseThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to tweak any defaults you want for TemplateEditor, including removing line numbers and setting a default height.
I tend to opt for exposing all props on components so that I don't have to add them later but I'm happy with leaving extra props opaque until they're actually needed to be drilled through
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No more gutter, line numbers, or line highlight by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: your check below avoids this, but sometimes prefer writing records as Record<string, string | number | undefined> just because it's a little more honest and catches unset keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in my opinion we should just enable
noUncheckedIndexedAccess
in our tsconfig if we are concerned about unset keysThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added