-
Notifications
You must be signed in to change notification settings - Fork 47
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
Replace Prismjs and manual code editing system with CodeMirror #888
Conversation
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
@queengooborg As this PR changes how the interactive examples look, could you please add Before/After screenshots for each of the 4 editor types? 🙏 |
I think the reason for using Prismjs here was to make the interactive examples look like the code samples (which will continue to use Prism): https://developer.mozilla.org/en-US/docs/Web/CSS/animation#applying_multiple_animations Not really sure how to solve this. 🤔 |
Sadly, from what I noticed, it seemed as though Prismjs never actually ran on the interactive examples -- accessing a random CSS page with an interactive example, the text is a uniform color: https://developer.mozilla.org/en-US/docs/Web/CSS/transition Additionally, once I got it working again, I ran into some other unfortunate issues that deteriorate the user experience, such as: if we perform syntax highlighting while typing, the user loses their undo state and it's quite hard to retain the text cursor position when the HTML changes, but if we don't, the user will end up getting colors bleeding over into parts it shouldn't (if that makes any sense). Personally, I think that the benefits to using CodeMirror everywhere outweigh the drawbacks, especially when considering that this same issue applies to all of the existing CodeMirror editors. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
@schalkneethling @caugner May I get a review on this soon? |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
This pull request has merge conflicts that must be resolved before it can be merged. |
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.
LGTM, just one possible nit.
This pull request has merge conflicts that must be resolved before it can be merged. |
This PR replaces the Prism code highlighting and manual code editing system with CodeMirror. This significantly reduces the dependency count and simplifies our code. Closes #886 due to irrelevance. Naturally fixes #858, fixes #774, fixes #813, fixes #811 by using the CodeMirror theme.
This will currently block work for #851.