From c09cc85c4f5262867ae39ea4ca6a9a5f42abda88 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sat, 21 Oct 2023 00:28:50 +0200 Subject: [PATCH] Adjust class references to question CSS classes --- app/assets/stylesheets/components/_collapse.scss | 2 +- app/javascript/retrospring/features/memes/index.ts | 4 ++-- app/views/discover/_userbox.html.haml | 4 ++-- app/views/moderation/inbox/_header.html.haml | 2 +- spec/views/inbox/_entry.html.haml_spec.rb | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/stylesheets/components/_collapse.scss b/app/assets/stylesheets/components/_collapse.scss index 0f8afd60..a54dfca0 100644 --- a/app/assets/stylesheets/components/_collapse.scss +++ b/app/assets/stylesheets/components/_collapse.scss @@ -12,7 +12,7 @@ } } - &.answerbox__question-text { + &.question__text { max-height: 15rem; @include media-breakpoint-up('sm') { diff --git a/app/javascript/retrospring/features/memes/index.ts b/app/javascript/retrospring/features/memes/index.ts index fe509ce7..9f74598f 100644 --- a/app/javascript/retrospring/features/memes/index.ts +++ b/app/javascript/retrospring/features/memes/index.ts @@ -4,8 +4,8 @@ export default (): void => { cheet('up up down down left right left right b a', () => { document.body.classList.add('fa-spin'); - Array.from(document.querySelectorAll('.answerbox__question-text')).forEach((element: HTMLElement) => { + Array.from(document.querySelectorAll('.question__text')).forEach((element: HTMLElement) => { element.innerText = ':^)'; }); }); -} \ No newline at end of file +} diff --git a/app/views/discover/_userbox.html.haml b/app/views/discover/_userbox.html.haml index 165ccc51..8293104b 100644 --- a/app/views/discover/_userbox.html.haml +++ b/app/views/discover/_userbox.html.haml @@ -5,7 +5,7 @@ %a{ href: user_path(u) } = render AvatarComponent.new(user: u, size: "md", classes: ["me-2"]) .flex-grow-1 - %h6.answerbox__question-user + %h6.question__user - if u.profile.display_name.blank? %a{ href: user_path(u) } = u.screen_name @@ -13,4 +13,4 @@ %a{ href: user_path(u) } = u.profile.display_name %span.text-muted= u.screen_name - %p.answerbox__question-text= t(".#{type}", value: value, count: value) + %p.question__text= t(".#{type}", value: value, count: value) diff --git a/app/views/moderation/inbox/_header.html.haml b/app/views/moderation/inbox/_header.html.haml index cd57e8d8..14d9f868 100644 --- a/app/views/moderation/inbox/_header.html.haml +++ b/app/views/moderation/inbox/_header.html.haml @@ -4,6 +4,6 @@ .d-flex .flex-shrink-0 %a{ href: user_path(user) } - = render AvatarComponent.new(user:, size: "md", classes: ["answerbox__question-user-avatar"]) + = render AvatarComponent.new(user:, size: "md", classes: ["question__avatar"]) .flex-grow-1 = t(".title_html", screen_name: user.screen_name, user_id: user.id) diff --git a/spec/views/inbox/_entry.html.haml_spec.rb b/spec/views/inbox/_entry.html.haml_spec.rb index a94c2c1c..111cef6f 100644 --- a/spec/views/inbox/_entry.html.haml_spec.rb +++ b/spec/views/inbox/_entry.html.haml_spec.rb @@ -45,7 +45,7 @@ describe "inbox/_entry.html.haml", type: :view do let(:author_is_anonymous) { false } it "has an avatar" do - expect(rendered).to have_css(%(img.answerbox__question-user-avatar)) + expect(rendered).to have_css(%(img.question__avatar)) end it "does not have an icon indicating the author is anonymous" do