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

feat: Support unfurl images #11940

Merged
merged 1 commit into from
Aug 22, 2023
Merged

Conversation

igor-sirotin
Copy link
Contributor

@igor-sirotin igor-sirotin commented Aug 18, 2023

Closes #11634
Requires status-im/status-go#3901

What does the PR do

This PR adds support for new type property of link preview.
Image URLs are now unfurled again 🪄

Some bad news

  1. Unfortunately, this doesn't yet support GIF unfurling. I've opened a separate issue to track this:
  2. I was planning to update the image context menu to add Copy/Open Link instead of Copy/Download Image.
    But currently StatusImageModal is taking a whole Image component as an argument, so there's no "good" way of passing the link as well. This might require some refactoring. For now the URL in the text itself can still be clicked.

Affected areas

Chat URL previews

Screenshot of functionality (including design for comparison)

Screen.Recording.2023-08-18.at.13.23.20.mov

@status-im-auto
Copy link
Member

status-im-auto commented Aug 18, 2023

Jenkins Builds

Click to see older builds (7)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f7da81c #1 2023-08-18 10:30:02 ~5 min tests/imports 📄log
✔️ f7da81c #1 2023-08-18 10:30:27 ~5 min tests/nim 📄log
✔️ f7da81c #1 2023-08-18 10:35:03 ~10 min macos/x86_64 🍎dmg
✔️ f7da81c #1 2023-08-18 10:36:51 ~12 min macos/aarch64 🍎dmg
✔️ f7da81c #1 2023-08-18 10:43:24 ~18 min linux/x86_64 📦tgz
✖️ f7da81c #1 2023-08-18 10:58:31 ~33 min tests/e2e 📄log
✔️ f7da81c #1 2023-08-18 11:02:16 ~37 min windows/x86_64 💿exe
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 16b664e #3 2023-08-21 16:57:57 ~4 min tests/imports 📄log
✔️ 16b664e #3 2023-08-21 16:59:33 ~6 min tests/nim 📄log
✔️ 16b664e #3 2023-08-21 17:02:27 ~9 min macos/x86_64 🍎dmg
✔️ 16b664e #3 2023-08-21 17:03:21 ~10 min macos/aarch64 🍎dmg
✔️ 16b664e #3 2023-08-21 17:10:07 ~17 min linux/x86_64 📦tgz
✔️ 16b664e #3 2023-08-21 17:18:34 ~25 min windows/x86_64 💿exe
✔️ 16b664e #3 2023-08-21 17:24:20 ~31 min tests/e2e 📄log
✔️ 0c4d5b4 #4 2023-08-21 20:05:10 ~4 min tests/imports 📄log
✔️ 0c4d5b4 #4 2023-08-21 20:05:47 ~5 min tests/nim 📄log
✔️ 0c4d5b4 #4 2023-08-21 20:06:07 ~5 min macos/aarch64 🍎dmg
✔️ 0c4d5b4 #4 2023-08-21 20:09:14 ~8 min macos/x86_64 🍎dmg
✔️ 0c4d5b4 #4 2023-08-21 20:14:39 ~14 min linux/x86_64 📦tgz
✔️ 0c4d5b4 #4 2023-08-21 20:29:51 ~29 min tests/e2e 📄log

Copy link
Member

@jrainville jrainville left a comment

Choose a reason for hiding this comment

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

LGTM.

Any chance that we could support the old way of unfurling Gifs and Status Links until it is supported on status-go? We still have the settings so it shouldn't be a privacy issue.

Hopefully, it's just a Loader with a simple condition to use an old component instead?

@igor-sirotin
Copy link
Contributor Author

LGTM.

Any chance that we could support the old way of unfurling Gifs and Status Links until it is supported on status-go? We still have the settings so it shouldn't be a privacy issue.

Hopefully, it's just a Loader with a simple condition to use an old component instead?

I think it should be possible. I haven't yet dropped the old code 🫣

Will try to reincarnate that in a separate PR.

@igor-sirotin igor-sirotin force-pushed the feat/issue-11634-unfurl-images branch from 13ac28d to 16b664e Compare August 21, 2023 16:52
@igor-sirotin
Copy link
Contributor Author

igor-sirotin commented Aug 21, 2023

Any chance that we could support the old way of unfurling Gifs and Status Links until it is supported on status-go?

#11977

Copy link
Contributor

@alexjba alexjba left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@igor-sirotin igor-sirotin merged commit 3560786 into master Aug 22, 2023
@igor-sirotin igor-sirotin deleted the feat/issue-11634-unfurl-images branch August 22, 2023 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support new link previews for image links
4 participants