Magickbase / ckb-explorer-public-issues

CKB Explorer Issues
https://explorer.nervos.org/
3 stars 2 forks source link

Enhance the UX of search box #519

Closed Sven-TBD closed 2 months ago

Sven-TBD commented 7 months ago

Search box will show all of result by different types together, and the "by Name" and "by ID" are no longer a necessary option but just a location where the specific type is.

Image

Sven-TBD commented 7 months ago

PRD:https://vs0cjf.axshare.com/?id=908ssd&g=14&p=%E6%90%9C%E7%B4%A2%E4%BC%98%E5%8C%96%E8%AF%B4%E6%98%8E&sc=3

BTW,A Not Found Page is also needed when there is no result while searching a String without click on the dropbox.

Keith-CY commented 4 months ago

How is it going @PainterPuppets

rabbitz commented 4 months ago

https://github.com/nervosnetwork/ckb-explorer/pull/1790

# single_query
GET /api/v1/suggest_queries?q=?

# aggregate_query
GET /api/v1/suggest_queries?q=?&filter_by=0

image

Sven-TBD commented 4 months ago

@PainterPuppets How‘s it going with this feature

PainterPuppets commented 4 months ago

@PainterPuppets How‘s it going with this feature

Just noticed that the backend is ready, I'll start working on this issue today and expect it to take 2 days

Keith-CY commented 4 months ago

@PainterPuppets How‘s it going with this feature

Just noticed that the backend is ready, I'll start working on this issue today and expect it to take 2 days

How is it going

PainterPuppets commented 3 months ago

nervosnetwork/ckb-explorer#1790

# single_query
GET /api/v1/suggest_queries?q=?

# aggregate_query
GET /api/v1/suggest_queries?q=?&filter_by=0

image

Hi @rabbitz I noticed that the search currently returns token_collection type data, but there's no typehash field in the return data, so there's no way to make a jump Do we have any plans to add the this fields?

image
rabbitz commented 3 months ago

@PainterPuppets

https://github.com/nervosnetwork/ckb-explorer/pull/1838

Field sn was added to token collection response.

PainterPuppets commented 3 months ago

@PainterPuppets

nervosnetwork/ckb-explorer#1838

Field sn was added to token collection response.

Accessing https://testnet-api.explorer.nervos.org/api/v1/suggest_queries?q=Spore&filter_by=0 doesn't seem to have the sn field returned, which url should I use?

Keith-CY commented 3 months ago

@PainterPuppets nervosnetwork/ckb-explorer#1838 Field sn was added to token collection response.

Accessing testnet-api.explorer.nervos.org/api/v1/suggest_queries?q=Spore&filter_by=0 doesn't seem to have the sn field returned, which url should I use?

Please check this @rabbitz

PainterPuppets commented 3 months ago

Hi @rabbitz
There are some search keywords that do not seem to have any results at the moment, like:

Btc address: tb1qwq82nch2wc0jtymavfv2cxsju9trghn0ykhqx8

image

BTC Tx :4ea970151577aff9f134bd50ce666d304c979f8d204c4fa8f4cd0a1bf7c3bbd1

image

.bit did: test.bit

image

Can you check it out for me?

Keith-CY commented 3 months ago

Hi @rabbitz There are some search keywords that do not seem to have any results at the moment, like:

Btc address: tb1qwq82nch2wc0jtymavfv2cxsju9trghn0ykhqx8 image

BTC Tx :4ea970151577aff9f134bd50ce666d304c979f8d204c4fa8f4cd0a1bf7c3bbd1 image

.bit did: test.bit image

Can you check it out for me?

.bit was not supported in the backend, so it's calling .bit indexer directly at https://github.com/nervosnetwork/ckb-explorer-frontend/blob/develop/src/components/Search/index.tsx#L218-L227

FrederLu commented 3 months ago

Verified.