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

Improvements to ZUIEditor overlays #2480

Merged

Conversation

richardolsson
Copy link
Member

@richardolsson richardolsson commented Jan 18, 2025

Description

This PR fixes a number of issues related to the overlays over ZUIEditor.

Screenshots

image

Changes

  • Fixes positioning of BlockInsert using an approach based on view.nodeDOM().getBoundingClientRect() instead of view.coordsAtPos()
  • Creates bespoke command to insert empty paragraph to fix bug caused by the built-in insertParagraph() command when used immediately before an image block
  • Tweak styling of block borders and dividers
  • Add link to placeholder that inserts '/' which triggers block menu to open
  • Hide block menu when paragraph is empty

Notes to reviewer

I'm mostly happy with this, but we do need to talk a little bit about the UX, especially related to the placeholder.

Related issues

Undocumented

@richardolsson richardolsson changed the title ZUIEditor overlays fixes Improvements to ZUIEditor overlays Jan 18, 2025
Copy link
Contributor

@ziggabyte ziggabyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not catch it on screenshot for some reason, but I can reach a state where the red line with the "add" button appears on top of the blinking caret, like the red line is off somehow to where it should be?

Did not get this state in the other pr so I am assuming this is something that has happened in here..

I'm putting "request for change" to look into it!

@ziggabyte ziggabyte merged commit ef8c8f0 into undocumented/ZUI-text-editor Jan 21, 2025
6 checks passed
@ziggabyte ziggabyte deleted the undocumented/zui-editor-overlays-fixes branch January 21, 2025 12:15
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