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

GN-6404: fix behaviour of embedded editor keymap #1044

Conversation

elpoelma
Copy link
Contributor

@elpoelma elpoelma commented Nov 23, 2023

Overview

This PR solves issues with the keymap initialization of an embedded editor instance:

  • The default keymap of an embedded editor is now correctly initialized
  • An additional shift+Enter handler has been added to the default embedded editor keymap
  • Only run leave-on-enter modifier when Enter has been pressed without modifier keys (Ctrl, Alt, Shift or Cmd)
connected issues and PRs:

GN-6404

How to test/reproduce

Before this fix

  • Set the allowed content of a link to inline*
  • Insert a link with some text inside
  • Notice that none of the editor shortcuts work inside the link (Mod+b, Enter, Mod+i etc.)

After this fix

  • Set the allowed content of a link to inline*
  • Disable the leave-on-enter modifiers in the link component
  • Insert a link with some text inside
  • Notice that the editor shortcuts work inside the link (Mod+b, Enter, Mod+i etc.), as well as shift+Enter

Checks PR readiness

  • UI: works on smaller screen sizes
  • UI: feedback for any loading/error states
  • Check cancel/go-back flows
  • Check database state correct when deleting/updating (especially regarding relationships)
  • changelog
  • npm lint
  • no new deprecations

@elpoelma elpoelma added the bug Something isn't working label Nov 23, 2023
@elpoelma elpoelma self-assigned this Nov 23, 2023
@abeforgit
Copy link
Member

gonna merge this but some notes:

  • adding newline at end of node looks like it does nothing the first time, but this is because browsers dont' render a trailing
    -> I don't think this is a regression
  • I misunderstood the fix, my idea was to have leave-on-enter behavior for enter, and hard-break on shift-enter. But I thought this because I thought we added leave-on-enter for variable nodes as well as links, it seems we didn't.

@abeforgit abeforgit merged commit ad97051 into master Nov 23, 2023
@abeforgit abeforgit deleted the GN-4604-return-within-location-variable-with-adres-variabele-in-it-is-not-possible branch November 23, 2023 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants