-
-
Notifications
You must be signed in to change notification settings - Fork 829
Giphy integration #5814
Giphy integration #5814
Conversation
create a new menu in MessageComposer, next to emoji picker and sticker picker consume the Giphy API display the GIF search results in an one-column list add option in settings for showing the GIF picker
First off, this is awesome :D Fixes #415
I am pretty sure that will be required |
add showConfirmationDialogs option to sendContentListToRoom so we can use the same function for directly uploading GIFs without displaying a confirmation dialog every time
add translations show mp4 version in preview, for smaller file sizes better handling for throttling requests and lazy loading list cancel promises on unmount
Why is this in I think there's a bit of a separation-of-concerns issue here. |
Hmm, it's a bit unclear perhaps. I think we should first review the product fit here, and from there we can work out the proper home for the code. |
This wouldn't match the current design... So if this change were to be implemented, it should in bulk with emojis and stickers. This is ultimately up to the design team to decide. I remember there being an issue about this, but I can't find it |
There is this issue element-hq/element-web#16180 and this one element-hq/element-web#2693 (comment) If we keep it like it is right now (without the sidebar), we can also make the popup panel bigger and have two columns of gifs. |
nice feature ! can't wait to get it integrated ! |
import { DebouncedFunc, throttle, uniqBy } from "lodash"; | ||
import { Gif } from "./Gif"; | ||
|
||
const API_KEY = "hhMBhTnD7k8BgyoZCM9UNM1vRsPcgzaC"; |
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.
This probably shouldn't be checked into git.
Unrelated though, this work is amazing :)
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!
This is a public key so it is not a security issue, as the request will be done client-side and anyone can inspect it.
Giphy/giphy-js#120 (comment)
If this is approved by the product team a production key is needed in order to increase the limits by Giphy.
Removing review as PR is a draft |
@t3chguy this needs feedback by the product team in order to continue development, so should I mark it as ready for review? |
I will wait for feedback, then, before proceeding with improvements because the feature may not be desired in this place in the codebase. |
If this hits product then please
Reason is that animated gifs are utterly distracting, easily get on the nerves and unnecessarily consume CPU and power . Additionally, Giphy is privacy invading as the client's IP and search ends up with Facebook that as we all know will collect everything it can get its hands on. I actually wish this will never get implemented. |
Tell me you're a toxic dev without telling me you're a toxic dev. |
@panoschal can you fix the conflicts PLZ :) I wanne use this in my Fork |
I fixed the conflicts @DoM1niC |
Nice and THX I will try it out soon 😊😊 |
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 for the PR! This is quite a large chunk of functionality that, as you noted, needs design + product review. I'm mostly leaving this comment to clear the automatic code review request that github will insist on while we wait for review (given code review on something this size before design looks at it can be detrimental to progress).
Something I did notice is that the new files are missing copyright/license headers - these should be added to ensure everything is all squared away :)
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.
Hi there, thank you for your work on this!
I have reviewed it and would like to propose the following changes available on Figma here https://www.figma.com/file/ifIvZA4XIP1JTyndHFr5Ub/?node-id=10%3A7689
I have added behaviour specs for you but if you have any additional question, just ping me here and I'll get back to you.
Great, I will try to implement these improvements soon. |
needs threads support the Composer isn't upload the gif there... :( update the fully Merge is broken after last Commits in ContentMessages.tsx |
Just tested, I like the uploading feature, and would also second the two-column lay-out. |
Rather than including the giphy api key in the code, this should be something users can fill in, or a config value pulled from the element-web config.json. If the value is not supplied, the feature should be hidden/nonfunctional. |
What's the status of this integration? Just throwing this out into the ether...how about selectable support for other gif platforms?
Beyond tenor, this could address privacy concerns for some? |
Hi, Any news on this awesome integration ready to fly? Thanks! |
Hi, https://github.com/iceHtwoO/matrix-react-sdk/tree/feature/gifpicker_integration |
Hello, @gaelledel you mentioned that there were technical considerations around this, did you have any update?
|
Thank you for working on this, however per element-hq/element-meta#321 (comment) I don't think we can safely keep this sort of change open. The feature requires design and product review and is generally quite large in size - we might try to take the work on ourselves if/when product/design get a chance to take a look. |
I conviced my family to switch to a Matrix homeserver and Element, and their first question was "how do I send GIFs?" |
Did this ever get anywhere? Or has it become a wasteland where PRs go to die? |
This is sadly going no where, you can find more information in the following issue. There have been multiple attempts to integrate the feature. |
Anyone know of any Matrix client that has giphy integration? |
First of all, this needs a lot of input from product and design.
Fixes element-hq/element-meta#321 !
Flow
I created a new button in MessageComposer, next to the emoji picker and the sticker picker.
I consume the Giphy API for search results, which should be better than the SDK due to privacy concerns, and possible changes in the future.
I display the GIF search results in an one-column list.
I added an option in labs for showing the GIF picker.
I send the GIF as an attachment. Another option is to just send the url, but previews generated by the server have some issues currently and it doesn't work: matrix-org/synapse#1278
TODO
PR for documentation in labs.md: element-hq/element-web#16808
Related issue: element-hq/element-web#2693
Signed-off-by: Panagiotis Chalimourdas [email protected]
Here's what your changelog entry will look like:
✨ Features
Preview: https://613dd49f7161e91e7bfbfbbf--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.