Commit Graph

144 Commits

Author SHA1 Message Date
Aman Agrawal e5e5ba6cea css: Scale typeaheads / dropdowns with font size.
Fixes #30780

Adjusted both width and line height of typeaheads and dropdown widgets
to scale font size.
2024-07-10 12:56:58 -07:00
Sayam Samal 1b1f2411d8 user_group_popover: Redesign popover using the new "popover-menu" theme.
As part of the popover menu redesign, this commit redesigns the user
group info popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.

Fixes part of #28699.
2024-07-10 12:54:05 -07:00
Aman Agrawal 469582a974 giphy: Style search input same as dropdown widget.
Fixes #26929
2024-06-28 11:24:12 -07:00
Sayam Samal b616f013f0 gear_menu: Add theme switcher to the gear menu popover.
Standardize theme selection across the web app by replacing separate
light/dark theme menu options being used in the spectator view with the
new 3-way theme switcher.

Fixes #30318.
2024-06-27 16:24:49 -07:00
Aman Agrawal edb02fcc98 giphy: Fix focus outline left vertical line not visible. 2024-06-27 09:19:23 -07:00
adnan-td 4bde1586e4 topic_name: Fix compressing of display topic names.
Fixes part of #30478.
2024-06-26 12:23:32 -07:00
Karl Stolley 818094f81d user_circles: Set user circles to scale with text. 2024-06-26 10:01:24 -07:00
Sayam Samal f81f26116f left_sidebar: Redesign condensed view popover.
This commit also sets all popover labels to flex grow into the remaining
available space. This allows us to align the unread counters, if any
to the rightmost corner of the menu option. This change, however, does
not lead to visual changes in any popover.

Fixes part of #28699.
2024-06-17 18:32:57 -07:00
Sayam Samal 01cbaa154f popovers: Add `.popover-menu-tab-group` class to popover tab pickers.
This commit, adds the `.popover-menu-tab-group` class to the tab pickers
that appear together with the other popover menu options and thus
need to match their spacing and margins for a uniform look.

This removes the need to maintain a cluttered list of tab pickers that
need to be styled as such in the `popovers.css` file.
2024-06-10 16:54:11 -07:00
Sayam Samal 70fb213868 visibility_policy_popover: Use the new "popover-menu" popover theme.
As part of the popover menu redesign, this updates the topic visibility
popover to use the new "popover-menu" popover theme and improves
accessibility by using appropriate ARIA attributes.

This also moves the `:focus-visible` CSS rule to apply to any tab
picker in a popover, removing the need to explicitly add it to each
tab picker.

Fixes part of #28699.
2024-06-10 16:54:11 -07:00
Sayam Samal 09bf7d0f95 personal_menu_popover: Move the theme switcher to the settings group.
This moves the theme switcher from the randomly placed position to the
settings group since it is one of the user preference settings.
2024-06-05 11:16:55 -07:00
Sayam Samal d93a3bb175 topic_sidebar_actions: Use sliding animation in the visibility switcher.
This commit updates the sidebar topic actions popover to use the new
sliding tab switcher for the topics visibility policy switcher.

This also includes changes such as hiding the popover only on
successful request completion, and adds error feedback by indicating
it via the sliding animation.
2024-06-04 15:56:44 -07:00
Sayam Samal db4c5cdfc6 visibility_policy_popover: Use sliding animation in the switcher.
This commit updates the topic visibility popover to use the new
sliding tab switcher, which was introduced in personal menu >
theme switcher.
2024-06-04 15:56:44 -07:00
Aman Agrawal ddf14116b2 emoji_popover: Fix white arrow color in dark theme.
Tested left, top and bottom placement of emoji popover to check
if arrow color is correctly displayed in both dark and light theme.
2024-05-31 15:39:09 -07:00
Sayam Samal 34e6d84cf5 topic_actions_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
    offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
    or`role="menuitemradio"` to child elements based on their function.

- `role="group"` to the topic visibility picker, identifying it as a
    container for related menu items.

- `role="none"` to `<li>` elements, removing the implied `listitem`
    role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00
Sayam Samal ed9d2a7af6 gear_menu_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
  offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
  or`role="menuitemradio"` to child elements based on their function.

- `role="none"` to `<li>` elements, removing the implied `listitem`
  role that conflicts with the parent menu structure.
2024-05-31 15:28:01 -07:00
Sayam Samal 3c1d248abe message_actions_popover: Flatten nested lists for better accessibility.
This refactors popover list structure to use a flattened `ul > li`
structure along with aria-related additions, enabling screen reader
accessibility and announcing menu length and position (`# of n`).

Added ARIA roles:
- `role="menu"` to the parent `<ul>` element, indicating it is a widget
  offering a list of choices.

- `role="menuitem"`, `role="menuitemcheckbox"`,
  or`role="menuitemradio"` to child elements based on their function.

- `role="none"` to `<li>` elements, removing the implied `listitem`
  role that conflicts with the parent menu structure.

