Skip to content

Conversation

@grnd-alt
Copy link
Member

@grnd-alt grnd-alt commented Apr 15, 2024

Fixes #5516

@grnd-alt grnd-alt linked an issue Apr 15, 2024 that may be closed by this pull request
@juliusknorr juliusknorr added bug Something isn't working 3. to review labels Apr 16, 2024
@juliusknorr juliusknorr added this to the Nextcloud 30 milestone Apr 16, 2024
@max-nextcloud
Copy link
Collaborator

The current change works well when only changing a single link in a paragraph.
There are two more scenarios that would be good to account for:

Link in a paragraph

Find more information on https://nextcloud.com as usual.

-> should only change the link.

Link with custom text

More informarion

-> should only change the href.

@max-nextcloud max-nextcloud self-assigned this Apr 17, 2024
@max-nextcloud max-nextcloud force-pushed the fix/5516-updating-the-url-of-a-link-via-toolbar-menu-splits-the-link branch 2 times, most recently from 10bfdeb to 35f1d07 Compare April 17, 2024 14:17
@skjnldsv skjnldsv mentioned this pull request Aug 22, 2024
44 tasks
@blizzz blizzz modified the milestones: Nextcloud 30, Nextcloud 31 Sep 4, 2024
@blizzz blizzz mentioned this pull request Jan 29, 2025
1 task
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025
Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

As I said earlier... this will not work if the link is not the only thing in a paragraph.

@grnd-alt would you be up for picking this up again?

@max-nextcloud max-nextcloud removed their assignment Feb 3, 2025
@codecov
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

Attention: Patch coverage is 93.18182% with 3 lines in your changes missing coverage. Please review.

Project coverage is 51.90%. Comparing base (bc0916a) to head (08a528b).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
src/marks/Link.js 95.34% 2 Missing ⚠️
src/components/Menu/ActionInsertLink.vue 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5690      +/-   ##
==========================================
+ Coverage   51.84%   51.90%   +0.06%     
==========================================
  Files         475      475              
  Lines       40132    40157      +25     
  Branches      983      989       +6     
==========================================
+ Hits        20805    20845      +40     
+ Misses      19222    19207      -15     
  Partials      105      105              

☔ 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.

@grnd-alt grnd-alt force-pushed the fix/5516-updating-the-url-of-a-link-via-toolbar-menu-splits-the-link branch 2 times, most recently from d52b7f4 to e8281df Compare February 12, 2025 11:00
Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

Looks good. Just one small remark about the test code.

@grnd-alt grnd-alt force-pushed the fix/5516-updating-the-url-of-a-link-via-toolbar-menu-splits-the-link branch from e8281df to 3db7595 Compare February 13, 2025 09:15
@grnd-alt grnd-alt force-pushed the fix/5516-updating-the-url-of-a-link-via-toolbar-menu-splits-the-link branch from 3db7595 to a333bb3 Compare February 13, 2025 09:43
@grnd-alt grnd-alt force-pushed the fix/5516-updating-the-url-of-a-link-via-toolbar-menu-splits-the-link branch from a333bb3 to 1813f94 Compare March 7, 2025 09:36
@juliusknorr
Copy link
Member

Warning: Failed to restore: getCacheEntry failed: Cache service responded with 500

Looked odd, restarted cypress

@grnd-alt grnd-alt moved this from 🏗️ In progress to 👀 In review in 📝 Office team Mar 12, 2025
Copy link
Collaborator

@max-nextcloud max-nextcloud left a comment

Choose a reason for hiding this comment

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

Just a minor comment. Other than that seems good code wise. Have not tested it though.

Comment on lines 81 to 43
it('should insert new link if none at anchor', () => {
const editor = createCustomEditor(
'<p><a href="nextcloud.com">Test</a> HELLO WORLD</p>',
[Link],
)
editor.commands.setTextSelection(10)
expect(editor.getJSON()).toEqual({
content: [
{
content: [
{
marks: [
{ attrs: { href: 'nextcloud.com', title: null }, type: 'link' },
],
text: 'Test',
type: 'text',
},
{ text: ' HELLO WORLD', type: 'text' },
],
type: 'paragraph',
},
],
type: 'doc',
})
})
Copy link
Collaborator

Choose a reason for hiding this comment

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

This test seems incomplete. It does not change anything but just asserts the initial state.

@grnd-alt grnd-alt force-pushed the fix/5516-updating-the-url-of-a-link-via-toolbar-menu-splits-the-link branch from 139fce4 to 08a528b Compare March 19, 2025 12:50
@max-nextcloud
Copy link
Collaborator

Failing psalm test is unrelated. I'd be okay with force merging.

@grnd-alt grnd-alt merged commit 6e2892d into main Mar 20, 2025
63 of 64 checks passed
@grnd-alt grnd-alt deleted the fix/5516-updating-the-url-of-a-link-via-toolbar-menu-splits-the-link branch March 20, 2025 07:57
@github-project-automation github-project-automation bot moved this from 👀 In review to ☑️ Done in 📝 Office team Mar 20, 2025
@skjnldsv skjnldsv modified the milestones: Nextcloud 32, Nextcloud 33 Sep 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2. developing bug Something isn't working

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Updating the URL of a link via toolbar menu splits the link

6 participants