Skip to content

fix(ViewerComponent): use MarkdownContentEditor for readonly views#6268

Merged
mejo- merged 1 commit into
mainfrom
fix/viewer_attachments_read_only
Aug 27, 2024
Merged

fix(ViewerComponent): use MarkdownContentEditor for readonly views#6268
mejo- merged 1 commit into
mainfrom
fix/viewer_attachments_read_only

Conversation

@mejo-

@mejo- mejo- commented Aug 27, 2024

Copy link
Copy Markdown
Member

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
Copy Markdown
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 <jonas@freesources.org>
@mejo-
mejo- force-pushed the fix/viewer_attachments_read_only branch from e8372b3 to 58c458e Compare August 27, 2024 14:48
@mejo-

mejo- commented Aug 27, 2024

Copy link
Copy Markdown
Member Author

cypress failure seems related:

Indeed, fixed now.

@mejo-

mejo- commented Aug 27, 2024

Copy link
Copy Markdown
Member Author

/backport to stable30

@mejo-
mejo- merged commit ef3995a into main Aug 27, 2024
@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