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

Add mining pools to search results #5117

Merged
merged 5 commits into from
May 31, 2024
Merged

Add mining pools to search results #5117

merged 5 commits into from
May 31, 2024

Conversation

natsoni
Copy link
Contributor

@natsoni natsoni commented May 30, 2024

This PR adds mining pools support to the search bar. Active pools (which mined a block in the last year) are shown first.

Screenshot 2024-05-30 at 15 07 15

I also updated the order of the results displayed to fix #4993. Now, if the search is exact match with a public key, the address result is displayed at the end, and the other networks results are hidden

Before After
Screenshot 2024-05-30 at 15 12 52 Screenshot 2024-05-30 at 15 11 59

There are other issues I will fix in separate PRs to simplify the review for this one.

  • The pool page does not update properly when switching pool:
Screen.Recording.2024-05-30.at.15.22.40.mov
  • The lightning search API frequently times out when the search text is only one or two characters long. This causes all results to take several seconds to appear even if the address prefix and the mining pools queries returned almost instantly. A simple solution would be to set a minimum number of characters required before initiating a lightning search. Or we could separate all queries on the frontend (address prefix, lightning search, and now mining pools).
Screen.Recording.2024-05-30.at.15.40.16.mov

@natsoni natsoni requested a review from softsimon May 30, 2024 13:42
@cla-bot cla-bot bot added the cla-signed label May 30, 2024
@natsoni natsoni mentioned this pull request May 30, 2024
Copy link
Member

@softsimon softsimon left a comment

Choose a reason for hiding this comment

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

The pool search works great.

But the change of the order should probably have been in a separate PR, because there is one issue with it. The search result isn't selecting the top result, so pasting a Lightning nod pubkey and press enter still takes you to an address page. Is it possible to move the search highlight index to the top without any issues in this case? Either that or move it out from this PR for now.

Screenshot 2024-05-31 at 12 54 55

@natsoni
Copy link
Contributor Author

natsoni commented May 31, 2024

But the change of the order should probably have been in a separate PR, because there is one issue with it. The search result isn't selecting the top result, so pasting a Lightning nod pubkey and press enter still takes you to an address page. Is it possible to move the search highlight index to the top without any issues in this case? Either that or move it out from this PR for now.

Reverted the changes made to the results order, will work on that in another PR.

Copy link
Member

@softsimon softsimon left a comment

Choose a reason for hiding this comment

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

tested ACK @ [f3bd50d]

@softsimon softsimon merged commit 11cfb8a into master May 31, 2024
13 checks passed
@softsimon softsimon deleted the natsoni/pools-search branch May 31, 2024 14:16
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.

Lightning Node search results should be on top
2 participants