Uh oh!
There was an error while loading. Please reload this page.
fix: open non-image attachment - #3924
Conversation
mejo-
commented
Mar 10, 2023
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? |
mejo-
commented
Mar 10, 2023
@luka-nextcloud I would have envisioned a simple Lines 36 to 48 in 25f2f5f Additionally, the registered |
79ac9d4 to
d07bfd1Compareluka-nextcloud
commented
Mar 13, 2023
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. |
luka-nextcloud
commented
Mar 14, 2023
I think it's already done here. Please check: https://github.com/nextcloud/text/blob/main/src/nodes/ImageView.vue#L108 |
mejo-
commented
Mar 14, 2023
@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
f9fab12Compareluka-nextcloud
commented
Mar 14, 2023
@mejo- Could you please check again? |
Uh oh!
There was an error while loading. Please reload this page.
mejo-
left a comment
There was a problem hiding this comment.
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?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
f9fab12 to
0d1ccb5CompareSigned-off-by: Luka Trovic <luka@nextcloud.com>
0d1ccb5 to
7e1e84aCompare
mejo-
left a comment
There was a problem hiding this comment.
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...
|
mejo-
commented
Apr 11, 2023
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
commented
Nov 13, 2023
mejo-
commented
Nov 13, 2023
@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)