handlebars: Move popover handlebars to a new popovers folder.

Organize related handlebars in a new folder together.
This commit is contained in:
Aman Agrawal 2023-10-05 04:31:40 +00:00 committed by Tim Abbott
parent 95ee178d1a
commit 75826d8409
30 changed files with 24 additions and 24 deletions

View File

@ -694,7 +694,7 @@ html_rules: List["Rule"] = [
"templates/corporate/billing.html", "templates/corporate/billing.html",
"templates/corporate/upgrade.html", "templates/corporate/upgrade.html",
# Miscellaneous violations to be cleaned up # Miscellaneous violations to be cleaned up
"web/templates/user_card_popover_avatar.hbs", "web/templates/popovers/user_card/user_card_popover_avatar.hbs",
"web/templates/confirm_dialog/confirm_subscription_invites_warning.hbs", "web/templates/confirm_dialog/confirm_subscription_invites_warning.hbs",
"templates/zerver/reset_confirm.html", "templates/zerver/reset_confirm.html",
"templates/zerver/config_error.html", "templates/zerver/config_error.html",

View File

@ -1,6 +1,6 @@
import $ from "jquery"; import $ from "jquery";
import render_left_sidebar_stream_setting_popover from "../templates/left_sidebar_stream_setting_popover.hbs"; import render_left_sidebar_stream_setting_popover from "../templates/popovers/left_sidebar_stream_setting_popover.hbs";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus";
import * as settings_data from "./settings_data"; import * as settings_data from "./settings_data";

View File

@ -1,9 +1,9 @@
import $ from "jquery"; import $ from "jquery";
import {delegate} from "tippy.js"; import {delegate} from "tippy.js";
import render_compose_control_buttons_popover from "../templates/compose_control_buttons_popover.hbs"; import render_compose_control_buttons_popover from "../templates/popovers/compose_control_buttons/compose_control_buttons_popover.hbs";
import render_compose_select_enter_behaviour_popover from "../templates/compose_select_enter_behaviour_popover.hbs"; import render_compose_select_enter_behaviour_popover from "../templates/popovers/compose_select_enter_behaviour_popover.hbs";
import render_mobile_message_buttons_popover from "../templates/mobile_message_buttons_popover.hbs"; import render_mobile_message_buttons_popover from "../templates/popovers/mobile_message_buttons_popover.hbs";
import * as channel from "./channel"; import * as channel from "./channel";
import * as common from "./common"; import * as common from "./common";

View File

@ -2,10 +2,10 @@ import $ from "jquery";
import emoji_codes from "../../static/generated/emoji/emoji_codes.json"; import emoji_codes from "../../static/generated/emoji/emoji_codes.json";
import * as typeahead from "../shared/src/typeahead"; import * as typeahead from "../shared/src/typeahead";
import render_emoji_popover from "../templates/emoji_popover.hbs"; import render_emoji_popover from "../templates/popovers/emoji/emoji_popover.hbs";
import render_emoji_popover_emoji_map from "../templates/emoji_popover_emoji_map.hbs"; import render_emoji_popover_emoji_map from "../templates/popovers/emoji/emoji_popover_emoji_map.hbs";
import render_emoji_popover_search_results from "../templates/emoji_popover_search_results.hbs"; import render_emoji_popover_search_results from "../templates/popovers/emoji/emoji_popover_search_results.hbs";
import render_emoji_showcase from "../templates/emoji_showcase.hbs"; import render_emoji_showcase from "../templates/popovers/emoji/emoji_showcase.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip";
import * as compose_ui from "./compose_ui"; import * as compose_ui from "./compose_ui";
@ -646,9 +646,9 @@ function get_default_emoji_popover_options() {
emoji_popover_instance = instance; emoji_popover_instance = instance;
const $popover = $(instance.popper); const $popover = $(instance.popper);
$popover.addClass("emoji-popover-root"); $popover.addClass("emoji-popover-root");
instance.setContent(ui_util.parse_html( instance.setContent(
generate_emoji_picker_content(current_message_id), ui_util.parse_html(generate_emoji_picker_content(current_message_id)),
)); );
emoji_catalog_last_coordinates = { emoji_catalog_last_coordinates = {
section: 0, section: 0,
index: 0, index: 0,

View File

@ -1,7 +1,7 @@
import ClipboardJS from "clipboard"; import ClipboardJS from "clipboard";
import $ from "jquery"; import $ from "jquery";
import render_actions_popover from "../templates/actions_popover.hbs"; import render_actions_popover from "../templates/popovers/actions_popover.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip";
import * as compose_actions from "./compose_actions"; import * as compose_actions from "./compose_actions";

View File

@ -1,7 +1,7 @@
import $ from "jquery"; import $ from "jquery";
import url_template_lib from "url-template"; import url_template_lib from "url-template";
import render_playground_links_popover from "../templates/playground_links_popover.hbs"; import render_playground_links_popover from "../templates/popovers/playground_links_popover.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus";

View File

@ -1,9 +1,9 @@
import $ from "jquery"; import $ from "jquery";
import {delegate} from "tippy.js"; import {delegate} from "tippy.js";
import render_send_later_popover from "../templates/popovers/send_later_popover.hbs";
import render_send_later_modal from "../templates/send_later_modal.hbs"; import render_send_later_modal from "../templates/send_later_modal.hbs";
import render_send_later_modal_options from "../templates/send_later_modal_options.hbs"; import render_send_later_modal_options from "../templates/send_later_modal_options.hbs";
import render_send_later_popover from "../templates/send_later_popover.hbs";
import * as compose from "./compose"; import * as compose from "./compose";
import * as compose_validate from "./compose_validate"; import * as compose_validate from "./compose_validate";

View File

@ -4,9 +4,9 @@ import $ from "jquery";
import tippy from "tippy.js"; import tippy from "tippy.js";
import render_confirm_mute_user from "../templates/confirm_dialog/confirm_mute_user.hbs"; import render_confirm_mute_user from "../templates/confirm_dialog/confirm_mute_user.hbs";
import render_user_card_popover from "../templates/user_card_popover.hbs"; import render_user_card_popover from "../templates/popovers/user_card/user_card_popover.hbs";
import render_user_card_popover_avatar from "../templates/user_card_popover_avatar.hbs"; import render_user_card_popover_avatar from "../templates/popovers/user_card/user_card_popover_avatar.hbs";
import render_user_card_popover_manage_menu from "../templates/user_card_popover_manage_menu.hbs"; import render_user_card_popover_manage_menu from "../templates/popovers/user_card/user_card_popover_manage_menu.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip";
import * as buddy_data from "./buddy_data"; import * as buddy_data from "./buddy_data";

View File

@ -1,6 +1,6 @@
import $ from "jquery"; import $ from "jquery";
import render_user_group_info_popover from "../templates/user_group_info_popover.hbs"; import render_user_group_info_popover from "../templates/popovers/user_group_info_popover.hbs";
import * as blueslip from "./blueslip"; import * as blueslip from "./blueslip";
import * as buddy_data from "./buddy_data"; import * as buddy_data from "./buddy_data";

View File

@ -1,6 +1,6 @@
import $ from "jquery"; import $ from "jquery";
import render_change_visibility_policy_popover from "../templates/change_visibility_policy_popover.hbs"; import render_change_visibility_policy_popover from "../templates/popovers/change_visibility_policy_popover.hbs";
import * as popover_menus from "./popover_menus"; import * as popover_menus from "./popover_menus";
import * as popover_menus_data from "./popover_menus_data"; import * as popover_menus_data from "./popover_menus_data";

View File

@ -24,7 +24,7 @@
</div> </div>
<div class="divider hide-sm show-md hide-mc">|</div> <div class="divider hide-sm show-md hide-mc">|</div>
<div class="{{#if message_id}}hide-lg{{else}}hide-sm show-md hide-mc{{/if}}"> <div class="{{#if message_id}}hide-lg{{else}}hide-sm show-md hide-mc{{/if}}">
{{> compose_control_buttons_in_popover}} {{> popovers/compose_control_buttons/compose_control_buttons_in_popover}}
</div> </div>
<a role="button" class="compose_control_button compose_draft_button hide-sm" tabindex=0 href="#drafts" data-tooltip-template-id="compose_draft_tooltip_template"> <a role="button" class="compose_control_button compose_draft_button hide-sm" tabindex=0 href="#drafts" data-tooltip-template-id="compose_draft_tooltip_template">
{{t 'Drafts' }} {{t 'Drafts' }}

View File

@ -52,7 +52,7 @@
<li>{{ user_type }}</li> <li>{{ user_type }}</li>
{{/if}} {{/if}}
{{!-- Display selected custom profile fields in this popover. --}} {{!-- Display selected custom profile fields in this popover. --}}
{{> user_custom_profile_fields profile_fields=display_profile_fields for_user_card_popover=true}} {{> ../../user_custom_profile_fields profile_fields=display_profile_fields for_user_card_popover=true}}
<li class="only-visible-for-spectators">{{t "Joined {date_joined}" }}</li> <li class="only-visible-for-spectators">{{t "Joined {date_joined}" }}</li>

View File

@ -77,12 +77,12 @@ run_test("t_tag", ({mock_template}) => {
"http://zulip.zulipdev.com/#narrow/stream/101-devel/topic/testing/near/99", "http://zulip.zulipdev.com/#narrow/stream/101-devel/topic/testing/near/99",
}; };
mock_template("actions_popover.hbs", true, (data, html) => { mock_template("popovers/actions_popover.hbs", true, (data, html) => {
assert.equal(data, args); assert.equal(data, args);
assert.ok(html.indexOf("Citer et répondre") > 0); assert.ok(html.indexOf("Citer et répondre") > 0);
}); });
require("../templates/actions_popover.hbs")(args); require("../templates/popovers/actions_popover.hbs")(args);
}); });
run_test("tr_tag", ({mock_template}) => { run_test("tr_tag", ({mock_template}) => {