mirror of
https://github.com/zulip/zulip.git
synced 2025-11-14 10:57:58 +00:00
refactor: Move simplebar helper functions from ui to scroll_util.
This commit eliminates the `ui.js` module from the codebase by moving all simplebar helper functions to the `scroll_util` module.
This commit is contained in:
@@ -12,7 +12,6 @@ import * as overlays from "./overlays";
|
||||
import * as people from "./people";
|
||||
import * as scroll_util from "./scroll_util";
|
||||
import * as settings_data from "./settings_data";
|
||||
import * as ui from "./ui";
|
||||
import * as user_group_create from "./user_group_create";
|
||||
import * as user_group_edit from "./user_group_edit";
|
||||
import * as user_groups from "./user_groups";
|
||||
@@ -124,7 +123,9 @@ export function add_group_to_table(group) {
|
||||
});
|
||||
|
||||
group_list_widget.replace_list_data(user_groups.get_realm_user_groups());
|
||||
ui.get_content_element($("#groups_overlay_container .settings")).append($(settings_html));
|
||||
scroll_util
|
||||
.get_content_element($("#groups_overlay_container .settings"))
|
||||
.append($(settings_html));
|
||||
|
||||
// TODO: Address issue for visibility of newely created group.
|
||||
if (user_group_create.get_name() === group.name) {
|
||||
@@ -187,7 +188,9 @@ export function setup_page(callback) {
|
||||
|
||||
const rendered = render_user_group_settings_overlay(template_data);
|
||||
|
||||
const $groups_overlay_container = ui.get_content_element($("#groups_overlay_container"));
|
||||
const $groups_overlay_container = scroll_util.get_content_element(
|
||||
$("#groups_overlay_container"),
|
||||
);
|
||||
$groups_overlay_container.empty();
|
||||
$groups_overlay_container.append(rendered);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user