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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

fix: use actual providerId in link rows #1443

wants to merge 1 commit into from

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

Signed-off-by: Cleopatra Enjeck M <patrathewhiz@gmail.com>
@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

@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.

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: 🧭 Planning evaluation (don't pick)
Development

Successfully merging this pull request may close these issues.

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