diff --git a/app/components/question_component/question_component.html.haml b/app/components/question_component/question_component.html.haml index 4b38e4cc..ea139a1c 100644 --- a/app/components/question_component/question_component.html.haml +++ b/app/components/question_component/question_component.html.haml @@ -6,12 +6,15 @@ .flex-grow-1 %h6.text-muted.question__user - if @question.author_is_anonymous - %i.fas.fa-user-secret{ title: t(".anon_hint") } + %span{ title: t(".anon_hint"), data: { controller: :tooltip, bs_placement: :bottom } } + %i.fas.fa-user-secret - if @profile_question && @question.direct - if user_signed_in? && @question.user == current_user - %i.fa.fa-eye-slash{ data: { bs_toggle: "tooltip", bs_title: t(".visible_to_you") } } + %span.d-inline-block{ title: t(".visible_to_you"), data: { controller: :tooltip, bs_placement: :bottom } } + %i.fa.fa-eye-slash - elsif moderation_view? - %i.fa.fa-eye-slash{ data: { bs_toggle: "tooltip", bs_title: t(".visible_mod_mode") } } + %span{ title: t(".visible_mod_mode"), data: { controller: :tooltip, bs_placement: :bottom } } + %i.fa.fa-eye-slash = user_screen_name(@question.user, context_user: @context_user, author_identifier: author_identifier) - if follower_question? ยท diff --git a/app/views/answerbox/_smiles.html.haml b/app/views/answerbox/_smiles.html.haml index c25626a1..68f02e63 100644 --- a/app/views/answerbox/_smiles.html.haml +++ b/app/views/answerbox/_smiles.html.haml @@ -8,5 +8,5 @@ - a.smiles.all.each do |smile| %a{ href: user_path(smile.user), title: user_screen_name(smile.user, url: false), - data: { bs_toggle: :tooltip, bs_placement: :top, smile_id: smile.id, turbo: :false } } + data: { controller: :tooltip, bs_placement: :top, smile_id: smile.id, turbo: :false } } = render AvatarComponent.new(user: smile.user, size: "xs") diff --git a/app/views/navigation/_desktop.html.haml b/app/views/navigation/_desktop.html.haml index ceb1fd08..26172183 100644 --- a/app/views/navigation/_desktop.html.haml +++ b/app/views/navigation/_desktop.html.haml @@ -15,7 +15,7 @@ = nav_entry t("navigation.discover"), discover_path, icon: "compass", hotkey: "g d" %ul.nav.navbar-nav - if @user.present? && @user != current_user - %li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t(".list") } + %li.nav-item.d-none.d-sm-block{ data: { controller: 'tooltip', bs_placement: 'bottom' }, title: t(".list") } %a.nav-link{ href: '#', data: { bs_target: '#modal-list-memberships', bs_toggle: :modal } } %i.fa.fa-list.hidden-xs %span.d-none.d-sm-inline.d-md-none= t(".list") @@ -29,7 +29,7 @@ - cache current_user.notification_dropdown_cache_key, expires_in: 12.hours do - notifications = Notification.for(current_user).where(new: true).includes([:target]).limit(4) = render "navigation/dropdown/notifications", notifications:, size: "desktop" - %li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t('.ask_question') } + %li.nav-item.d-none.d-sm-block{ data: { controller: :tooltip, bs_placement: 'bottom' }, title: t('.ask_question') } %a.nav-link{ href: "#", name: "toggle-all-ask", data: { bs_target: "#modal-ask-followers", bs_toggle: :modal, hotkey: "n" } } %i.fa.fa-pencil-square-o %li.nav-item.dropdown.profile--image-dropdown diff --git a/app/views/tabs/_feed.html.haml b/app/views/tabs/_feed.html.haml index fc92d7a0..20d06717 100644 --- a/app/views/tabs/_feed.html.haml +++ b/app/views/tabs/_feed.html.haml @@ -17,7 +17,7 @@ - else %p.px-4.pb-2 - list.members.each do |member| - %a{ href: user_path(member.user), title: member.user.screen_name, data: { bs_toggle: :tooltip, bs_placement: :top } } + %a{ href: user_path(member.user), title: member.user.screen_name, data: { controller: :tooltip, bs_placement: :top } } = render AvatarComponent.new(user: member.user, size: "xs") - if !list && lists.empty? .p-3= t(".lists.notice_html")