Commit Graph

149 Commits

Author SHA1 Message Date
Lauryn Menard d3987f611c urls: Generate narrow links in frontend with "channel" operator.
Fixes #30385.
2024-10-11 17:00:23 -07:00
Anders Kaseorg ba8b9a445b eslint: Fix unicorn/prefer-node-protocol.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-10-08 16:54:15 -07:00
Aman Agrawal 777f6be88f puppeteer: Fix incorrectly passed `false` value to check narrow change.
This caused another CI flake.

Also, added a comment to the only other place where we pass false
explicitly explaining why.
2024-10-07 16:07:08 -07:00
Aman Agrawal dae2a68ad9 puppeteer: Fix flaky wait for narrow change after sending a message.
This flake was happening since `wait_for_fully_processed_message`
only checks if the `star` icon is displayed on the message but
doesn't check for current narrow or waits for the narrow to
change.

Since narrow is changed to the message narrow after sending a
message. If we don't wait for narrow to change, this narrow change
can make the `get_current_msg_list_id` call return true for the
wrong narrow change. Which causes message list id of the wrong
message list to be returned and hence we cannot locate this
message list id.

To fix it, we check if sending this message will cause a narrow
change and if true, we wait for the narrow to change before
checking if the message is visible.
2024-10-07 14:17:02 +05:30
Aman Agrawal 882e4f56c1 copy-and-paste: Remove not required click on all messages narrow.
This change might also fix the flaky nature of this test but needs
to be tested by running online on CI.
2024-10-07 08:27:10 +05:30
Anders Kaseorg 97ffccb45f reload: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-09-18 15:31:41 -07:00
Karl Stolley 7b7e21384f cleanup: Remove remaining CSS, JS .new-style references. 2024-09-11 14:22:45 -07:00
Pratik Chanda 64a9f83473 compose_box: Fix order of group pm recipient pills on focus.
Earlier when compose box was opened or narrowed to pm, the recipient
pills were sorted according to user email strings instead of their
full names which was inconsistent with compose box placeholder text,
recipient row and message header.

This commit fixes the behaviour by introducing a `sort_email`
function to sort emails according to their full names and display
sorted pills.

Fixes: zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Pratik Chanda c180b25a68 drafts: Fix order of group pm recipients in draft overlay.
Earlier in drafts overlay, the order of pm recipients for the draft
was sorted differently to that of the pm group title.

This commit fixes the behaviour by sorting the drafts pm recipients
using `make_strcmp`.

Fixes part of zulip#27375.

Co-authored-by: richardshaju <richardshaju66@gmail.com>
2024-08-27 13:21:16 -07:00
Anders Kaseorg 892f988404 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-08-26 07:44:14 -07:00
Aman Agrawal 029839ea21 puppeteer: Use a robust method to verify if we switched narrow.
Just verifying that a `message-list` is rendered is not enough to
ensure that we are in the correct narrow. We need to check
if we are narrowed to the correct message list id.

This prevents CI from failing unexpectedly.
2024-08-16 14:00:24 -07:00
evykassirer d5883cfbb2 search: Empty input on open, and show current narrow search suggestions.
Fixes #30911
2024-07-19 16:55:09 -07:00
Shubham Padia f77738c235 navbar: Replace fa-envelope with zulip-icon-user.
Fixes part of #30918.
We don't need `align-self: baseline;` for `fa-envelope` set in
`message_view_header` since this is a different icon and it appears
better without it like other icons.
We also don't need the explicit font-size for switching b/w 14px and
16px mode since `zulip-icon` class takes care of that by default.
2024-07-17 12:08:07 -07:00
evykassirer c3786223e5 search pills: Validate pills with shake animation when invalid. 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
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
Karl Stolley 104c76c18b left_sidebar: Remove .input-append from stream filter. 2024-06-28 15:12:00 -07:00
Sahil Batra e19524ba92 settings: Use new group setting to private channels creation permission.
This commit updates webapp code to use new group based setting to check
permission for creating private streams.
2024-06-20 15:48:14 -07:00
Shubham Padia cad5843da6 left_sidebar: Rename show_all_private_messages to use `direct`.
Rename `show_all_private_messages` to `show-all-direct-messages`.
We've also hyphenated the attribute during the rename.
Part of the private_message to direct_message rename project.
2024-06-20 09:58:32 -07:00
Shubham Padia 8ab6e71593 settings: Unite user settings into a single panel.
Previously, there were three different sections for managing active
users, deactivated users and invitations.
This commit combines users section has into a single tabbed panel.

