-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Convert Editor to functional, splits off CodeMirror code into its own file #3352
Convert Editor to functional, splits off CodeMirror code into its own file #3352
Conversation
Release EnvironmentsThis Environment is provided by Release, learn more! 🔧Environment Status : https://app.release.com/public/Processing%20Foundation/env-4246ac625c |
Thanks so much for your work on this! After doing some manual testing, I think this mostly felt good besides an issue with unsaved changes—I attached some videos below to help visualize it! In the current setup, if I have unsaved changes, the changes would remain. editor_ver.movHere, I think I'm seeing that the unsaved changes disappear on Autosave. PR_ver.movBesides this, I feel like everything else seems to work well for me! |
5b7cc8c
to
76a8c97
Compare
1e8e8ce
to
6d7ef6d
Compare
I'm fairly certain that we can remove ``` if (!prevProps?.unsavedChanges) { setTimeout(() => setUnsavedChanges(false), 400); } ``` I looked at the git blame and it looks like the intention was to stop setting unsavedchanges to false when the files switched, but i think the solve that was implemented 9 years ago did something like "if c == false, c = false" and we should be able to safely remove it instead. reference commit: 77e2f5b
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.
Thanks so much for your work on this!!! This overall looks good to me! :)
I feel like any further issues that come up from this will probably be on the minor end, and can be addressed down the line!
Part of larger CodeMirror v5 -> v6 conversion. This converts the Editor component from class-based to functional style.
Changes:
I have verified that this pull request:
npm run lint
)npm run test
)develop
branch.Fixes #123