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

Markdown stability patch #7238

Merged
merged 7 commits into from
Aug 7, 2024
Merged

Conversation

demshy
Copy link
Member

@demshy demshy commented Jun 27, 2024

Summary

Trying to address some of the reproducible bugs in current markdown editor. The ultimate plan is still to upgrade the editor to Plate and have high hopes that that will fix most of the problems, but in the meantime we can try to patch some of the most annoying ones.

First fix is for #7220 - where converting markdown without text (but newlines, breaks or spaces) would result in a slate root without paragraph node.

Second fix is for #7123 - a case where backspace in urls contained in lists breaks the editor

The third fix is for losing focus after pressing backspace when previous element (or especially two elements) are soft breaks.

Test plan
#7220
Switch to markdown mode, add a space or a line break, switch back to richtext mode and hit shift+enter. The editor should no longer crash.

#7123
Create a bullet list with two items. In the second change some of the text to link. Then use backspace at the start of that link. The editor should not crash. Keep using backspace until the bullet is removed and the editor should also not crash then.

Hit shift+enter three times and then backspace. Before this, the editor would not crash, but still lose focus.

Checklist

Please add a x inside each checkbox:

A picture of a cute animal (not mandatory but encouraged)

@demshy demshy requested a review from a team as a code owner June 27, 2024 11:06
martinjagodic
martinjagodic previously approved these changes Jun 27, 2024
martinjagodic
martinjagodic previously approved these changes Jun 28, 2024
@demshy demshy closed this Aug 7, 2024
@demshy demshy reopened this Aug 7, 2024
@demshy demshy dismissed martinjagodic’s stale review August 7, 2024 10:35

The merge-base changed after approval.

@demshy demshy merged commit 943ba89 into decaporg:main Aug 7, 2024
9 checks passed
@demshy demshy deleted the fix/markdown-stability branch August 7, 2024 12:35
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