Skip to content

GIF Search: Better results and codebase revamp#11887

Merged
thomaslombart merged 8 commits intomainfrom
gif-revamp
Apr 26, 2024
Merged

GIF Search: Better results and codebase revamp#11887
thomaslombart merged 8 commits intomainfrom
gif-revamp

Conversation

@thomaslombart
Copy link
Contributor

@thomaslombart thomaslombart commented Apr 19, 2024

Description

  • The extension now uses GIPHY Pro and Tenor v2 to have better GIF results
  • The codebase has largely been revamped to make it easier to maintain

Checklist

@thomaslombart thomaslombart self-assigned this Apr 19, 2024
@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: gif-search Issues related to the gif-search extension labels Apr 19, 2024
@raycastbot
Copy link
Collaborator

raycastbot commented Apr 19, 2024

Thank you for your contribution! 🎉

🔔 @josephschmitt @tmwrnr @j3lte @samuelkraft you might want to have a look.

@j3lte
Copy link
Contributor

j3lte commented Apr 19, 2024

@thomaslombart FYI, I still got a PR open for gif-search: #11794

Edit: closed my PR because of this PR

@thomaslombart thomaslombart marked this pull request as ready for review April 19, 2024 14:02
@thomaslombart
Copy link
Contributor Author

@j3lte Could you test out this PR and let me know if it fixes what you initially fixed? This PR is revamping the codebase to make it easier to understand and simpler to maintain while still adding some nice features like caching the results.

@thomaslombart thomaslombart changed the title GIF Search: Revamp GIF Search: Better results and codebase revamp Apr 19, 2024
@pernielsentikaer
Copy link
Collaborator

Wow @thomaslombart, that's a serious rewrite!

Do I need to do anything to get it working, I end up here as soon as I open the extension

gif-search 2024-04-22 at 13 58 37

FetchError: request to https://gif-search.raycast.com/api/giphy?limit=20&offset=20 failed, reason: connect ECONNREFUSED 127.0.0.1:9090
    at ClientRequest.<anonymous> (/Users/pernielsentikaer/.config/raycast/extensions/gif-search/search.js:23288:14)
    at ClientRequest.emit (node:events:526:35)
    at ClientRequest.emit (node:domain:488:12)
    at /Applications/Raycast.app/Contents/Resources/RaycastNodeExtensions_RaycastNodeExtensions.bundle/Contents/Resources/api/node_modules/@raycast/api/index.js:2:37408
    at Socket.<anonymous> (/Applications/Raycast.app/Contents/Resources/RaycastNodeExtensions_RaycastNodeExtensions.bundle/Contents/Resources/api/node_modules/@raycast/api/index.js:2:38379)
    at Socket.emit (node:events:514:28)
    at Socket.emit (node:domain:488:12)
    at emitErrorNT (node:internal/streams/destroy:151:8)
    at emitErrorCloseNT (node:internal/streams/destroy:116:3)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

@j3lte j3lte mentioned this pull request Apr 22, 2024
5 tasks
@thomaslombart
Copy link
Contributor Author

I can't reproduce it… Could you post a recording to better see what happens? Is it the same if you switch to the Tenor provider?

@j3lte
Copy link
Contributor

j3lte commented Apr 22, 2024

@thomaslombart if you look at the error reason: connect ECONNREFUSED 127.0.0.1:9090 that does not seem to be a problem in your extension, but the proxy server (https://gif-search.raycast.com/api/giphy) that it connects to. Maybe a temporary issue in your services?

Edit: works fine for me, so it might just have been a hiccup...

@pernielsentikaer
Copy link
Collaborator

I'm not sure what happened; it seems to be working much better now. I ensured that I could open the URL, so I don't know what caused it.

The search works SO much better than previous, well done @thomaslombart

@samuelkraft
Copy link
Contributor

Echoing this, great work @thomaslombart!

My only nit is regarding the empty states, on initial load we display a flickering empty state even for the services that automatically populates the list:
Sam 2024-04-23 at 8  47 25@2x

The empty state for when you get 0 hits on search is also the same generic one, instead of saying "No Results":
Sam 2024-04-23 at 8  54 24@2x

Copy link
Contributor

@josephschmitt josephschmitt left a comment

Choose a reason for hiding this comment

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

This is a big change, nice work @thomaslombart! I haven't been able to review every line contributed, but directionally this looks good to me and as long as it's well-tested I'm comfortable with it getting merged.

@thomaslombart thomaslombart merged commit c999bfc into main Apr 26, 2024
@thomaslombart thomaslombart deleted the gif-revamp branch April 26, 2024 10:00
@github-actions
Copy link
Contributor

Published to the Raycast Store:
https://raycast.com/josephschmitt/gif-search

@raycastbot
Copy link
Collaborator

🎉 🎉 🎉

We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: gif-search Issues related to the gif-search extension

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants