From 9e7519325790e2c0b3574800cd8865b3e8c9696d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Mon, 10 Aug 2020 14:48:29 +0300 Subject: [PATCH 1/3] Improve search: allow search with space --- CHANGELOG.md | 2 ++ .../templates/layout/_topnav.html.eex | 4 +-- apps/block_scout_web/priv/gettext/default.pot | 6 ++++- .../priv/gettext/en/LC_MESSAGES/default.po | 6 ++++- apps/explorer/lib/explorer/chain.ex | 25 ++++++++++++++----- 5 files changed, 33 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b5b71f816..a667e96beb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - [#3224](https://github.com/poanetwork/blockscout/pull/3224) - Top tokens page ### Fixes +- [#3231](https://github.com/poanetwork/blockscout/pull/3231) - Improve search: allow search with space +- [#3231](https://github.com/poanetwork/blockscout/pull/3231) - Improve search: order by token holders in descendant order - [#3226](https://github.com/poanetwork/blockscout/pull/3226) - Fix notifier query for live update of token transfers - [#3220](https://github.com/poanetwork/blockscout/pull/3220) - Allow interaction with navbar menu at block-not-found page diff --git a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex index 7698f84521..cc6956779f 100644 --- a/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex +++ b/apps/block_scout_web/lib/block_scout_web/templates/layout/_topnav.html.eex @@ -167,7 +167,7 @@ <%= awesomplete(f, :q, [ class: "form-control me auto", - placeholder: gettext("Search by address, token symbol name, transaction hash, or block number"), + placeholder: gettext("Search by address, token symbol, name, transaction hash, or block number"), "aria-describedby": "search-icon", "aria-label": gettext("Search"), "data-test": "search_input" @@ -178,7 +178,7 @@ value: "contract_address_hash", label: "contract_address_hash", descrSearch: true, - descr: "symbol" + descr: "name" ]) %>