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

Use devcontainer with php v8.2 and readd preview images to tables #1393

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"image": "ghcr.io/juliushaertl/nextcloud-dev-php80:latest",
"image": "ghcr.io/juliushaertl/nextcloud-dev-php82:latest",
"forwardPorts": [80],
"containerEnv": {
"NEXTCLOUD_AUTOINSTALL_APPS": "tables",
Expand Down
2 changes: 2 additions & 0 deletions lib/Service/ColumnTypes/TextLinkBusiness.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Copy link
Contributor

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

Copy link
Author

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 (?).

'icon' => $data['icon'],
'title' => $data['title'] ?? $data['resourceUrl'],
'value' => $data['resourceUrl'],
'providerId' => 'url',
Expand Down
Loading