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

fix: use actual providerId in link rows #1443

Merged
merged 1 commit into from
Dec 10, 2024
Merged

fix: use actual providerId in link rows #1443

merged 1 commit into from
Dec 10, 2024

Conversation

enjeck
Copy link
Contributor

@enjeck enjeck commented Nov 7, 2024

fixes #1442

Before

Screencast.from.11-07-2024.03_32_38.AM.mp4

After

Screencast.from.11-07-2024.03_31_51.AM.mp4

TODO:

  • check that other provider links also work

@enjeck enjeck added the 3. to review Waiting for reviews label Nov 7, 2024
@enjeck enjeck self-assigned this Nov 7, 2024
@@ -38,7 +38,7 @@ public function parseValue($value, ?Column $column = null): string {
return json_encode(json_encode([
'title' => $data['title'] ?? $data['resourceUrl'],
'value' => $data['resourceUrl'],
'providerId' => 'url',
'providerId' => isset($data['providerId']) ? $data['providerId'] : 'url',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dunno if there's a reason why 'url' was hardcoded here instead of just using the providerId like this 🤔

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Originates from #779

Does line 30 needs treatment as well?

Shorthand should also do:

Suggested change
'providerId' => isset($data['providerId']) ? $data['providerId'] : 'url',
'providerId' => $data['providerId'] ?? 'url',

Copy link
Contributor Author

@enjeck enjeck Dec 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does line 30 needs treatment as well?

Not sure about both line 30 and 61, since the indices are numeric not strings

Copy link

@whaever whaever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me.

@enjeck enjeck force-pushed the fix/1442 branch 2 times, most recently from 1e5e49a to 8b198be Compare December 9, 2024 20:00
@enjeck
Copy link
Contributor Author

enjeck commented Dec 9, 2024

Tested with Notes, Tables and Files links and it works

Signed-off-by: Cleopatra Enjeck M. <patrathewhiz@gmail.com>
@blizzz blizzz merged commit 1a9f747 into main Dec 10, 2024
63 checks passed
@blizzz blizzz deleted the fix/1442 branch December 10, 2024 10:27
@blizzz
Copy link
Member

blizzz commented Dec 10, 2024

/backport to stable0.8

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Dec 10, 2024
@backportbot backportbot bot removed the backport-request Pending backport by the backport-bot label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
Status: ☑️ Done
Development

Successfully merging this pull request may close these issues.

Link to note disappears after re-editing table row
3 participants