Commit Graph

17 Commits

Author SHA1 Message Date
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
evykassirer dba1af84e0 filter: Use stream id instead of stream name. 2024-09-18 13:08:14 -07:00
Prakhar Pratyush 5fd676c4e0 test_fixtures: Add 'message_link_test_cases' test fixture.
This is a prep commit to extract out the test cases
for 'test_is_same_server_message_link' in hash_util.test.js
as a test fixture.

This will help in reusing the same test cases in the node and
backend tests.

Also, it will help in making sure that the logic for
'is_same_server_message_link' is in sync, in both the
web client and server code.
2024-06-17 10:42:32 -07:00
PieterCK d882d90857 hash_parser: Add utility function to dynamically detect hash.
Added new utility function to hash_parser to dynamically
detect the hash category of an URL. This is intended to
reduce the need of adding more adhoc hash_parser utility
functions.
2024-05-17 10:47:22 -07:00
Lauryn Menard ee84b277ec hash-util: Rename stream_edit_url to channels_settings_edit_url.
Renames the hash_util.stream_edit_url function so that it's clearer
this is for the settings overlay hash and for the stream to channel
rename.
2024-04-30 14:44:12 -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
PieterCK 2457a8b655 stream_settings: Fix stream row switching behavior.
Add a rule to the switch_rows(event) function to avoid
switching stream row when pressing up/down key by checking
the current URL hash and the add_subscribers_pill focus state.
Add a utility function to hash_parser to help implement new
switch_rows behavior mentioned above.

Fixes #29690.
2024-04-29 18:57:29 -07:00
N-Shar-ma adddb3d54f notifications: Collapse blockquotes and "user said" paragraphs.
Since notifications have limited space for the contents of a message,
a quote from a previous message, or elsewhere, can take up most of the
notification, leaving little room for the actual message, and reducing
the usefulness of the notification.

To fix this, we collapse blockquotes and "user said" paragraphs to make
space for the actual message.
2024-01-30 17:22:20 -08:00
N-Shar-ma 727774a0e5 refactor: Extract `get_nth_hash_section()` and use 0-based indexing.
From `get_current_nth_hash_section` `get_nth_hash_section()` is
extracted to allow for reuse for any hash. The indexing is also changed
to 0-based and negative indexing also works now.

This is a prep commit for the next, where `get_nth_hash_section()` will
be used in a new function with negative indexing.
2024-01-30 17:22:20 -08:00
evykassirer a87b1d5ad8 filter: Use terms instead of operands.
Operand is a confusing name because this
data structure has an attribute *called*
operand. This commit renames references to
this structure to "term", short for "search
term".
2024-01-02 16:24:53 -08:00
evykassirer aa9d69c728 stream settings: Include section for right panel in the URL.
Fixes #21017.
2023-11-20 15:32:29 -08:00
Tim Abbott 9283da57f0 hash_util: Extract hash_parser.ts.
This allows these functions to be used by modules that need this code
and cannot import people.ts without creating import cycles.
2023-10-01 16:55:21 -07:00
Tim Abbott 1aea88fac1 spectators: Move build_login_link out of hash_util.ts. 2023-10-01 16:55:21 -07:00
nimish c238327899 settings: Change "Display settings" to "Preferences".
This includes changing the URL to #settings/preferences, with a
transparent redirect so that existing links, like the one from Welcome
Bot, continue to work.
2023-07-12 07:09:03 -07:00
Lauryn Menard 0f7341dd48 narrow: Add frontend support for `dm:` narrow and `/dm/...` URL.
Adds support in the web app for `dm` operator. This will deprecate
the `pm-with` operator, but existing links/URLs are still supported
for backwards-compatilibity.

This commit updates the web app default behaviors to default to
the new narrow/URLs `dm/...` and `/#narrow/dm/...` when navigating
and searching in the app.

There is some general clean up of references to private messages
or PMs to be either direct messages or DMs in these changes.

The general API changelog and documentation updates will be done
in a final commit in the series of commits that adds support for
the various new direct message narrows.
2023-04-25 09:07:08 -07:00
AcKindle3 02364dd69f web: Use `uri` instead of `url`.
Following the issue #23380 and PR #25038, this commit changes all
occurences of `uri` into `url` in all comments, local variables,
handlebars templates (.hbs) function names and their callers in
all `.js` and `.ts` files.
2023-04-10 10:26:48 -07:00
Anders Kaseorg cea1119423 node_tests: Move to web/tests.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-02-23 16:04:17 -08:00