From: Anton Khorev Date: Mon, 2 Dec 2024 09:22:45 +0000 (+0300) Subject: Truncate usernames in block navigation tabs X-Git-Tag: live~24^2 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/20ae1926a80d098da9370687445edb24d2a12538?ds=inline;hp=--cc Truncate usernames in block navigation tabs --- 20ae1926a80d098da9370687445edb24d2a12538 diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/common.scss index 4bedf42b6..b179ec5ad 100644 --- a/app/assets/stylesheets/common.scss +++ b/app/assets/stylesheets/common.scss @@ -938,7 +938,11 @@ div.secondary-actions { max-width: 20em; } -/* Rules for tabs inside secondary background sections */ +/* Rules for navigation tabs */ + +.nav-tabs .username { + max-width: 20em; +} .bg-body-secondary .nav-tabs { --bs-border-color: var(--bs-secondary-border-subtle); diff --git a/app/views/user_blocks/_navigation.html.erb b/app/views/user_blocks/_navigation.html.erb index 061989586..0770e331f 100644 --- a/app/views/user_blocks/_navigation.html.erb +++ b/app/views/user_blocks/_navigation.html.erb @@ -14,7 +14,7 @@ <% on_user = @user || @user_block&.user %> <% if on_user != current_user && on_user&.blocks&.exists? %> @@ -29,7 +29,7 @@ <% by_user = @user || @user_block&.creator %> <% if by_user != current_user && by_user&.blocks_created&.exists? %> diff --git a/config/locales/en.yml b/config/locales/en.yml index 2a92fbb63..b190c2ca0 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -2925,9 +2925,9 @@ en: navigation: all_blocks: "All Blocks" blocks_on_me: "Blocks on Me" - blocks_on_user: "Blocks on %{user}" + blocks_on_user_html: "Blocks on %{user}" blocks_by_me: "Blocks by Me" - blocks_by_user: "Blocks by %{user}" + blocks_by_user_html: "Blocks by %{user}" block: "Block #%{id}" new_block: "New Block" user_mutes: