-
Notifications
You must be signed in to change notification settings - Fork 94
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: open non-image attachment #3924
Conversation
Thanks for looking into this @luka-nextcloud. From the screenshot I wonder why you changed the layout of non-image attachments? I think we should preserve the way they were rendered before, no? |
@luka-nextcloud I would have envisioned a simple Lines 36 to 48 in 25f2f5f
Additionally, the registered |
79ac9d4
to
d07bfd1
Compare
Actually, I didn't change the layout, this layout for non-image was already there at the beginning. It wasn't shown before because of some missing data (mime type of file was missing before). I just fixed it. |
I think it's already done here. Please check: https://github.com/nextcloud/text/blob/main/src/nodes/ImageView.vue#L108 |
@luka-nextcloud I think there's a missunderstanding here. To my understanding, the following block is used for attachments that have a set, but unsupported mimetype: Lines 105 to 123 in dd0f826
I would like to continue using the following block for media attachments (non-image attachments) instead (where it's rendered properly as attachment node), just making this node a link to the files URL of the attachment: Lines 36 to 59 in dd0f826
|
d07bfd1
to
f9fab12
Compare
@mejo- Could you please check again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looks better already but still I think most of your changes are not necessary 😉
Also, could you squash all commits in the PR into one?
f9fab12
to
0d1ccb5
Compare
Signed-off-by: Luka Trovic <[email protected]>
0d1ccb5
to
7e1e84a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @luka-nextcloud. I think that the PR has to wait until #3974 got resolved.
As said, the option to inject fileId
as query param to the markdown in insertAttachment()
of MediaHandler.vue
brings several problems and should be avoided in my eyes:
- It doesn't work for attachments that were uploaded prior to this PR.
- It will break whenever the text document gets copied - fileIds of the attachments will change in that case.
- It will not work for attachments that got inserted manually (arguably neglectable though)
For attachments already saved before, there is no way to detect it's fileId. The saved content before will look like this.
Not sure what it means...
|
Hey @luka-nextcloud,
Exactly, and that's why I suggested to update the logic of
I mean the following: create a Text document and add an attachment. Then you will have the attachment |
@ralfrupf1976 we're working on a proper fix for this. It can take a bit though because it requires bigger internal code changes. |
📝 Summary
🖼️ Screenshots
🚧 TODO
🏁 Checklist
npm run lint
/npm run stylelint
/composer run cs:check
)