Commit Graph

1119 Commits

Author SHA1 Message Date
Shubham Padia 2b572628d0 user_group_popover: Don't show group settings link for system groups.
System groups are immutable and that's why we should remove the group
settings link from the group popover for system groups.
2024-07-12 15:22:50 -07:00
adnan-td 6f4d14ddde stream_pill: Add channel privacy icons in input_pill.
Modify stream pills to add channel privacy decorations inside
input pills for areas eg: the UI for adding members to a channel.

Partly fixes: #25257.
2024-07-12 15:00:02 -07:00
Sayam Samal 724c91d127 user_card_popover: Add user-card-specific class to the email field. 2024-07-12 13:03:40 -07:00
Sayam Samal 50645ffd7e user_card_popover: Use different selector for clear status tooltip. 2024-07-12 13:03:40 -07:00
Sayam Samal 7232ff68f8 user_card_popover: Enable keyboard nav for custom field copy buttons. 2024-07-12 13:03:40 -07:00
Sayam Samal 8ead2035bf user_card_popover: Enable keyboard navigation for email copy button. 2024-07-12 13:03:40 -07:00
Sayam Samal d707c9f779 user_card_popover: Change success behavior of the email copy button.
Previously, when the email was successfully copied via the email copy
button, the email in the user card popover was replaced with a "Email
copied!" message.

This commit replaces this behavior with a more subtle approach, where
only the tooltip of the email copy button changes to "Copied!".
2024-07-12 13:03:40 -07:00
Sayam Samal eb5bef8ff5 user_card_popover: Redesign user card popover for unknown user.
This commit extends the user card popover redesign to the case where
the guest is not allowed access to view some of the other users'
profiles due to a change in the
"Who can view all other users in the organization" permission.

Fixes #27338.
2024-07-12 13:03:40 -07:00
Sayam Samal 9bd8a0c72c user_card_popover: Move manage user menu options to user card popover.
This commit removes the manage user menu popover and moves the
options contained within it directly to the parent user card popover.
2024-07-12 13:03:40 -07:00
Sayam Samal 60d1993ed8 user_card_popover: Redesign popover using the new `popover-menu` theme.
As part of the popover menu redesign, this commit redesigns the user
card popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.
2024-07-12 13:03:40 -07:00
Sahil Batra 5e5633b5ee settings: Remove user_role class from bot owner column.
We do not allow wrapping text randomly for user role values,
but since bot owner names can be long we do not want to do
that for bot owner column. So, this commit removes the
user_role class which is responsible for adding the required
CSS rule for role values.
2024-07-12 10:35:22 -07:00
Sahil Batra 91cf69f6a1 settings: Set min-width of table columns for narrow screens.
This commit adds minimum width property for different columns
such that the columns do not get too small for narrow screens
and the tables can be scrolled horizontally to view the content.
2024-07-12 10:35:22 -07:00
Sahil Batra 19cc948573 settings: Fix custom profile fields UI for narrow screens.
This commit adds "progressive-table-wrapper" class so that
the width property is correctly set and UI is correct for
narrow screens. Also, other properties added by that class
are fine.
2024-07-12 10:35:22 -07:00
Sahil Batra 025d4cc288 settings: Remove unused admin-table-wrapper class.
This class is not used anywhere, so there is no need for
this.
2024-07-12 10:35:22 -07:00
Shubham Padia 2becb41931 settings_users: Reactivated user should not get un-greyed on sort.
On reactivate or deactivate, we add appropriate class through JQuery.
But that class only remains there until sort, on sort any of these added
classes will be removed. We did not face the problem of un-greying for
active users page, because deactivated_users class was added to the HTML
always if `is_active` was false for the user.
In this commit, we rename `reactivated_user` to `active-user` and this
class will be present for all active users, even on the active users
table. For the deactivated users table, we will have scoped css that
will grey out the row with `active-user` class.
2024-07-11 12:16:12 -07:00
dhruv-goyal-10 0dc8402221 settings: Don't show last active in deactivated users table.
Fixed #29894.
We were using `is_active` to determine whether to show that column or
not. In case of deactivated table, on reactivating a user, `is_active`
will become true for that user, but we still don't want to show that
column and mess up our layout. Same would happen in the active users
table when a user was deactivated and the `is_active` would become
false. It is better to control the column to be shown on a per-table
basis and we introduced `display_last_active_column` to control that.

