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

Re-implement text marker preservation feature #571

Open
pcardune opened this issue Nov 10, 2021 · 0 comments
Open

Re-implement text marker preservation feature #571

pcardune opened this issue Nov 10, 2021 · 0 comments

Comments

@pcardune
Copy link
Collaborator

My attempt at describing this feature:

Code that embeds CodeMirrorBlocks can use codemirror's api to create text markers. This feature preserves those markers when switching back and forth between block mode and text mode.

This feature doesn't have any tests, and based on my manual inspection of the code, is completely broken, so I'm going to remove it since it's making other code harder to refactor.

I also think we should change the way the codemirror instance is created. Instead of creating it ourselves from inside react components, and then bubbling the instance back up to the top, we should instead create it at the top and pass it down. Then when switching between block mode and text mode, we would actually just keep using the same codemirror instance instead of creating a new one, completely obviating the need to manually copy state between the old and new instances.

pcardune added a commit that referenced this issue Nov 11, 2021
schanzer pushed a commit that referenced this issue Nov 15, 2021
* Pass quarantine in to ToplevelBlockEditable
* make action creators for quarantine state changes
* pass store directly to buildAPI
* Move block mode state into redux store
* extract buildAPI function out of ToggleEditor component
* Remove passedAST from BlockEditor
* remove duplicate ast state from ToggleEditor
* Rip out recorded marks. See #571
* Move code state into redux store
* Remove need to pass handleToggle to buildAPI
* Unify all buildApi related functions
* Ditch untested event copying code
* move api building all the way to the top level
* Only construct codemirror facade when needed
* expose redux store to tests using mountCMB helper
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

No branches or pull requests

1 participant