Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
stream_color: Add confirm button to the color picker popover.
Sayam Samal0a0a030fcadf
diff --git a/web/src/color_picker_popover.ts b/web/src/color_picker_popover.tsindex e989c64b296..13e597ee0a2 100644--- a/web/src/color_picker_popover.ts+++ b/web/src/color_picker_popover.ts@@ -110,6 +110,10 @@ export function toggle_color_picker_popover(update_stream_color_debounced(new_color, stream_id, $popper);},);++ $popper.on("click", ".color_picker_confirm_button", () => {+ popover_menus.hide_current_popover_if_visible(instance);+ });},onHidden(instance) {instance.destroy();diff --git a/web/styles/color_picker.css b/web/styles/color_picker.cssindex 730a585f490..b532f4a817b 100644--- a/web/styles/color_picker.css+++ b/web/styles/color_picker.css@@ -37,8 +37,7 @@left: 0;width: 100%;height: 100% !important;- opacity: 0 !important;- cursor: pointer;+ visibility: hidden;}.custom-color-swatch-icon {@@ -50,6 +49,11 @@border: none;}-.color-picker-popover .stream_label {- padding-right: 5px;+.color_picker_confirm_button {+ height: 100%;++ &:focus-visible {+ outline: 1px solid var(--color-outline-focus);+ outline-offset: -2px;+ }}diff --git a/web/templates/popovers/color_picker_popover.hbs b/web/templates/popovers/color_picker_popover.hbsindex c1cf01a4707..809a7299c0e 100644--- a/web/templates/popovers/color_picker_popover.hbs+++ b/web/templates/popovers/color_picker_popover.hbs@@ -13,6 +13,9 @@ {{/if}}</div>+ <button class="color_picker_confirm_button icon-button icon-button-square icon-button-neutral tippy-zulip-delayed-tooltip" data-tooltip-template-id="color-picker-confirm-button-tooltip-template" aria-label="{{t 'Confirm new color' }}" tabindex="0">+ <i class="zulip-icon zulip-icon-check"></i>+ </button></div></div><ul role="menu" class="popover-menu-list">diff --git a/web/templates/tooltip_templates.hbs b/web/templates/tooltip_templates.hbsindex faccb613e3d..c20a667bc40 100644--- a/web/templates/tooltip_templates.hbs+++ b/web/templates/tooltip_templates.hbs@@ -260,3 +260,6 @@<template id="mobile-push-notification-tooltip-template">{{t 'Mobile push notifications are not enabled on this server.' }}</template>+<template id="color-picker-confirm-button-tooltip-template">+ {{t 'Confirm new color' }}+</template>