Co-authored-by: shubham-padia <shubham@zulip.com>
2024-07-11 12:16:12 -07:00
Shubham Padia 6c152b3adc account_settings: Make change password similar to other setting buttons.
Fixes #30691.
We've removed the pencil icon and renamed the button to `Change your
password`. We've also removed the `.small` and `.btn-link` classes.
We also changed the `Password` label to use the `.settings-field-label`
class, same as the other labels for settings.
2024-07-11 09:49:27 -07:00
Shubham Padia 73e9d9da64 account_settings: Make change email similar to other settings buttons.
We removed the pencil icon, `.btn-link` and `.small` classes.
We also changed the `Email` label to use the `.settings-field-label`
class, same as the other labels for settings.
2024-07-11 09:49:27 -07:00
Shubham Padia 6085212574 settings: Make change language button similar to other settings buttons.
We've removed the pencil icon and removed the `.small` class from the
button.
This setting button is being used in two places: Changing your personal
language and changing the org-wide language for emails. That is why
we have used the `Change the language` generic tooltip instead of
`Change your language` tooltip.
2024-07-11 09:49:27 -07:00
Shubham Padia 08ee4be121 account_settings: Remove unused id and classes for password field.
`.change_password_button` and `#pw_change_link` were unused.
I've not checked for any other unused classes in this page, only
the password field. This was noticed when trying to make a layout
change for the password field and the change was moved to a preparatory
commit for the same.
2024-07-11 09:49:27 -07:00
Sayam Samal 15e26b9f32 stream_popover: Enable popover for spectators.
This enables the stream popover for spectators, by unhiding the triple
vertical dots button in the stream sidebar row.

In the spectators' version of the popover, we only show the
"Copy link to channel" option.

Fixes part of #30529.
2024-07-11 09:44:57 -07:00
Sayam Samal 2c604666f9 stream_popover: Add menu option to copy channel link to clipboard.
Now that the channel name in the left sidebar links to the topmost
topic, we add a new menu option that lets us copy the channel feed link
to the clipboard.

Fixes part of #30529.
2024-07-11 09:44:57 -07:00
Sayam Samal b3be4150d9 stream_popover: Reorganize the menu options in the channel popover.
This commit reorganizes the channel actions popover to group related
actions together.

As noted by Alya Abbott in CZO, the logic behind the grouping is as
follows:
* The top section is things you might do as part of your workflow for
  using Zulip.
* The second section is for managing the channel itself.
* "Change color" is kept independently in the last section because of
  how the color picker takes over a big chunk of the menu when opened.

Fixes part of #30529.
2024-07-11 09:44:57 -07:00
iks1 10c15de0c6 popovers: Simplify instructions for moving topics/messages.
Modified the `Select a channel below or change topic name.`
instruction in `move topics/move messages` modal.
It's not necessary and can be confusing when user does not
have permissions to change the channel and topic name.

1) On the `Move topic` modal, dropped the line
2) On the `Move messages` modal, replaced the
   line with `Move messages to:`

Fixes #30055.
2024-07-10 20:35:40 -07:00
Sayam Samal 98c825ebfe send_later_popover: Rename "Drafts" -> "View drafts".
This makes the drafts option more consistent with the rest of the menu
options, which use the imperative mood.
2024-07-10 15:05:37 -07:00
Sayam Samal e0ec522f70 send_later_popover: Redesign popover and add accessibility improvements.
As part of the popover menu redesign, this redesigns the compose send
options popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.

