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

Fixes #2506 - Updating react codemirror package that we use #3077

Merged
merged 12 commits into from
Dec 1, 2023
Merged

Fixes #2506 - Updating react codemirror package that we use #3077

merged 12 commits into from
Dec 1, 2023

Conversation

alexcottner
Copy link
Contributor

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
Screenshot from 2023-11-29 13-20-45

Old
Screenshot from 2023-11-29 13-21-31

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";
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, missed that one.

height="auto"
style={{}}
extensions={[langs.json()]}
indentWithTab={true}
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@alexcottner alexcottner merged commit 5c5e49c into Kinto:master Dec 1, 2023
6 checks passed
@alexcottner alexcottner deleted the codemirror-update branch December 4, 2023 15:28
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.

2 participants