23 Commits

Author SHA1 Message Date
Maneesh Shukla
bfdd28c638 banners: Hide empty banner-action-buttons using CSS.
Previously, the action buttons container was only hidden via
conditional rendering in the template. This commit adds a CSS-based
approach to also hide the container when it becomes empty, using the
:empty pseudo-class. This ensures correct behavior if we later have a
class of banners where the buttons area is dynamically updated, and
buttons are removed dynamically.
2025-08-13 10:31:18 -07:00
Maneesh Shukla
224fd3df6b banners: Fix asymmetric margin on banners.
This commit fixes the asymmetric margin on banners by conditionally
rendering the action buttons only if buttons are present. Otherwise,
empty action buttons were being rendered in the DOM, applying the gap
property between the banner label and the empty action buttons.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/asymmetric.20margin.20on.20banner.
2025-08-11 10:28:57 -07:00
apoorvapendse
33e728e586 user_membership: Use banner template to render messages.
We now resort to using banner template instead
of trying to maintain our own banners
in the stream subscription and user group
membership templates.

Fixes: https://chat.zulip.org/#narrow/channel/9-issues/topic/.F0.9F.8E.AF.20User.20add.20success.20banner.20squashed/near/2229035.
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-28 12:33:20 -07:00
apoorvapendse
c6a64b3c1d stream_subscription: Use banner template to render messages.
Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-28 12:33:20 -07:00
apoorvapendse
818a3365af banner: Allow label to be in HTML format.
This is done to later render the subscribe
success and error messages using the banner
template instead of using the banner classes
in the subscription/memebership templates
which requries us to duplicate the changes
in banner.hbs at these places to avoid
regressions.

Signed-off-by: apoorvapendse <apoorvavpendse@gmail.com>
2025-07-28 12:33:20 -07:00
Sayam Samal
d00cf1a0e8 banners: Improve responsiveness in normal banners.
This commit improves the responsiveness of normal banners by adopting a
flexbox layout for the label and action buttons. This change better
accommodates varying text lengths and button counts in the banners, due
to the natural flowy nature of flexboxes.

The key logic shift involves using `flex-basis` to manage layout
transitions: the label and the group of action buttons now wrap to
separate lines when the label's width is less than 60% of the banner
query container's width (60cqw).

This commit also updates the CSS for navbar banners to align with the
new flexbox layout between the label and the group of action buttons,
while also ensuring that the layout behavior of these banners remains
consistent with the previous implementation.
2025-07-23 12:01:33 -07:00
Sayam Samal
122d93d430 filter_input: Add explicit classname for filter clear button.
This commit adds an explicit "input-close-filter-button" classname to
the filter input clear button, improving the readability of the code.
2025-07-21 23:16:26 -07:00
Sayam Samal
3b0115dce7 inputs: Rename input.hbs partial block to input_wrapper.hbs. 2025-07-03 11:45:35 -07:00
Sayam Samal
71d75532fe inputs: Implement redesigned input component.
This commit serves as the base for the ongoing effort to standardize
redesigned input elements throughout the Zulip Web UI. It introduces a
new Handlebars partial block for inputs, located at
web/templates/components/input.hbs.

