Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
user_profile: Migrate membership banners to new banner component.
Pratik Chanda3743096d8b98
diff --git a/web/src/user_profile.ts b/web/src/user_profile.tsindex bd836dfaafb..876b2f0530b 100644--- a/web/src/user_profile.ts+++ b/web/src/user_profile.ts@@ -611,10 +611,15 @@ function add_user_to_groups(group_ids: number[], user_id: number, $alert_box: JQfunction add_user_to_next_group(): void {if (group_ids_successfully_added.length >= group_ids.length) {if (group_ids_successfully_added.length > 0) {- ui_report.success(- $t_html({- defaultMessage: "Added successfully!",- }),+ banners.open_and_close(+ {+ intent: "success",+ label: $t({+ defaultMessage: "Added successfully!",+ }),+ buttons: [],+ close_button: false,+ },$alert_box,1200,);@@ -662,7 +667,15 @@ function add_user_to_groups(group_ids: number[], user_id: number, $alert_box: JQ},);- ui_report.client_error(error_message, $alert_box);+ banners.open(+ {+ intent: "danger",+ label: error_message,+ buttons: [],+ close_button: false,+ },+ $alert_box,+ );clear_successful_pills();},});@@ -1529,7 +1542,18 @@ export function initialize(): void {const $alert_box = $("#user-profile-groups-tab .user-profile-group-list-alert");function removal_success(): void {- ui_report.success($t_html({defaultMessage: "Removed successfully!"}), $alert_box, 1200);+ banners.open_and_close(+ {+ intent: "success",+ label: $t({+ defaultMessage: "Removed successfully!",+ }),+ buttons: [],+ close_button: false,+ },+ $alert_box,+ 1200,+ );}function removal_failure(): void {@@ -1547,7 +1571,16 @@ export function initialize(): void {);}- ui_report.client_error(error_message, $alert_box, 1200);+ banners.open_and_close(+ {+ intent: "danger",+ label: error_message,+ buttons: [],+ close_button: false,+ },+ $alert_box,+ 1200,+ );}user_group_edit_members.edit_user_group_membership({diff --git a/web/styles/popovers.css b/web/styles/popovers.cssindex 4d07bc0b146..b2e8de3e493 100644--- a/web/styles/popovers.css+++ b/web/styles/popovers.css@@ -564,7 +564,7 @@ ul.popover-group-menu-member-list {/ minmax(0, 1fr);.stream_list_info:has(.banner),- .user-profile-group-list-alert {+ .user-profile-group-list-alert:has(.banner) {grid-area: alert;margin-bottom: 8px;}diff --git a/web/templates/user_profile_modal.hbs b/web/templates/user_profile_modal.hbsindex d7eef933d87..c23bd91112b 100644--- a/web/templates/user_profile_modal.hbs+++ b/web/templates/user_profile_modal.hbs@@ -144,7 +144,7 @@</div><div class="tabcontent" id="user-profile-groups-tab">- <div class="alert user-profile-group-list-alert"></div>+ <div class="user-profile-group-list-alert banner-wrapper"></div><div class="group-list-top-section"><div class="header-section"><h3 class="group-tab-element-header">{{t 'Group membership' }}</h3>