Merge pull request #4802 from blockscout/np-fix-floating-tooltip

Fix floating tooltip on the main page
pull/4806/head
Victor Baranov 3 years ago committed by GitHub
commit eb8224f25c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 1
      apps/block_scout_web/assets/js/pages/chain.js
  3. 2
      apps/block_scout_web/assets/package.json
  4. 2
      apps/block_scout_web/lib/block_scout_web/templates/address/_link.html.eex
  5. 2
      apps/block_scout_web/lib/block_scout_web/templates/address/_responsive_hash.html.eex
  6. 3
      apps/block_scout_web/lib/block_scout_web/templates/chain/_block.html.eex
  7. 2
      apps/block_scout_web/priv/gettext/default.pot
  8. 2
      apps/block_scout_web/priv/gettext/en/LC_MESSAGES/default.po

@ -26,6 +26,7 @@
- [#4818](https://github.com/blockscout/blockscout/pull/4818) - Fix for extract_omni_bridged_token_metadata_wrapper method - [#4818](https://github.com/blockscout/blockscout/pull/4818) - Fix for extract_omni_bridged_token_metadata_wrapper method
- [#4812](https://github.com/blockscout/blockscout/pull/4812), [#4815](https://github.com/blockscout/blockscout/pull/4815) - Check if exists custom_cap property of extended token object before access it - [#4812](https://github.com/blockscout/blockscout/pull/4812), [#4815](https://github.com/blockscout/blockscout/pull/4815) - Check if exists custom_cap property of extended token object before access it
- [#4810](https://github.com/blockscout/blockscout/pull/4810) - Show `nil` block.size as `N/A bytes` - [#4810](https://github.com/blockscout/blockscout/pull/4810) - Show `nil` block.size as `N/A bytes`
- [#4802](https://github.com/blockscout/blockscout/pull/4802) - Fix floating tooltip on the main page
- [#4801](https://github.com/blockscout/blockscout/pull/4801) - Added clauses and tests for get_total_staked_and_ordered/1 - [#4801](https://github.com/blockscout/blockscout/pull/4801) - Added clauses and tests for get_total_staked_and_ordered/1
- [#4798](https://github.com/blockscout/blockscout/pull/4798) - Token instance View contract icon Safari fix - [#4798](https://github.com/blockscout/blockscout/pull/4798) - Token instance View contract icon Safari fix
- [#4796](https://github.com/blockscout/blockscout/pull/4796) - Fix nil.timestamp issue - [#4796](https://github.com/blockscout/blockscout/pull/4796) - Fix nil.timestamp issue

@ -52,6 +52,7 @@ function baseReducer (state = initialState, action) {
if (state.blocks.length < BLOCKS_PER_PAGE) { if (state.blocks.length < BLOCKS_PER_PAGE) {
pastBlocks = state.blocks pastBlocks = state.blocks
} else { } else {
$('.miner-address-tooltip').tooltip('hide')
pastBlocks = state.blocks.slice(0, -1) pastBlocks = state.blocks.slice(0, -1)
} }
return Object.assign({}, state, { return Object.assign({}, state, {

@ -23,7 +23,7 @@
"@tarekraafat/autocomplete.js": "^10.2.6", "@tarekraafat/autocomplete.js": "^10.2.6",
"assert": "^2.0.0", "assert": "^2.0.0",
"bignumber.js": "^9.0.0", "bignumber.js": "^9.0.0",
"bootstrap": "^4.3.1", "bootstrap": "^4.6.0",
"chart.js": "^3.5.1", "chart.js": "^3.5.1",
"chartjs-adapter-moment": "^1.0.0", "chartjs-adapter-moment": "^1.0.0",
"clipboard": "^2.0.4", "clipboard": "^2.0.4",

@ -9,7 +9,7 @@
</span> </span>
<% else %> <% else %>
<%= link to: address_path(BlockScoutWeb.Endpoint, :show, @address), "data-test": "address_hash_link", class: assigns[:class] do %> <%= link to: address_path(BlockScoutWeb.Endpoint, :show, @address), "data-test": "address_hash_link", class: assigns[:class] do %>
<%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address: @address, contract: @contract, truncate: assigns[:truncate], use_custom_tooltip: @use_custom_tooltip, no_tooltip: assigns[:no_tooltip] %> <%= render BlockScoutWeb.AddressView, "_responsive_hash.html", address: @address, contract: @contract, truncate: assigns[:truncate], use_custom_tooltip: @use_custom_tooltip, no_tooltip: assigns[:no_tooltip], custom_classes_tooltip: assigns[:custom_classes_tooltip] %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>

@ -12,7 +12,7 @@
<%= if @use_custom_tooltip == true do %> <%= if @use_custom_tooltip == true do %>
<span><%= name %> (<%= short_hash(@address) %>...)</span> <span><%= name %> (<%= short_hash(@address) %>...)</span>
<% else %> <% else %>
<span data-toggle="tooltip" data-placement="top" title="<%= @address %>"> <span data-toggle="tooltip" data-placement="top" title="<%= @address %>" data-custom-class="<%= if assigns[:custom_classes_tooltip], do: @custom_classes_tooltip |> Enum.join(" ") %>">
<span class="d-none d-md-none d-lg-inline d-xl-inline"><%= short_contract_name(name, 30) %></span> <span class="d-none d-md-none d-lg-inline d-xl-inline"><%= short_contract_name(name, 30) %></span>
<span class="d-inline d-md-inline d-lg-none d-xl-none"><%= short_contract_name(name, 10) %></span> <span class="d-inline d-md-inline d-lg-none d-xl-none"><%= short_contract_name(name, 10) %></span>
<span> (<%= BlockScoutWeb.AddressView.trimmed_hash(@address.hash) %>)</span> <span> (<%= BlockScoutWeb.AddressView.trimmed_hash(@address.hash) %>)</span>

@ -18,7 +18,8 @@
"_link.html", "_link.html",
address: @block.miner, address: @block.miner,
contract: false, contract: false,
use_custom_tooltip: false %> use_custom_tooltip: false,
custom_classes_tooltip: ["miner-address-tooltip"] %>
</div> </div>
<% end %> <% end %>
<%= if BlockScoutWeb.BlockView.show_reward?(@block.rewards) do %> <%= if BlockScoutWeb.BlockView.show_reward?(@block.rewards) do %>

@ -1900,7 +1900,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/block/_tile.html.eex:52 #: lib/block_scout_web/templates/block/_tile.html.eex:52
#: lib/block_scout_web/templates/chain/_block.html.eex:26 lib/block_scout_web/views/internal_transaction_view.ex:28 #: lib/block_scout_web/templates/chain/_block.html.eex:27 lib/block_scout_web/views/internal_transaction_view.ex:28
msgid "Reward" msgid "Reward"
msgstr "" msgstr ""

@ -1900,7 +1900,7 @@ msgstr ""
#, elixir-format #, elixir-format
#: lib/block_scout_web/templates/block/_tile.html.eex:52 #: lib/block_scout_web/templates/block/_tile.html.eex:52
#: lib/block_scout_web/templates/chain/_block.html.eex:26 lib/block_scout_web/views/internal_transaction_view.ex:28 #: lib/block_scout_web/templates/chain/_block.html.eex:27 lib/block_scout_web/views/internal_transaction_view.ex:28
msgid "Reward" msgid "Reward"
msgstr "" msgstr ""

Loading…
Cancel
Save