Fixes #25117.
2024-07-10 15:05:37 -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
Kislay Verma cc7df6d85b presence: Sync presence indicators across the frontend.
User circles indicating their presence are now synced across
all the places they appear, except for:
- navbar_personal_menu_popover - since the status
   there will never change.
- typeahead_ist_item - because it is short-lived.

Fixes #30536
2024-07-10 11:01:44 -07:00
evykassirer 11bb44c7cc search pills: Direct message group pill support.
This supports adding users to DM pills by simply typing
a user's name in the text input directly after a complete
dm pill. It only works for DM pills at the end of search
input.

Clicking the X button removes a user from its user pill
container, and if that user was the last user left in the
container, then the whole container is also removed.
2024-07-09 17:08:45 -07:00
evykassirer a39fe910d8 search pills: Use grid to support pill overflow styling.
Previously, search pill overflow was broken (sticking out of the
search box to the right) and now the search bar extends vertically to
allow pills to wrap when there are too many pills for one line.
2024-07-09 17:08:45 -07:00
evykassirer 38e58ea3d6 search: Use pills in the search bar.
This initial commit is fairly bare-bones, and does not have the full
contemplated functionality.
2024-07-09 17:08:45 -07:00
evykassirer 0ab4f84561 search: Move search from input field to contenteditable div for pills.
There's still a bug when opening the search bar where the input
isn't selected. But I'm not worrying too much about that because
that text is about to be replaced with pills.
2024-07-09 17:08:45 -07:00
Tim Abbott f7c9c0753b invite_user: Streams => Channels in placeholder.
The PR adding this stream was written before the streams/channels
transition.
2024-07-09 16:42:23 -07:00
Alya Abbott df578e9264 onboarding: Update introductions to Inbox and Recent conversations.
- Make more succinct; don't over-describe UI the user can't see yet.
- Remove links (there are help links in view descriptions now).
- Explain where topics come from.
2024-07-09 15:55:50 -07:00
Tim Abbott cda201176c popovers: Disable autocomplete on popover filter widgets. 2024-07-09 15:46:49 -07:00
Aman Agrawal 153f983b01 settings: Allow tab switcher text to expand to show full text.
Instead of showing ellipsis if the content of the tab switcher is
more than the width, we now allow it to take more width to show
full text.

If we don't have enough space to show the full text to show on
small screen sizes, we use ellipsis for overflowing text.

Increased sidebar width by 5px to accomodate full tab switcher
at both 14px and 16px font sizes.
2024-07-09 13:18:03 -07:00
tnmkr 4563fe07bc stream_settings: Fix "Advanced configurations" always enabled.
This new section was added in ea2d92d934.
This bug caused settings in this section to not be disabled even when
the user lacked permissions to be able to change these settings.
2024-07-09 13:11:53 -07:00
shashank-23002 d6146d77c1 tooltips: Use tippy to display tooltips.
Fixes: #27817
Co-Authored-By: linn.peterson <linn@pajp.net>
Co-Authored-By: Aman Agrawal <amanagr@zulip.com>
2024-07-09 13:09:56 -07:00
Aman Agrawal ad4a1a316d typeahead: Fix typeahead items wrapping to next line. 2024-07-09 09:42:10 -07:00
Aman Agrawal 84f22440dd rendered_markdown: Fix text wrapping in message view header.
For elements that can wrap in a rendered markdown, we don't want them
to in places like message view header.
2024-07-09 09:42:10 -07:00
Vector73 6098c2cebe settings: Add two realm settings to restrict direct messages.
Fixes #24467.
2024-07-08 19:34:17 -07:00
Alya Abbott cd7ee31acf help: Consistently refer to interleaved channel view as "channel feed". 2024-07-08 16:17:13 -07:00
Aman Agrawal 3e16d61015 stream_sidebar_row: Show stream sidebar menu icon for spectators.
Fixes #30565

