From 43d66959aaef15b2ef26e9fa41e644cbddf89f2a Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 19 Mar 2026 11:58:59 +0100 Subject: [PATCH] Sign-up server rules: Show different icon on toggle button when description is expanded (#38293) --- app/javascript/styles/mastodon/about.scss | 5 +++++ app/views/auth/rule_translations/_rule_translation.html.haml | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/javascript/styles/mastodon/about.scss b/app/javascript/styles/mastodon/about.scss index cb4885a7e8..3f8145ea6d 100644 --- a/app/javascript/styles/mastodon/about.scss +++ b/app/javascript/styles/mastodon/about.scss @@ -85,6 +85,11 @@ $fluid-breakpoint: $maximum-width + 20px; display: none; } + &[aria-expanded='true'] .icon-expand, + &[aria-expanded='false'] .icon-collapse { + display: none; + } + .icon { width: 1lh; height: 1lh; diff --git a/app/views/auth/rule_translations/_rule_translation.html.haml b/app/views/auth/rule_translations/_rule_translation.html.haml index a8c307270f..cbb53acdf4 100644 --- a/app/views/auth/rule_translations/_rule_translation.html.haml +++ b/app/views/auth/rule_translations/_rule_translation.html.haml @@ -4,5 +4,6 @@ .rules-list__hint{ tabIndex: -1 } %span.rules-list__hint-text= rule_translation.hint %button.rules-list__toggle-button{ type: 'button', hidden: true, 'aria-expanded': 'false' } - = material_symbol('more_horiz') + = material_symbol('keyboard_arrow_up', { class: 'icon-collapse' }) + = material_symbol('more_horiz', { class: 'icon-expand' }) %span.sr-only= t('auth.rules.read_more')