feat(richtext-lexical): various gutter, error states & add/drag handle improvements #6448
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Gutter
Adds gutter by default:
can be disabled with admin.hideGutter
Error states
Finally, proper error states display. Cleaner, and previously fields were shown as erroring even though they weren't. No more!
Drag & Block handles
Improved performance, and cleaned up code. Drag handle positions are now only calculated for one editor rather than all editors on the page. Add block handle calculation now uses a better algorithm to minimize the amount of nodes which are iterated.
Additionally, have you noticed how sometimes the add button jumps to the next node while the drag button is still at the previous node?
CleanShot.2024-05-21.at.16.22.55.mp4
No more! Now they behave the same. Feels a lot cleaner now.