The partial can be used with the partial block syntax: {{#> input}},
allowing contributors to pass in the input element as a template. This
approach wraps the input with a consistent structure that includes
support for an icon and an action button. It also applies the necessary
styling to ensure visual and functional consistency across the web UI.

This commit also implements the filter input component at
/devtools/inputs/ showroom page for design discussions and prototyping.
2025-07-03 11:45:35 -07:00
Maneesh Shukla
61acebf0ce organization-settings: Redesign the buttons in the Users tab of organization settings.
- Manage user button -> Neutral icon
- Deactivate user button -> Danger icon
- Reactivate user button -> Success icon

Fixes part of #34200.
2025-04-10 11:32:43 -07:00
Sayam Samal
703acbaccc user_profile_modal: Update remove/unsubscribe buttons to action button.
This commit updates the remove and unsubscribe buttons in the user
profile modal to use the action button component.

Fixes part of #33027.
2025-04-04 12:26:36 -07:00
Maneesh Shukla
d0be7ec9f0 organization_settings: Restyle remaining sea-green button to action-button-quiet-brand.
Fixes part of #33130.
2025-03-11 14:08:34 -07:00
Maneesh Shukla
325f077d3f action_button: Rename type to attention to describe the attention level of the action button.
Currently, we are using type to describe the attention level of the
action button. We want to rename the type parameter to attention
as we need the type parameter separately for describing the type of
button.
2025-03-11 14:08:34 -07:00
Maneesh Shukla
b5dec3258f personal_settings: Restyle the profile, account & privacy settings btns.
This commit restyles the profile, account and privacy settings buttons
as follows:

- "Preview profile": action-button-quiet-brand
- Pencil for email editing: icon-button-brand
- "Change your password": action-button-quiet-brand
- "Deactivate account": action-button-quiet-danger
- "Manage your API key": action-button-quiet-brand

Fixes part of #33130.
2025-03-03 12:43:59 -08:00
Maneesh Shukla
78bd2dd5c0 personal_settings: Restyle "Add a new bot" and "Add alert word" button.
This commit restyles the profile, account and privacy settings buttons
as follows:

- "Add a new bot": action-button-quiet-brand
- "Add alert word": action-button-quiet-brand

Fixes part of #33130.
2025-03-03 12:43:59 -08:00
Maneesh Shukla
8a571a7ca2 button_properties: Add aria-label to buttons and aria-hidden to icons. 2025-03-03 12:43:59 -08:00
Sayam Samal
bd1ccfbf6d inline_topic_edit: Update styling for confirm and cancel buttons. 2025-02-26 17:26:35 -08:00
Sayam Samal
e729020d13 buttons: Set "button" type to prevent default submission in forms. 2025-02-26 17:26:35 -08:00
Sayam Samal
2723adac54 inline_topic_edit: Improve design of inline topic edit UI.
This commit improves the design of the inline topic edit UI by making
the following changes:
- Increases the dimensions of the text input element.
- Fixes the font scaling inside text input element.
- Replaces the old save and cancel buttons with the new icon buttons.

Fixes #33155.
2025-02-26 17:26:35 -08:00
Sayam Samal
97bbff54f4 buttons: Add option in hbs template to enable squared icon buttons. 2025-02-26 17:26:35 -08:00
Sayam Samal
c05bfba151 buttons: Use snake_case for the button handlebars template filenames.
This renames the button handlebars template filenames to follow the
snake_case naming convention used throughout the codebase.
2025-02-26 17:26:35 -08:00
Sayam Samal
028e9dc58a banners: Redesign desktop notifications navbar banner.
As part of the banner redesign project, this commit applies the new
banner styles to the desktop notifications navbar banner.

This commit also acts as a base for the following banner redesign
commits by defining the `banners.ts` module, which now acts as the
centralized module to handle the banner rendering and sets up the
common event listeners.
2025-01-30 10:17:39 -08:00
Sayam Samal
6dabfa02cb banners: Add new redesigned banner component.
This commit adds the redesigned banner component to the codebase along
with a storybook-style page in /devtools/banners to view and test the
redesigned banner component.

Any banner using the new redesigned styles, requires two classes,
- First, the base `banner` class which defines the structure and
    behavior of the banner.
- Second, a modifier class like `banner-info` which defines the styles
    for the particular banner type.

The navbar alert banners also have a custom class `navbar-alert-banner`
which is used to define the specific style and structure for these
banner types.

This commit also makes the `banner`, `action-button` and `icon-button`
components into handlebar templates to maintain consistency in their
usage in the codebase.
2025-01-13 17:46:13 -08:00