-
Notifications
You must be signed in to change notification settings - Fork 25
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
Use devcontainer with php v8.2 and readd preview images to tables #1393
Conversation
1aa7c66
to
d4018ed
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!
@@ -36,6 +36,8 @@ public function parseValue($value, ?Column $column = null): string { | |||
if($data !== null) { | |||
if (isset($data['resourceUrl'])) { | |||
return json_encode(json_encode([ | |||
'thumbnailUrl' => $data['thumbnailUrl'], |
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.
I notice that it works for newly created image links, but pre-existing links do not show the previews. But we could handle this in a separate PR
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.
You're right the change only affects new links because it seems that since this two lines have been missing every link written to the database lacks of a thumbnailUrl
(at least in the last versions of tables)... So solving that would maybe need some lookup for links without a thumbnailUrl
and then generating / searching the correct one (?).
Hi, |
There's a failing test: https://github.com/nextcloud/tables/actions/runs/11084225046/job/30817689205?pr=1393. Since we changed added more array keys in the code, we'll need to add them to the tests as well at |
Thanks a lot for your answer, I will try to solve this if I can :-)
Am 7. Oktober 2024 20:33:22 MESZ schrieb Cleopatra ***@***.***>:
…> Hi, please excuse my question, but do I have to do something else to push forward the PR?
There's a failing test: https://github.com/nextcloud/tables/actions/runs/11084225046/job/30817689205?pr=1393. Since we changed added more array keys in the code, we'll need to add them to the tests as well at `tests/unit/Service/ColumnTypes/TextLinkBusinessTest.php` too. I'm not yet sure what the right `thumbnailUrl` and `icon` values that would make the tests pass
--
Reply to this email directly or view it on GitHub:
#1393 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
Hi @enjeck , I tried my best to make the phpunit tests work again but I have to admit that I didn't had much knowledge about this tests before. I've read the documentation and I think that my corrections should be correct as after my changes But as said: I hope this is correct and I didn't have done something stupid 🙂 |
I would like to add something that is connected with this PR although this was not introduced by my commits but was always a way Tables saved the links to the preview images in
For internal links to files inside Nextcloud this works but seams to get broken if for example the subdomain or port of the Nextcloud changes - afterwards all links inside thumbnailUrl that worked before get invalid and point to a non existing url...
|
This is a great observation, thanks for pointing it out. I notice that even the
We could have gotten away with only saving the file id (the number after I just realized that we don't need to store the additional |
@MI-KY Do you want to continue working on this or should I take over? I realize it'll require more discussions and changes that you might not have bandwidth for. Either way, I think we should split this PR up, since it's solving multiple issues. Then we can get the devcontainer fix (2e3089b) merged in and continue with the image previews separately. |
Honestly I think that The idea with getting the thumbnail using the I'm happy if you take over because I'm new to Nextcloud development and therefore maybe this is getting a bit to big for me at the moment 👍 🙂 . |
Another good point that I didn't consider. I'd have to check, thanks! |
@MI-KY Hmm, I tried to split this up, but it seems like I can't make changes to your branch. Can you please remove every commit except the first (2e3089b) which fixes the devcontainer so that I can merge that? Then I will copy the other changes to a new PR and continue from there. If removing commits it too complicated, then I can just close this and copy everything to separate PRs instead |
Hi @enjeck , |
Modified the
devcontainer.json
to use a container with php v8.2 .Readded
thumbnailUrl
andicon
so that this data is not dropped anymore when a url to for example an image is saved. I hope this was not intentionally removed by #779 but the result seems to be that actually no preview is shown...Sorry, I wanted to create two PRs but I had some problems because of DCO and I'm not used to this 🙂
Resolves #1392
Resolves #1375