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

Bug: Raycast Extension not showing all links (need pagination) #1597

Open
steven-tey opened this issue Oct 21, 2024 · 15 comments
Open

Bug: Raycast Extension not showing all links (need pagination) #1597

steven-tey opened this issue Oct 21, 2024 · 15 comments

Comments

@steven-tey
Copy link
Collaborator

More details here: raycast/extensions#14198

Copy link

linear bot commented Oct 21, 2024

@DeepaPrasanna
Copy link

/assign

Copy link

oss-gg bot commented Oct 22, 2024

Assigned to @DeepaPrasanna! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

@naaa760
Copy link

naaa760 commented Oct 22, 2024

/assign

Copy link

oss-gg bot commented Oct 22, 2024

This issue is already assigned to another person. Please find more issues here.

@Kartikey1306
Copy link

/assign

Copy link

oss-gg bot commented Oct 23, 2024

This issue is already assigned to another person. Please find more issues here.

@DeepaPrasanna
Copy link

DeepaPrasanna commented Oct 24, 2024

I really wanted to work on this but as this requires raycast running locally which only runs on macOS, I am unassigning myself. I dont have macOs.

@DeepaPrasanna DeepaPrasanna removed their assignment Oct 24, 2024
@Rishi-0007
Copy link

/assign

Copy link

oss-gg bot commented Oct 24, 2024

Assigned to @Rishi-0007! Please open a draft PR linking this issue within 48h ⚠️ If we can't detect a PR from you linking this issue in 48h, you'll be unassigned automatically 🕹️ Excited to have you ship this 🚀

@Ionfinisher
Copy link

Hey @steven-tey Hope you're doing well. As there was no draft PR for this issue within the 48h+ I've been working already on a solution for this issue. Tomorrow, I'll share my progress on this and ask for feedback if that's okay

@steven-tey
Copy link
Collaborator Author

steven-tey commented Oct 27, 2024

@Ionfinisher sounds good! reassigned to you!

@steven-tey steven-tey assigned Ionfinisher and unassigned Rishi-0007 Oct 27, 2024
@Ionfinisher
Copy link

Ionfinisher commented Oct 29, 2024

Hey @steven-tey, sorry for the late response. Had a little more work today than I tought I would. Here is my update so far.

  • Fist I refactored the getAllShortLinks function in the api/index.ts file for the use typeahead with the search param as mentioned in #14198 . As the dub API doesn't acctually provide a way to know if there's a next page when getting when the paginated response, I tryed coming up with a solution but not so efficient for the hasMoreLinks.
Screen Shot 2024-10-29 at 03 59 39
  • Updated the useShortLinks hook to dynamically accept a query parameter, so that different search queries can be passed as arguments.
Screen Shot 2024-10-29 at 02 57 50
  • Updated the List to dynamically trigger typeahead when a page cursor is present for the next page of results. But if the number of links is < 100 then it uses keywords and use filtering=true
Screen Shot 2024-10-29 at 03 42 06
  • Also just encountered a type error from the mutate in deleteLink function. Trying to solve it now and any suggestions and feedbacks for improvement are welcomed
Screen Shot 2024-10-29 at 03 06 48

@steven-tey
Copy link
Collaborator Author

@Ionfinisher great work! can you link to the PR?

@Ionfinisher
Copy link

Hey @steven-tey here is the PR: raycast/extensions#15162

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

No branches or pull requests

6 participants