Also removes the unused `should_display_reminder_option` code, which
should have been removed in f40855bad2.
2024-05-31 15:27:30 -07:00
Isabela Pereira fee0470a97 popovers: Refine word wrapping in user profile.
This commit refines word wrapping in user profile popovers. It implements 'overflow-wrap: break-word;' for category ‘name’ items (e.g., ‘Email’, ‘User ID’) and 'overflow-wrap: anywhere;' for category ‘value’ segments, ensuring proper line breaks and preventing overflow issues. Additionally, addressed prettier problems to maintain code consistency.

Fixes #22865
2024-05-15 17:20:21 -07:00
Aman Agrawal 4e87f35c7d typeahead: Use tippy to position typeaheads without a specified parent.
Except for search typeaheads which have a specific parent container,
we position typeaheads using tippy.
2024-05-08 10:05:27 -07:00
Pratik 3b2bf7b2b9 modal_css: Refactor css of header of user profile modal.
This commit enhances the layout of user profile modal header by using
flexbox properties.
2024-05-06 18:14:40 -07:00
Pratik fdbce9d889 profile_modal: Replaces underscore style classes with hyphenated one.
This commit replaces the underscore-style classes of user profile modal
with the hyphenated one.
2024-05-06 18:14:40 -07:00
Sayam Samal 4394e87ef1 popovers: Move from global popover min-width to per-popover basis.
This removes the common min-width being used across all popovers and
instead sets the min-width according to a popover's requirements.

This allows for greater control over the popovers since we have a
variety of use cases for them — which a single common min-width cannot
accommodate.
2024-05-02 13:31:37 -07:00
Sayam Samal c3e43586c8 topic_popover: Redesign popover using the "popover-menu" tippy theme. 2024-04-26 10:35:21 -07:00
Sayam Samal de25006c3d stream_popover: Redesign popover using the "popover-menu" tippy theme. 2024-04-26 10:35:21 -07:00
CIC4DA ff41a95f5f user_group_info_popover: Add the zulip-triple-user-icon.
Fixes: zulip#28756
In this commit, we are adding a triple-user-icon in front of the group's name in the user_info_group_popover.
2024-04-24 17:37:38 -07:00
Sayam Samal 7744c8b264 actions_popover: Fix content overflowing when the max-width is defined.
The simplebar core documentation, recommends to not style the element
initalising the simplebar at all and use an inner element instead.

Following the recommendation, we move the max-width property from the
popover tippy options, to the `.simplebar-content` element via the
`--popover-menu-max-width` custom property.

While doing so, we also simplify the max-width to `350px`, since the
responsiveness for smaller screen is already been taked care of in the
shared popover styling.

This prevents the issue where the content overflows and gets hidden
instead of wrapping, when the width of the popover reaches the set
max width (if any).
2024-04-11 15:57:24 -07:00
Sayam Samal f9ec17e78e popovers: Fix styling for multi-line menu options. 2024-04-11 15:57:24 -07:00
Sayam Samal 678a3eccab popovers: Fix width discrepancies in popover menus.
Following ca9b1060b7, we allow the content of popover menu items to
control the width of the popover.

While using `white-space: nowrap` works, we should instead use the
`max-content` intrinsic sizing so that, if necessary, we can still
provide a `max-width` to the popover which would then force the popover
menu content to wrap.
2024-04-11 15:57:24 -07:00
Sayam Samal ba64900373 popovers: Simplify popover menu top and bottom padding. 2024-04-11 15:57:24 -07:00
Sayam Samal 4105a38c1f popovers: Add minimum width to popover hotkey hints. 2024-04-11 15:57:24 -07:00
Sayam Samal dcb6252e57 popovers: Update popover hotkey hint colors. 2024-04-11 15:57:24 -07:00
Sayam Samal 19077fa1f6 actions_popover: Update icons for message actions menu options. 2024-04-11 15:57:24 -07:00
Sayam Samal 299aa7c39f popovers: Add hotkey hints support via a new handlebar template. 2024-04-11 15:57:24 -07:00
Sayam Samal 4b0e6ae3d8 actions_popover: Use the new "popover-menu" theme.
Fixes part of #28699.
2024-04-11 15:57:24 -07:00
Sayam Samal 422230e82d popovers: Add consistent tippy arrows which support all placements.
Added `tippy.js/dist/border.css` along with some custom CSS override,
to add arrows which inherit the border color and width of the popover,
while also supporting all placements.

Also consolidates the CSS styling of the popovers to the `tippy-box`
element, which is the recommended way to theme the element according to
https://atomiks.github.io/tippyjs/v6/themes/#creating-a-theme.
This further helps in unifying the styling of the popover and the arrow,
and prevents inconsistencies such as shadow of the popover being casted
onto the arrows.
2024-04-11 15:57:24 -07:00
Sayam Samal 6bf9c2bdfc popovers: Rename "navbar-dropdown-menu" theme to "popover-menu" theme.
Also renames the navbar dropdown related CSS terms, to their equivalent
popover related terms to accompany the name change of the theme.
2024-04-11 15:57:24 -07:00
Sayam Samal d469d37d14 personal_menu: Add theme switcher to personal menu popover.
This commit introduces a theme switcher feature within the personal
menu popover. The implementation begins with the development of a
tab picker, which has the following features:

