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

Link bubble menu to preview and edit links #5158

Merged
merged 15 commits into from
Jan 30, 2024
Merged

Commits on Jan 30, 2024

  1. feat(editor): Add link view bubble to preview, edit and open links

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    f750a82 View commit details
    Browse the repository at this point in the history
  2. feat(paragraph): Don't show link previews

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    d14558b View commit details
    Browse the repository at this point in the history
  3. refactor(link): Improve readability of clickHandler function

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    da24829 View commit details
    Browse the repository at this point in the history
  4. refactor(RichText): remove option to disable Link extension

    This option is not used anyway. We always use the Link extension.
    
    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    df2e5c3 View commit details
    Browse the repository at this point in the history
  5. feat(editor): Refactor link click handlers

    New link click behaviour:
    * Link left clicks without Ctrl/Meta open link bubble (Fixes: #3691)
    * Link left clicks with Ctrl/Meta open link in new tab
    * Link middle clicks open link in new tab
    * Link middle clicks on Linux don't paste content (Fixes: #2198)
    * No more custom open link handler in editor
    
    Implementation details:
    * Moved link click handler plugins back into Link mark class.
    * Added 'data-md-href' attribute to a-elements in DOM, to be used in
      onClick handlers.
    
    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    bbee8a0 View commit details
    Browse the repository at this point in the history
  6. fix(LinkBubble): Prevent update race condition in read-only in Chrome

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    dc13b01 View commit details
    Browse the repository at this point in the history
  7. chore(LinkBubble): Remove code to customize link click handling

    We no longer allow custom link click handlers in Text. Instead, the
    reference widgets for link previews have to implement their own click
    handlers.
    
    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    648cf20 View commit details
    Browse the repository at this point in the history
  8. test(cypress): Fix link tests with link bubble

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9a81916 View commit details
    Browse the repository at this point in the history
  9. fix(LinkBubble): Use private variables for LinkBubbblePluginView class

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    3702138 View commit details
    Browse the repository at this point in the history
  10. fix(LinkBubble): Restore selection after updating the link

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    9f7da38 View commit details
    Browse the repository at this point in the history
  11. fix(LinkBubble): Improved blur event handler registration

    * Clicking outside the bubble always hides it
    * Clicking inside the bubble never hides it
    
    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    07217ad View commit details
    Browse the repository at this point in the history
  12. fix(Link): Don't open link bubble for anchor links, jump to anchor di…

    …rectly
    
    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    60c1711 View commit details
    Browse the repository at this point in the history
  13. fix(LinkBubble): Allow to close link bubble with Escape

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    a5911b8 View commit details
    Browse the repository at this point in the history
  14. fix(LinkBubble): Hide bubble after 100ms delay

    Should allow Cypress to click on it before blur event happens.
    
    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    aa673ab View commit details
    Browse the repository at this point in the history
  15. fix(LinkBubble): Add some padding and border radius

    Signed-off-by: Jonas <jonas@freesources.org>
    mejo- committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    b73181a View commit details
    Browse the repository at this point in the history