Fixes: #26949.

Co-authored-by: shashank-23002 <21bec103@iiitdmj.ac.in>
2024-06-17 17:16:21 -07:00
Shubham Padia e4c89771fd settings: Rename `user-list-admin` to `users`.
Renaming the url for better readability on the user's side.
We've also added a redirect for this, which will change the `section`
from `user-list-admin` to `users` whenever required.
See https://github.com/zulip/zulip/pull/30268#discussion_r1631539656
2024-06-17 17:16:21 -07:00
sujal 279e9d1dc3 stream_settings: Move "Choose subscribers" into a separate second panel.
Changed the title of the first panel to
"Create channel: configure settings" and title of second panel to
"Create channel: add subscribers".

Implement logic in stream_create.js to show and hide both the panels.

Add two buttons to facilitate switching between the tabs or panels.

Added new descriptions to 'stream type descriptions'.
2024-06-17 16:20:06 -07:00
roanster007 ab6ae1099b refactor: Rename huddle to direct message group in web codebase.
This commit renames "huddle" to "direct_message_group" in the
web codebase. It also renames the file - "huddle_data.ts" to
"direct_message_group_data.ts"

Fixes part of #28640
2024-06-14 18:07:07 -07:00
Varun Singh 78f105475a stream_create_subscribers: Convert module to TypeScript. 2024-06-11 11:57:46 -07:00
Sayam Samal a7772f86a2 docs: Update CZO links from stream to channel in docs and comments.
Updates all the https://chat.zulip.org/#narrow/stream/ links in the
docs and comments to use the new /channel/ path. All these links are
for documentation/reference purposes only and thus, can be bulk-updated.

This commit is a part of the effort to rename stream to channel.
2024-06-11 10:44:31 -07:00
Sahil Batra f98a3fc684 settings: Use new group setting to check permission for creating public channels. 2024-06-10 12:24:45 -07:00
Prakhar Pratyush 9120fec604 message_basic_tests: Fix flaky behaviour on sending multiple messages.
While sending multiple messages to different recipients in
'message_basic_tests', we were facing flaky test failure.

The reason being now we jump to the conversation where message
was sent & that was resulting in calls to the
'wait_for_fully_processed_message' function as 'outside_view'
was not correctly set.

Precisely, the call to 'wait_for_fully_processed_message' uses
zulip_test.current_msg_list which won't remain correct when
the sender is narrowed to different views on sending messages
to different recipients in succession.
2024-06-10 10:37:41 -07:00
Prakhar Pratyush e4cbca698d compose: Jump to conversation where message was sent.
Removes two 'narrow_to_recipient' banners which were
shown after sending a message to a different conversation.

Now, the sender is narrowed to the conversation where
message was sent.

