-
Notifications
You must be signed in to change notification settings - Fork 34
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
Fixes #2506 - Updating react codemirror package that we use #3077
Conversation
…nto issue-3073
src/App.tsx
Outdated
@@ -4,7 +4,7 @@ import { Provider } from "react-redux"; | |||
|
|||
import { store, history } from "./store/configureStore"; | |||
import "bootstrap/dist/css/bootstrap.css"; | |||
import "codemirror/lib/codemirror.css"; | |||
// import "codemirror/lib/codemirror.css"; |
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.
not necessary anymore? Shall we just remove it?
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.
Yup, missed that one.
src/components/JSONEditor.tsx
Outdated
height="auto" | ||
style={{}} | ||
extensions={[langs.json()]} | ||
indentWithTab={true} |
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.
We had indentWithTabs: false,
with options like tabSize: 2,
. Why this change?
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.
Ah, that was my bad. I also had an empty style object in there because I wasn't sure if I was going to need to tweak things.
Switched indentWithTabs to false. Indentation size appears to be 2 by default so I didn't try to change it. But if we want to, it looks like we set that in extensions.
Fixes #2506. Be sure to review #3076 first as this is branched from that.
Switching to a react codemirror package that supports codemirror v6. Differences are subtle but present. Would like to hear any objections over using this package, but it seems solid to me.
New
Old