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

Fix/hide bubble when in menu #5529

Merged
merged 23 commits into from
Mar 20, 2024
Merged

Fix/hide bubble when in menu #5529

merged 23 commits into from
Mar 20, 2024

Commits on Mar 20, 2024

  1. refactor(links): move linkBubble plugin to plugins/links

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    710b350 View commit details
    Browse the repository at this point in the history
  2. refactor(links): pass editor via options to LinkBubblePluginView

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    e6049b0 View commit details
    Browse the repository at this point in the history
  3. refactor(links): untangle LinkBubblePluginView from editor

    It is a prosemirror plugin view. No need for it to know tiptap data structures
    
    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d871277 View commit details
    Browse the repository at this point in the history
  4. refactor(links): use prosemirror tr and state to track clicks

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    e4340f8 View commit details
    Browse the repository at this point in the history
  5. refactor(links): move click handling into link bubble plugin

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    90b99be View commit details
    Browse the repository at this point in the history
  6. refactor(links): only hand link mark to updateTooltip

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    356509b View commit details
    Browse the repository at this point in the history
  7. refactor(links): introduce setActiveLink function

    Also rename `clicked` state to `active`.
    We will also use it for activating via keypress
    
    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    e30c78c View commit details
    Browse the repository at this point in the history
  8. fix(links): also update if active was unset

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d956fdd View commit details
    Browse the repository at this point in the history
  9. refactor(links): operate on state with linkNodeFromSelection

    In appendTransation callbacks there is no view available.
    
    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    e02c5ad View commit details
    Browse the repository at this point in the history
  10. refactor(links): move linkNodeFromSelection into helper

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    c1e4bd8 View commit details
    Browse the repository at this point in the history
  11. refactor(links): handle selection changes in plugin

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    96097aa View commit details
    Browse the repository at this point in the history
  12. refactor(links): use hideLinkBubble command for esc

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    4a3165b View commit details
    Browse the repository at this point in the history
  13. fix(links): simplify updateTooltip and handle active null

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    ed923f4 View commit details
    Browse the repository at this point in the history
  14. fix(links): remove special handling for clicked and focus

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    4bc7586 View commit details
    Browse the repository at this point in the history
  15. fix(links): handle esc in DOMEvents rather than prop

    The `handleKeyDown` prop does not work in read only mode.
    
    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    7fe10f9 View commit details
    Browse the repository at this point in the history
  16. fix(links) handle linkNodeFromSelection returning false

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d79b67c View commit details
    Browse the repository at this point in the history
  17. enh(links): close link bubble when opening preview toggle

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    4f5277e View commit details
    Browse the repository at this point in the history
  18. fix(lint): add missing jsdoc comments to new files

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    d582f38 View commit details
    Browse the repository at this point in the history
  19. docs(preview): improve jsdocs for markdownit preview plugin

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    322a752 View commit details
    Browse the repository at this point in the history
  20. refactor(links): only get mark from selection

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    8e78cb7 View commit details
    Browse the repository at this point in the history
  21. refactor(links): get active link from selection

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    385b246 View commit details
    Browse the repository at this point in the history
  22. fix(links): show bubble with cursor on the end of the link

    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    c2fd1e5 View commit details
    Browse the repository at this point in the history
  23. tests(links): ignore link bubble when reading link text

    The link bubble now also gets rendered
    when the cursor is behind the link.
    
    `cy.get` will always start at the root of the doc.
    So it also found the link inside the link bubble.
    Use `.find` on the content instead as the link bubble is outside of that.
    
    Signed-off-by: Max <max@nextcloud.com>
    max-nextcloud committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    fb0a8ce View commit details
    Browse the repository at this point in the history