Adjust class references to question CSS classes

This commit is contained in:
Andreas Nedbal 2023-10-21 00:28:50 +02:00 committed by Andreas Nedbal
parent c4959ae548
commit c09cc85c4f
5 changed files with 7 additions and 7 deletions

View File

@ -12,7 +12,7 @@
}
}
&.answerbox__question-text {
&.question__text {
max-height: 15rem;
@include media-breakpoint-up('sm') {

View File

@ -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 = ':^)';
});
});
}
}

View File

@ -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)

View File

@ -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)

View File

@ -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