* Utilization of radio buttons to emulate the tab picker.
    Radio input buttons provides the native way in HTML to select one
    value out of a set.

* Support for both horizontal (default) and vertical orientations.
    Vertical orientation can be achieved by appending the
    `.tab-picker-vertical` class.

* Respects the `prefers-reduced-motion` option set by the user.
    Disables the sliding tab animation to improve accessibility.

Additionally, the theme switcher component incorporates error handling
mechanisms. In the event of a server/network error, the tab slider
reverts to the previous theme option after a delay of 500ms. This
behavior visually communicates the occurrence of an error to the user,
improving the UX.

Fixes: #22803.
2024-03-25 16:31:55 -07:00
Mahhheshh 1c48ed0a1c stream picker: Remove stream colorblock.
To achive this the `stream_header_colorblock` div was removed from
`dropdown_widget_with_stream_colorblock.hbs` template. this change made
the file name irelevenet so it was necessary to rename the file to
`dropdown_widget_wrapper.hbs`. After removing the html strcuture for
colorblock from templates the css for colorblock was also removed.
followed by the javascript which was used to add colorblock to the
stream picker. After removing javascript tests were updated.
Fixes: #28796.
2024-03-15 11:11:04 -07:00
shashank-23002 d6219e93a8 popover: Rename user-card-status-text. 2024-02-20 18:10:38 -08:00
Aman Agrawal e6718369d6 css: Apply fa-chevron-down CSS to zulip-icon-chevron-down.
This was missed as part of #27577 migration.
2024-02-20 15:16:56 -08:00
Pratik 4f89a0f605 user_profile: Add "copy link to profile" button in user_profile_modal.
This commit adds a "copy link to profile" button in user_profile_modal.
Clicking on this button copies the user's profile link and displays a
"Copied!" tooltip.
2024-02-15 17:17:38 -08:00
Sayam Samal e3878cf64a popovers: Add structural changes and fix CSS overlap.
The paragraph tag was being used along with the bold tag to style the
topic and stream in the popovers. The semantic meaning of these tags
are more specialized and should not be used in this context. Replaced
the <p> tags with the more general <div> tags and accounted for the
bold text via the `font-weight` CSS property.

The `.topic-name` class, used to style the topic/stream name in the
topic list in the left sidebar, was also being used to the style the
topic/stream name in the topic/stream popover. This lead to irrelevant
properties being applied to the popover > topic/stream name. Through
this commit, the styling for both of these different cases are now
separated using the appropriate selectors.

Fixes #27562.
2023-12-11 12:55:25 -08:00
Sayam Samal be31f7a5e6 streams_popover: Change stream name alignment from center to left.
Introduced `display: flex` to help with the align of the stream privacy
icon with the stream name text.
2023-12-11 12:55:25 -08:00
Sayam Samal 10aad0a9f3 streams_popover: Allow soft wrap opportunities for stream name.
When a stream name becomes very long, it may stretch the popover menu
by a lot. We prevent this by allowing the stream name to wrap onto
multiple lines.
2023-12-11 12:55:25 -08:00
Sayam Samal a2733c7bc3 streams_popover: Set popover width equal to width of longest menu item.
We set the streams popover width to be equal to the width of the longest
menu item, via the min-content intrinsic sizing. We also set all the
menu items to `white-space: nowrap` to prevent them wrapping. These
two changes allow the menu items to dictate the width of the popover
instead of a static max-width property, and thus helps with languages
where the length of the translated item may be long enough to wrap.
2023-12-11 12:55:25 -08:00
Sayam Samal 27ca8b0360 topics_popover: Remove '>' icon adjacent to the topic name. 2023-12-11 12:55:25 -08:00
Sayam Samal a9e0871f59 topics_popover: Change topic name alignment from center to left. 2023-12-11 12:55:25 -08:00
Sayam Samal b8fee4f176 topics_popover: Allow soft wrap opportunities for topic name.
When a topic name becomes very long, it may stretch the popover menu
by a lot. We prevent this by allowing the topic name to wrap onto
multiple lines.
2023-12-11 12:55:25 -08:00
Sayam Samal 8b128f4b59 topics_popover: Set popover width equal to width of longest menu item.
We set the topics popover width to be equal to the width of the longest
menu item, via the min-content intrinsic sizing. We also set all the
menu items to `white-space: nowrap` to prevent them wrapping. These
two changes allow the menu items to dictate the width of the popover
instead of a static max-width property, and thus helps with languages
where the length of the translated item may be long enough to wrap.
2023-12-11 12:55:25 -08:00
Sayam Samal e5f2211397 gear_menu_popover: Align org info menu items to the left. 2023-12-11 12:25:09 -08:00