Skip to content

Conversation

@mejo-
Copy link
Member

@mejo- mejo- commented Jul 23, 2025

📝 Summary

  • fix(PreviewOptions): Pass href, so "open in new tab" option is displayed
  • fix(img): Remove global CSS rules for images in prosemirror
  • fix(links): Add open button to link bubble
  • fix(LinkBubble): Read editor.contentComponent when it's ready
  • enh(editorAPI): Allow to pass an openLinkHandler to editor
  • fix(LinkBubble): Fix preview border overflowing link bubble
  • Resolves: Add "open" as option in link popup collectives#1226

Screenshots

🏚️ Before 🏡 after
image image
image image

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests

@mejo- mejo- self-assigned this Jul 23, 2025
@mejo- mejo- requested a review from max-nextcloud as a code owner July 23, 2025 15:00
@mejo- mejo- added bug Something isn't working 3. to review feature: links labels Jul 23, 2025
@codecov
Copy link

codecov bot commented Jul 23, 2025

Codecov Report

Attention: Patch coverage is 50.94340% with 26 lines in your changes missing coverage. Please review.

Project coverage is 59.75%. Comparing base (9a52cdf) to head (5af2245).

Files with missing lines Patch % Lines
src/helpers/links.js 35.29% 11 Missing ⚠️
src/plugins/LinkBubblePluginView.js 12.50% 7 Missing ⚠️
src/editor.js 0.00% 5 Missing ⚠️
src/components/Link/LinkBubbleView.vue 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7474      +/-   ##
==========================================
+ Coverage   59.72%   59.75%   +0.02%     
==========================================
  Files         495      495              
  Lines       37725    37824      +99     
  Branches     1090     1090              
==========================================
+ Hits        22531    22600      +69     
- Misses      15087    15117      +30     
  Partials      107      107              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

mejo- added 6 commits July 23, 2025 17:10
We have a custom node for displaying images anyway.

This fixes the cursor being a pointer in the preview images of preview
links.

Signed-off-by: Jonas <[email protected]>
When initiating the editor extensions (i.e. in `addProseMirrorPlugins()`),
`editor.contentComponent` is not yet available. So let's read it when we
actually use it, when creating the tooltip in `LinkBubblePluginView`.

Before, a new Vue instance was initiated for each `LinkBubbleView.vue`
as the `parent` given to `VueRenderer()` was `undefined`. With this fix,
`LinkBubbleView.vue` becomes a child component of the root editor Vue
instance.

Signed-off-by: Jonas <[email protected]>
type="tertiary"
@click="openLink(href)">
<template #icon>
<OpenInNewIcon :size="20" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

I looked for a different icon briefly as this does not always open in new... but i found nothing satisfying.

@mejo-
Copy link
Member Author

mejo- commented Jul 23, 2025

/backport to stable31

@mejo-
Copy link
Member Author

mejo- commented Jul 23, 2025

/backport to stable30

@mejo- mejo- merged commit db92559 into main Jul 23, 2025
64 checks passed
@mejo- mejo- deleted the fix/link_fixes branch July 23, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "open" as option in link popup

3 participants