Allow spectators to access stream sidebar popover so that they can
select go to channel feed.
2024-07-08 13:56:13 -07:00
sujal 6589720424 stream_sidebar: Implement stream navigation behavior.
Clicking on the name of a stream in the left sidebar
now navigates to the top topic in the left sidebar
view of that stream, rather than an interleaved view.

Added an "interleaved" button to the stream popover row in the
left sidebar that appears only when the user hovers over it.

Fixes #26937.

Co-authored-by: Aman Agrawal <amanagr@zulip.com>
2024-07-08 13:56:13 -07:00
Aman Agrawal 9fc6b93347 user_settings: Add option to configure channel click behavior.
This commit does not implement the setting's behavior, just the API
change and settings UI.
2024-07-08 13:56:13 -07:00
Shubham Padia 76e8ec114a pm_list: Add search to direct message section.
Fixes #22113.

The search will only be visible when in the `more conversations`
view. Once we click `back to channels` and close the
`more conversations` view, the search will clear and the search
box will disappear.

We've chosen `pm_list_data.get_conversations` as the function
to which we will pass our search term. We could have technically
found the value of the filter element via JQuery in pm_list_data,
but pm_list_data does not handle any JQuery and we should keep
it that way.

`pm_list_data.get_list_info` also accepts the search_string so that
the info it returns in expanded view is accurate.

We've also added some code to `click_handlers` to make sure that
clicking the search input does not bring us into the DM narrow.
2024-07-08 13:17:05 -07:00
Prakhar Pratyush 83414db72e settings: Add 'web_navigate_to_sent_message' setting.
In a2ef1d7e93, we made changes so
that when you send a message, your view jumps to the conversation
where you sent it.

For some users it was an improvement, few reported that it
disrupts their workflows.

This prep commit adds a setting which will be used to allow users
to decide whether to automatically go to conversation where they
sent a message.
2024-07-08 13:00:12 -07:00
Shubham Padia 8782625f07 left_sidebar: Remove `#direct-messages-sticky-header`.
We clean up unnecessary nesting in this commit and replace one
usage of `#direct-messages-sticky-header` with
`#direct-messages-section-header`. Since `.direct-messages-container`
was being used along with `#direct-messages-sticky-header` at multiple
places, just removing the nesting would break those selectors. For those
selectors, they have been refactored to just look for
`#direct-messages-section-header` instead. `.direct-messages-container`
specific selectors still exist but they apply to both instances of
`.direct-messages-container`, the DM header and the DM list.
2024-07-08 11:43:02 -07:00
Shubham Padia 737e075cc3 left_sidebar: Remove unnecessary nested `#direct-messages-section`.
`#direct-messages-section-header` will take over existing behaviour of
`#direct-messages-section`.
2024-07-08 11:43:02 -07:00
Shubham Padia 847ff6ee21 left_sidebar: Rewrite `back to channels` to use css grid.
While the TODO comment we deleted in left_sidebar.css says we need to
rewrite both show more and show less button to grids; show more was
already a grid.
There have been some very slight changes in the actual size of the back
to channels row; those changes make the row more consistent with the
rest of the left sidebar rows in terms of sizing.

We've introduced a new class called `.hide-more-direct-messages-text`
that applies the same properties as the `span` selector used to. We are
using a class because of better performance when selecting, see
https://chat.zulip.org/#narrow/stream/6-frontend/topic/CSS.20selector.20performance/near/1845719
for more info on the why,
The `font-size` was moved inside the above class, so that when setting
the line-height of the anchor component, the `em` refers to the normal
font size and not the smaller font size for `back to channels`.

We've moved the link inside `.direct-messages-section-header` and most
of the grid properties are inherited from that element.

This is a preparatory commit to introduce DM filter in #30332.
2024-07-08 11:43:02 -07:00