Fixes #29186.
2024-06-05 09:30:34 -07:00
sujal shah 26ae173a2c left_sidebar: Change redirect link for Browse channels.
This commit changes the redirect links for "Browse channels" and
"Browse 1 more stream" to the Not subscribed(#streams/notsubscribed)
tab.
2024-06-04 09:49:50 -07:00
sujal shah 6deb165ef6 stream_settings: Add Not subscribed tab to stream settings.
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.

Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition.

Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.

Fixed and added the node tests for these changes.
2024-06-04 09:49:50 -07:00
Anders Kaseorg 94f0f9340c e2e-tests: Fix TypeScript noUncheckedIndexedAccess errors.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:19:14 -07:00
Anders Kaseorg ed5f1455f2 e2e-tests: Consistently move fullname lookups to callers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-30 16:19:00 -07:00
Anders Kaseorg 8f0dda3d4b e2e-tests: Fix check_compose_state arguments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 16:51:36 -07:00
Anders Kaseorg b545abe1e2 typos: Fix typos caught by mwic.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 13:55:00 -07:00
Anders Kaseorg 507eb4913c tsconfig: Enable exactOptionalPropertyTypes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-16 08:58:20 -07:00
Aman Agrawal e51962d6ac dialog_widget: Assign each dialog widget a unique id.
This makes it easy to check if the correct dialog widget is open
and to perform actions based on the state of dialog widget in
async callbacks.
2024-05-15 12:02:57 -07:00
Aman Agrawal 97e3015ec1 stars: Fix flaky test due to message list not yet rendered.
With combined feed no longer cached, this test became flaky as
it took longer for combined feed to load.

Verified that other tests waiting on `.message-list` don't need
this change.
2024-05-10 11:59:18 -07:00
Prakhar Pratyush ac2152fdfd onboarding: Replace channel messages in new organizations.
As a part of improving onboarding experience, this
commit updates the channels and messages initially
available in new orgs.

Fixes #29297.
2024-05-09 14:05:35 -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
Anders Kaseorg 6ed50d1c80 e2e-tests: Fix implicit use of any.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-06 11:31:34 -07:00
Anders Kaseorg d507706371 zulip_test: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-04 18:55:17 -07:00
Lauryn Menard 8e953d9896 streams-settings-overlay: Update hash for stream to channel rename.
Updates the base hash for the streams setting overlay to be
"channels" instead of "streams".

Because there are Welcome Bot and Notification Bot messages that
would have been sent with the "/#streams" hash, we will need to
support parsing those overlay hashes as an alias for "/#channels"
permanently.

Part of the stream to channels rename project.
2024-04-30 14:44:12 -07:00
Aman Agrawal 103c37f23a message_list: Don't always cache "Combined feed" view.
Important changes in this commit:
* We only cache message list for "Combined feed" if it is the
  default view.

* We modify existing handling of home message list code so that
  it can be used to for any message list that we want to cache
  using a new `preserve_rendered_state` variable.

* narrow_state.filter() returns the filter of combined feed view  list
  instead of `undefined`.

* We start fetching messages from the latest message on app load.

* Messages in all messages data and Recent view are always synced.

* If combined feed view list is not cached, we don't track it's
  last pointer, effectively sending user to the latest unread
  message always .
2024-04-25 09:20:43 -07:00
Lauryn Menard 8d102cf12f web-search-suggestions: Update to use channel and channels.
Updates the search suggestions in the web app to use the modern
convention of "channel" and "channels".

Also, updates the "from" search suggestions to use the modern
canonical convention of "sender".

Part of stream to channel rename project.
2024-04-24 17:03:36 -07:00
Lauryn Menard d7f9f8333e web-stream-settings: Update strings for stream rename channel.
Updates a chunk of translated strings that overlap between files,
with the streams settings overlay being the starting point for
finding these strings, to use channel instead of stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
Lauryn Menard ba766a564a web-stream-create: Update frontend errors for stream rename channel.
Updates translated error and warning strings when creating a new
stream in the web app to use channel instead of stream.

Part of stream to channel rename project.
2024-04-24 14:35:04 -07:00
evykassirer fd4246def5 drafts: Append a space to draft when restoring it.
If a user starts typing before they see that a draft was restored,
this makes that experience a little smoother by adding some
separation between the old draft and the new text.
2024-04-20 12:31:51 -07:00
Riken Shah d48de6da08 compose: Restore the last draft when compose box is opened.
Now when the user opens a narrow that has a draft saved for
that particular conversation, the draft will automatically
be restored in the compose box. This will make it easy to
return to a draft after clicking away, and also will make
it less confusing when people close the compose box by
accident. Note that this only restores the draft when
there is a full recipient specified (stream and topic,
or at least one PM recipient).

Fixes part of #18555.
Fixes #11218 and #17396.
2024-04-20 12:31:51 -07:00
evykassirer cb3f22c30e drafts: Delete a draft if it is cleared from the compose box.
We used to keep the draft, assuming that clearing the composebox
was an accident. Now we want to delete the draft, in preparation
for auto-restoring drafts when opening the composebox for narrows
with drafts associated with them. If a user opens the composebox
and sees a draft they don't want anymore, clearing the box is a
way we expect them to try to delete it.
2024-04-20 12:31:51 -07:00
Kislay Verma 245357c868 stream_settings_ui: Go to newly created stream.
- On creating a stream, the user is redirected to the
 "stream events" topic of the newly created stream.
- If this is the first time the user has created a stream,
an explanatory modal is shown.

test_hotspots.py is modified to account for the new addition
of the first_stream_created_banner.

stream_create.test.ts is also modified accordingly.

Fixes #29375.
2024-04-17 15:35:19 -07:00