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
Search across all networks #408
Conversation
e036e58
to
1d43006
Compare
Deployed to Cloudflare Pages
|
aa7ebcb
to
bdd25ff
Compare
8d51111
to
b5fc285
Compare
b5fc285
to
91d4fc6
Compare
91d4fc6
to
2041c09
Compare
2041c09
to
d0482aa
Compare
Rebased this again, all dependencies has been merged, now this is ready for review. Please note that there are two known issues which this PR doesn't handle:
|
d0482aa
to
8daeb2c
Compare
if (!open) { | ||
return ( | ||
<NetworkThemeBubble network={network}> | ||
<NotificationBox className={'foreignNote'} onClick={() => setOpen(true)}> |
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.
<Box onClick
is horrible for accessibility
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.
OK, which component do you suggest we use here, insted of Box?
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.
Probably Collapse
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.
And Button
<> | ||
<ResultsGroup | ||
title={t('search.results.blocks.title')} | ||
results={searchQueries.blockHeight.results.filter(result => result.network === network)} |
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.
Eww
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.
Would you please elaborate? Is this about performance, and code readability?
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.
We have one implementation in a higher layer for counting results, and completely different implementation in this layer for showing the results
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.
*different implementation of counting/filtering all results
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.
58275d9
to
dc31473
Compare
I have changed the implementation by removing the global constant completely, but keeping global search functionality. So "global" is now gone from both the URL and the code. I hope it's less ugly that way. |
I have also merged the "fix theme reactivity problem" into this PR (it was too painful to maintain that branch separately), and so changed the route implementation a little bit. |
da150e3
to
7a2d0fa
Compare
Task is https://app.clickup.com/t/862ju7v0a.
This depends on #404.Some explanation: with this, we support two kinds of search.
/mainnet/ember/search?q=whatever
. In this case, we are mainly showing the results from that network. (And maybe some indicators about results elsewhere.)/global/search?q=whatever
. In this case, you see all results, grouped by networks of course.In the URL, there is always something that specifies the flavor of the search. That is either a name of a network (mainnet or testnet), or "global" for global search.