mirror of
https://github.com/zulip/zulip.git
synced 2025-11-08 07:52:19 +00:00
tippy: Set default placement of tooltips to top.
Generally, tooltips placed at top look good. If the tooltip cannot fit at top, it will by default be placed at opposite side. Removed the unnecessary top placement definitions.
This commit is contained in:
@@ -18,7 +18,7 @@ tippy.setDefaultProps({
|
|||||||
// Some delay to showing / hiding the tooltip makes
|
// Some delay to showing / hiding the tooltip makes
|
||||||
// it look less forced and more natural.
|
// it look less forced and more natural.
|
||||||
delay: [100, 20],
|
delay: [100, 20],
|
||||||
placement: "auto",
|
placement: "top",
|
||||||
|
|
||||||
// disable animations to make the
|
// disable animations to make the
|
||||||
// tooltips feel snappy
|
// tooltips feel snappy
|
||||||
@@ -111,7 +111,6 @@ export function initialize() {
|
|||||||
|
|
||||||
delegate("body", {
|
delegate("body", {
|
||||||
target: ".compose_control_button",
|
target: ".compose_control_button",
|
||||||
placement: "top",
|
|
||||||
// Add some additional delay when they open
|
// Add some additional delay when they open
|
||||||
// so that regular users don't have to see
|
// so that regular users don't have to see
|
||||||
// them unless they want to.
|
// them unless they want to.
|
||||||
@@ -120,7 +119,6 @@ export function initialize() {
|
|||||||
|
|
||||||
delegate("body", {
|
delegate("body", {
|
||||||
target: ".message_control_button",
|
target: ".message_control_button",
|
||||||
placement: "top",
|
|
||||||
// Add some additional delay when they open
|
// Add some additional delay when they open
|
||||||
// so that regular users don't have to see
|
// so that regular users don't have to see
|
||||||
// them unless they want to.
|
// them unless they want to.
|
||||||
@@ -154,7 +152,6 @@ export function initialize() {
|
|||||||
|
|
||||||
delegate("body", {
|
delegate("body", {
|
||||||
target: ".message_time",
|
target: ".message_time",
|
||||||
placement: "top",
|
|
||||||
appendTo: () => document.body,
|
appendTo: () => document.body,
|
||||||
onShow(instance) {
|
onShow(instance) {
|
||||||
const time_elem = $(instance.reference);
|
const time_elem = $(instance.reference);
|
||||||
@@ -170,7 +167,6 @@ export function initialize() {
|
|||||||
|
|
||||||
delegate("body", {
|
delegate("body", {
|
||||||
target: ".recipient_row_date > span",
|
target: ".recipient_row_date > span",
|
||||||
placement: "top",
|
|
||||||
appendTo: () => document.body,
|
appendTo: () => document.body,
|
||||||
onHidden(instance) {
|
onHidden(instance) {
|
||||||
instance.destroy();
|
instance.destroy();
|
||||||
@@ -182,14 +178,12 @@ export function initialize() {
|
|||||||
// box or it is not limited by the parent container.
|
// box or it is not limited by the parent container.
|
||||||
delegate("body", {
|
delegate("body", {
|
||||||
target: [".recipient_bar_icon", ".sidebar-title", "#user_filter_icon"],
|
target: [".recipient_bar_icon", ".sidebar-title", "#user_filter_icon"],
|
||||||
placement: "top",
|
|
||||||
appendTo: () => document.body,
|
appendTo: () => document.body,
|
||||||
});
|
});
|
||||||
|
|
||||||
delegate("body", {
|
delegate("body", {
|
||||||
target: ".rendered_markdown time",
|
target: ".rendered_markdown time",
|
||||||
allowHTML: true,
|
allowHTML: true,
|
||||||
placement: "top",
|
|
||||||
appendTo: () => document.body,
|
appendTo: () => document.body,
|
||||||
onHidden(instance) {
|
onHidden(instance) {
|
||||||
instance.destroy();
|
instance.destroy();
|
||||||
|
|||||||
@@ -60,10 +60,10 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<div id="streams_list" class="zoom-out">
|
<div id="streams_list" class="zoom-out">
|
||||||
<div id="streams_header" class="zoom-in-hide"><h4 class="sidebar-title" data-tippy-content="{{t 'Filter streams' }} (q)">{{t 'STREAMS' }}</h4>
|
<div id="streams_header" class="zoom-in-hide"><h4 class="sidebar-title" data-tippy-content="{{t 'Filter streams' }} (q)">{{t 'STREAMS' }}</h4>
|
||||||
<span class="tippy-zulip-tooltip streams_inline_cog_wrapper hidden-for-spectators" data-tippy-content="{{t 'Add streams' }}" data-tippy-placement="top">
|
<span class="tippy-zulip-tooltip streams_inline_cog_wrapper hidden-for-spectators" data-tippy-content="{{t 'Add streams' }}">
|
||||||
<i id="streams_inline_cog" class='fa fa-plus' aria-hidden="true" ></i>
|
<i id="streams_inline_cog" class='fa fa-plus' aria-hidden="true" ></i>
|
||||||
</span>
|
</span>
|
||||||
<i class="streams_filter_icon fa fa-filter tippy-zulip-tooltip" aria-hidden="true" data-tippy-content="{{t 'Filter streams' }} (q)" data-tippy-placement="top"></i>
|
<i class="streams_filter_icon fa fa-filter tippy-zulip-tooltip" aria-hidden="true" data-tippy-content="{{t 'Filter streams' }} (q)"></i>
|
||||||
<div class="input-append notdisplayed stream_search_section">
|
<div class="input-append notdisplayed stream_search_section">
|
||||||
<input class="stream-list-filter home-page-input" type="text" autocomplete="off" placeholder="{{t 'Filter streams' }}" />
|
<input class="stream-list-filter home-page-input" type="text" autocomplete="off" placeholder="{{t 'Filter streams' }}" />
|
||||||
<button type="button" class="btn clear_search_button" id="clear_search_stream_button">
|
<button type="button" class="btn clear_search_button" id="clear_search_stream_button">
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
<div class="message_failed message_control_button {{#unless msg.failed_request}}notvisible{{/unless}}">
|
<div class="message_failed message_control_button {{#unless msg.failed_request}}notvisible{{/unless}}">
|
||||||
<i class="fa fa-refresh refresh-failed-message tippy-zulip-tooltip" data-tippy-content="{{t 'Retry' }}" data-tippy-placement="top" aria-label="{{t 'Retry' }}" role="button" tabindex="0"></i>
|
<i class="fa fa-refresh refresh-failed-message tippy-zulip-tooltip" data-tippy-content="{{t 'Retry' }}" aria-label="{{t 'Retry' }}" role="button" tabindex="0"></i>
|
||||||
<i class="fa fa-times-circle remove-failed-message tippy-zulip-tooltip" data-tippy-content="{{t 'Cancel' }}" data-tippy-placement="top" aria-label="{{t 'Cancel' }}" role="button" tabindex="0"></i>
|
<i class="fa fa-times-circle remove-failed-message tippy-zulip-tooltip" data-tippy-content="{{t 'Cancel' }}" aria-label="{{t 'Cancel' }}" role="button" tabindex="0"></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{#unless msg/locally_echoed}}
|
{{#unless msg/locally_echoed}}
|
||||||
|
|||||||
@@ -17,13 +17,13 @@
|
|||||||
<div class="recent_topic_actions">
|
<div class="recent_topic_actions">
|
||||||
<div class="recent_topics_focusable">
|
<div class="recent_topics_focusable">
|
||||||
{{#if topic_muted}}
|
{{#if topic_muted}}
|
||||||
<i class="fa fa-bell-slash on_hover_topic_unmute recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tippy-content="{{t 'Unmute topic' }}" data-tippy-placement="top" role="button" tabindex="0" aria-label="{{t 'Unmute topic' }}"></i>
|
<i class="fa fa-bell-slash on_hover_topic_unmute recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tippy-content="{{t 'Unmute topic' }}" role="button" tabindex="0" aria-label="{{t 'Unmute topic' }}"></i>
|
||||||
{{else}}
|
{{else}}
|
||||||
<i class="fa fa-bell-slash on_hover_topic_mute recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mute topic' }}" data-tippy-placement="top" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>
|
<i class="fa fa-bell-slash on_hover_topic_mute recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mute topic' }}" role="button" tabindex="0" aria-label="{{t 'Mute topic' }}"></i>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="recent_topics_focusable">
|
<div class="recent_topics_focusable">
|
||||||
<i class="fa fa-check-circle on_hover_topic_read recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as read' }}" data-tippy-placement="top" role="button" tabindex="0" aria-label="{{t 'Mark as read' }}"></i>
|
<i class="fa fa-check-circle on_hover_topic_read recipient_bar_icon tippy-zulip-tooltip" data-stream-id="{{stream_id}}" data-topic-name="{{topic}}" data-tippy-content="{{t 'Mark as read' }}" role="button" tabindex="0" aria-label="{{t 'Mark as read' }}"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -32,17 +32,17 @@
|
|||||||
<td class='recent_topic_users'>
|
<td class='recent_topic_users'>
|
||||||
<ul class="recent_topics_participants">
|
<ul class="recent_topics_participants">
|
||||||
{{#if other_senders_count}}
|
{{#if other_senders_count}}
|
||||||
<li class="recent_topics_participant_item tippy-zulip-tooltip" data-tippy-content="{{other_sender_names}}" data-tippy-placement="top" data-tippy-allowHtml="true">
|
<li class="recent_topics_participant_item tippy-zulip-tooltip" data-tippy-content="{{other_sender_names}}" data-tippy-allowHtml="true">
|
||||||
<span class="recent_topics_participant_overflow">+{{other_senders_count}}</span>
|
<span class="recent_topics_participant_overflow">+{{other_senders_count}}</span>
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#each senders}}
|
{{#each senders}}
|
||||||
{{#if this.is_muted}}
|
{{#if this.is_muted}}
|
||||||
<li class="recent_topics_participant_item tippy-zulip-tooltip" data-tippy-content="{{t 'Muted user'}}" data-tippy-placement="top">
|
<li class="recent_topics_participant_item tippy-zulip-tooltip" data-tippy-content="{{t 'Muted user'}}">
|
||||||
<span><i class="fa fa-user recent_topics_participant_overflow"></i></span>
|
<span><i class="fa fa-user recent_topics_participant_overflow"></i></span>
|
||||||
</li>
|
</li>
|
||||||
{{else}}
|
{{else}}
|
||||||
<li class="recent_topics_participant_item tippy-zulip-tooltip" data-tippy-content="{{this.full_name}}" data-tippy-placement="top">
|
<li class="recent_topics_participant_item tippy-zulip-tooltip" data-tippy-content="{{this.full_name}}">
|
||||||
<img src="{{this.avatar_url_small}}" class="recent_topics_participant_avatar" />
|
<img src="{{this.avatar_url_small}}" class="recent_topics_participant_avatar" />
|
||||||
</li>
|
</li>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</td>
|
</td>
|
||||||
<td class="recent_topic_timestamp">
|
<td class="recent_topic_timestamp">
|
||||||
<div class="last_msg_time tippy-zulip-tooltip" data-tippy-content="{{this.full_last_msg_date_time}}" data-tippy-placement="top">
|
<div class="last_msg_time tippy-zulip-tooltip" data-tippy-content="{{this.full_last_msg_date_time}}">
|
||||||
{{ last_msg_time }}
|
{{ last_msg_time }}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{{#if is_bot}}
|
{{#if is_bot}}
|
||||||
<i class="zulip-icon zulip-icon-bot" aria-hidden="true"></i>
|
<i class="zulip-icon zulip-icon-bot" aria-hidden="true"></i>
|
||||||
{{else}}
|
{{else}}
|
||||||
<span class="{{user_circle_class}} user_circle popover_user_presence tippy-zulip-tooltip" data-tippy-content="{{user_last_seen_time_status}}" data-tippy-placement="top"></span>
|
<span class="{{user_circle_class}} user_circle popover_user_presence tippy-zulip-tooltip" data-tippy-content="{{user_last_seen_time_status}}"></span>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
Reference in New Issue
Block a user