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(ViewerComponent): use MarkdownContentEditor for readonly views #6268

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

mejo-
Copy link
Member

@mejo- mejo- commented Aug 27, 2024

Also pass the fileId to the component. This adds support for displaying images and attachments in the read-only view.

Fixes: #6267

I tested this PR with

  • Text in Text (via preview link) in Viewer
  • Text in Talk (via preview link)
  • Text in Collectives (both view and edit mode)

The editor CSS includes (prosemirror.css and print.css) were missing in MarkdownContentEditor, which resulted in broken view in Talk - probably because that was the only scenario where no second editor was loaded that the same time.

🖼️ Screenshots

🏚️ Before 🏡 After
grafik grafik

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits

@mejo- mejo- added bug Something isn't working 3. to review feature: embed labels Aug 27, 2024
@mejo- mejo- requested a review from juliusknorr August 27, 2024 12:21
@mejo- mejo- self-assigned this Aug 27, 2024
@juliusknorr
Copy link
Member

cypress failure seems related:

  1) Versions
       View versions with close timestamps:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.viewer__content #read-only-editor`, but never found it.
      at Context.eval (http://localhost:8081/__cypress/tests?p=cypress/e2e/versions.spec.js:104:12)

  2) Versions
       View versions:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.viewer__content #read-only-editor`, but never found it.
      at Context.eval (http://localhost:8081/__cypress/tests?p=cypress/e2e/versions.spec.js:123:12)

  3) Versions
       Compare versions:
     AssertionError: Timed out retrying after 10000ms: Expected to find element: `.viewer__content #read-only-editor`, but never found it.
      at Context.eval (http://localhost:8081/__cypress/tests?p=cypress/e2e/versions.spec.js:144:12)

@mejo- mejo- force-pushed the fix/viewer_attachments_read_only branch from a853705 to e8372b3 Compare August 27, 2024 14:14
Also pass the `fileId` to the component. This adds support for
displaying images and attachments in the read-only view.

Fixes: #6267

Signed-off-by: Jonas <[email protected]>
@mejo- mejo- force-pushed the fix/viewer_attachments_read_only branch from e8372b3 to 58c458e Compare August 27, 2024 14:48
@mejo-
Copy link
Member Author

mejo- commented Aug 27, 2024

cypress failure seems related:

Indeed, fixed now.

@mejo-
Copy link
Member Author

mejo- commented Aug 27, 2024

/backport to stable30

@mejo- mejo- merged commit ef3995a into main Aug 27, 2024
59 of 61 checks passed
@mejo- mejo- deleted the fix/viewer_attachments_read_only branch August 27, 2024 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Embedded editor in preview mode via NcReferenceWidget doesn't support attachments
2 participants