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 internal links in direct-edit sessions #3442

Merged
merged 2 commits into from
Feb 27, 2023

Conversation

Raudius
Copy link
Contributor

@Raudius Raudius commented Nov 17, 2022

📝 Summary

Internal links previously relied on OCA.Viewer to fetch the relative path of the document. In direct-edit sessions OCA.Viewer is not set.

This PR adds a check for OCA.Viewer before handling internal links.

🏁 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
  • Documentation (README or documentation) has been updated or is not required

@Raudius Raudius added bug Something isn't working 3. to review labels Nov 17, 2022
@cypress
Copy link

cypress bot commented Nov 17, 2022



Test summary

105 1 0 0Flakiness 0


Run details

Project Text
Status Failed
Commit e30bbf3 ℹ️
Started Nov 17, 2022 12:03 PM
Ended Nov 17, 2022 12:10 PM
Duration 06:24 💡
OS Linux Ubuntu -
Browser Electron 106

View run in Cypress Dashboard ➡️


Failures

cypress/e2e/sections.spec.js Failed
1 Content Sections > Heading anchors > Anchor scrolls into view

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard

@juliusknorr juliusknorr force-pushed the fix/direct_edit/internal_link branch from 487ac9c to 0b1ef07 Compare December 22, 2022 09:26
@cypress
Copy link

cypress bot commented Dec 22, 2022

2 flaky tests on run #8762 ↗︎

0 137 0 0 Flakiness 2

Details:

Fix internal links in direct-edit sessions
Project: Text Commit: 2ff4f17202
Status: Passed Duration: 03:16 💡
Started: Feb 27, 2023 9:37 PM Ended: Feb 27, 2023 9:40 PM
Flakiness  sync.spec.js • 1 flaky test

View Output Video

Test
Save > saves the actual file and document state Screenshot
Flakiness  viewer.spec.js • 1 flaky test

View Output Video

Test
Open test.md in viewer > Closes the editor Screenshot

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@juliusknorr
Copy link
Member

Cypress failures are unrelated. Will push a fix for a recent server change shortly.

@juliusknorr
Copy link
Member

Fix in nextcloud/server#35866

@juliusknorr juliusknorr force-pushed the fix/direct_edit/internal_link branch from 0b1ef07 to 0c2dcdf Compare December 22, 2022 14:45
@max-nextcloud max-nextcloud force-pushed the fix/direct_edit/internal_link branch from 0c2dcdf to 2c66901 Compare December 30, 2022 11:14
@max-nextcloud
Copy link
Collaborator

I tried to create a cypress test for this here: https://github.com/nextcloud/text/tree/test/direct-editing-with-link

But the test won't fail even with the current master. So i am obviously failing to understand somethign about the underlying problem. Could you take a look at the test and check what i am missing?

@mejo-
Copy link
Member

mejo- commented Feb 24, 2023

@juliushaertl is this PR still ready to be merged? Since you approved it earlier, is there a reason not to merge it?

@mejo- mejo- force-pushed the fix/direct_edit/internal_link branch from 2c66901 to f350fcf Compare February 24, 2023 20:31
@mejo- mejo- force-pushed the fix/direct_edit/internal_link branch from f350fcf to 9957d99 Compare February 27, 2023 19:39
@juliusknorr
Copy link
Member

/compile

Signed-off-by: nextcloud-command <[email protected]>
@juliusknorr
Copy link
Member

Nothing blocking from my side, let's get this in

@juliusknorr juliusknorr merged commit 0ba88c0 into main Feb 27, 2023
@juliusknorr juliusknorr deleted the fix/direct_edit/internal_link branch February 27, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Direct editing breaks with internal links
5 participants