Commit Graph

3776 Commits

Author SHA1 Message Date
Pratik Chanda 0c8845cec5 group_settings: Fix group settings panel title not updating.
Earlier in group settings, clicking a non participating group from
"all groups" and then clicking "your group" would reset the right
panel but the panel title would remain same as that of the non
participating group.

This commit fixes the behaviour and resets the panel title to
default.
2024-03-15 17:22:10 -07:00
Pratik Chanda a504753961 stream-settings: Fix right panel resetting on filter change.
Earlier in stream settings, filtering for streams by search stream
name would reset the right panel to default if a stream was selected
from stream row.

This commit fixes the behaviour by keeping the stream open in right
panel in stream settings even on any filter change.
2024-03-15 17:22:10 -07:00
Pratik Chanda f96ad02454 stream-settings: Fix stream settings panel title not updating.
Earlier in stream settings, clicking an unsubscribed stream in "all
streams" tab and then clicking subscribed tab, the right panel would
reset but the panel title and url hash would remain same as that of
the unsubscribed stream.

This commit fixes the behaviour and resets the panel title and url
hash to default.

Fixes zulip#28465.
2024-03-15 17:22:10 -07:00
Alex Vandiver bfe4017663 katex_server: Add Prometheus metrics. 2024-03-15 15:34:12 -07:00
Alex Vandiver c13e3dee24 katex: Replace subprocess call with minimal external service.
Replace a separate call to subprocess, starting `node` from scratch,
with an optional standalone node Express service which performs the
rendering.  In benchmarking, this reduces the overhead of a KaTeX call
from 120ms to 2.8ms.  This is notable because enough calls to KaTeX in
a single message would previously time out the whole message
rendering.

The service is optional because he majority of deployments do not use
enough LaTeX to merit the additional memory usage (60Mb).

Fixes: #17425.
2024-03-15 15:34:12 -07:00
Anders Kaseorg 959e51fe58 tests: Replace unneeded override_rewire uses by whole-module mocks.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-15 17:29:47 -04:00
afeefuddin 15db564246 search_suggestion: Convert module to TypeScript. 2024-03-15 13:10:34 -07:00
afeefuddin 611b28e308 search_suggestion: Rename invalid to incompatible_patterns. 2024-03-15 13:10:34 -07:00
afeefuddin 089e363313 search_suggestion: Rename huddle to huddle_emails. 2024-03-15 13:10:34 -07:00
Roshan Jagadish 20e44997e2
types: Migrated add_stream_options_popover to TypeScript.
The migration requires some new assert statements as well as a change
in how the `return undefined` case is spelled to match the types declared by 
Tippy upstream.
2024-03-15 13:02:20 -07:00
Anders Kaseorg 45cfa42469 tests: Avoid override_rewire for bootstrap_typeahead.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-03-15 12:56:03 -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
evykassirer db24df488c typeahead: Convert from a jQuery plugin to a normal exported function. 2024-03-15 10:05:44 -07:00
Karl Stolley bb114ed525 settings: Set light- and dark-mode color on field hints. 2024-03-15 09:58:33 -07:00
N-Shar-ma ef5cdff9d9 settings: Scroll save button into view when a change made needs saving.
Whenever a setting that needs confirmation to save is tweaked, and the
save button is not visible, we scroll it into view, to ensure the user
does not mistake it for an automatically saved change and misses saving
their change.

Fixes: #29290.
2024-03-14 17:31:39 -07:00
Tim Abbott 252a03790a condense: Fix accidentally deleted function call.
42dd55df42 incorrectly deleted this.
2024-03-14 17:12:14 -07:00
Aman Agrawal c84b9cbc97 upgrade: Allow payment by invoice. 2024-03-14 16:43:52 -07:00
Sahil Batra 12e298dd4c settings: Add description below name field.
This commit adds description text below the name field in
profile settings panel mentioning how the field will be used.

Fixes #29226.
2024-03-14 10:53:36 -07:00
Sahil Batra 0ac0f95ee8 register: Add description below name field.
This commit adds description text below the name field
mentioning where the field will be used.

Fixes part of #29226.
2024-03-14 10:53:36 -07:00
Sahil Batra 74ab3d2cbe webapp: Rename "Full name" field to "Name".
This commit renames "Full name" field in profile settings,
"Edit user" form and in the email modal for demo orgs to
"Name".

Fixes part of #29226.
2024-03-14 10:53:36 -07:00
Aman Agrawal 9846c4c476 inbox_row: Don't show topic visibility toggle button by default.
We emulate the same behaviour of hiding topic visibility button
by using opacity if for default topic visibility state.
2024-03-14 10:15:49 -07:00
N-Shar-ma f4d58f1ba6 compose: Show counter inside Drafts button for the current recipient.
Now we show the number of drafts that are addressed to the current
recipient selected in the compose box, if any, in the Drafts button
within parentheses (whether it is next to the Send button, or in the
Send options popover), and explain that it is the number of drafts for
this conversation in the tooltip.

Fixes: #28696.
2024-03-13 16:53:45 -07:00
N-Shar-ma 6ec04c2469 drafts: Refactor function to have a default value for its 1 parameter.
For function `filter_drafts_by_compose_box_and_recipient` since the set
of drafts to filter from is almost definitely going to always be all
drafts, we make the required drafts parameter optional with the default
value of all drafts.

This is a prep commit for the next commit which will use this function.
2024-03-13 16:53:45 -07:00
N-Shar-ma d491c7d53c typeahead: Fix bug where change event was not triggered post selection.
This fixes a regression introduced in the commit making typeahead undo
friendly, d88ce61801.

This fixes the bug where selecting a topic via keyboard in the compose
recipient area did not update the fade.
2024-03-13 16:53:45 -07:00
Sahil Batra 2296c0b717 settings: Do not pass JQuery object to check_property_changed.
The function check_property_changed is called at two places - we
pass elem as HTML object in one call and JQuery object in another.

We should make it consistent and we now pass HTML object in both
the calls as that would be better when we would convert
settings_components file to typescript.
2024-03-13 13:34:57 -07:00
Sahil Batra 67074e7dcc settings_components: Fix enclosing jquery object by "$".
There is no need to enclose a jquery object by "$".
2024-03-13 13:34:57 -07:00
Sahil Batra 75c297b5d4 settings: Pass HTML element not jquery object to get_input_element_value.
We now pass HTML element to get_input_element_value instead of JQuery
object so that we can easily assert types later when we migrate the
file to typescript.
2024-03-13 13:34:57 -07:00
Sahil Batra a6cc9acb22 settings_components: Refactor code in check_property_changed.
This commit updates code in check_property_changed to handle
all time limit settings in the same switch case.
2024-03-13 13:34:57 -07:00
Sahil Batra 40ce7d3df5 settings_components: Do not pass unnecessary parameter.
"Number.parseFloat" only accepts one string parameter and
no other parameter like radix passed in Number.parseInt.
2024-03-13 13:34:57 -07:00
Sahil Batra 517da47da7 settings: Return empty string for "Anytime" case.
We use 'get_realm_time_limits_in_minutes' function to get the
value to be put in the custom input element. Previously, we
returned "null" for the case when the setting was set to
"Anytime", but now we instead return an empty string as returning
null created some issues while converting the file to typescript.

There is no change in behavior due to this as in both cases the
input will be empty.
2024-03-13 13:34:57 -07:00
Sohaib-Ahmed21 7e99c90190 typeahead: Improve compose topic typeahead behaviour.
Fixes: #29006

We make the following changes:
* Do not show the typeahead menu when there are no matching topics.
* When the typeahead is not shown, pressing Tab in the topic field
should move the cursor to the compose box.
* When the typeahead is shown, pressing Tab should select the
currently focused option (as it does now), but put the cursor at
the end of the topic, rather than at the beginning.
2024-03-13 10:00:56 -07:00
N-Shar-ma f16208d9f1 message_view: Allow quoting selected message text, via hotkey and menu.
Whenever the user has text selected within a single message, and uses
the hotkey to quote and reply, this selection will be quoted. In case of
no selection or selection not within a single message, the entirety of
the currently focused message will be quoted like before.

Similarly, when the user selects text within a single message, opens
that message's actions menu, and clicks the "Quote and reply" option,
the selected text will be quoted. In case of no selection or selection
containing any other message/s, the entirety of the message whose menu
was opened will be quoted like before.

When partially quoting a message, it is the markdown version of the
selection that is quoted, hence preserving any formatting. Any other
elements of the message, outside of the content, selected presumably by
accident (like the timestamp or sender name), are ignored.

Fixes: #19712.
2024-03-12 12:29:30 -07:00
Tim Abbott f5505ace89 right-sidebar: Remove duplicate search people tooltip.
The buddy list redesign introduced a new, more detailed tooltip, and
neglected to remove the previous one.
2024-03-12 11:31:42 -07:00
Aman Agrawal d10d72e6a9 narrow_state: Change source of truth for is_message_feed_visible. 2024-03-12 11:31:23 -07:00
Aman Agrawal 374e09b2da message_fetch: Check filter instead of message list.
Reduces use of `message_lists.home`.
2024-03-12 11:31:23 -07:00
Aman Agrawal 1f6625168a message_scroll: Fix scroll to bottom button visible in Inbox view. 2024-03-12 11:31:23 -07:00
Sahil Batra 11c9ec925b stream-settings: Add code to live update email UI on changing privacy.
This commit adds code to live update the stream email address UI
when changing stream privacy.
2024-03-12 10:49:54 -07:00
Sahil Batra ded5fa75b5 stream-settings: Remove unnecessary code for live update.
There is no element with class ".personal" and so this code
is unnecessary. This should have been removed in 87e824d43e
when we changed the code to handle tabs to us
data-stream-section attribute instead of class.
2024-03-12 10:49:54 -07:00
Sahil Batra 749da8ab2f stream-settings: Fix handling live update for stream email UI.
This commit fixes code for live updating the stream email UI
when user subscribes or unsubscribes from the stream.
2024-03-12 10:49:54 -07:00
Tim Abbott d98580ab14 compose_state: Remove incorrect recipient_has_topics helper.
This function was introduced in
99d1c5a1f3 and always has the opposite
value from what its name suggests. It worked OK because the caller
also expected it to have an incorrect value.

It's cleaner in this context to just use the `stream_id` helper, so
just delete the bad code and use that.

Fix the docstring comment having been incorrectly pushed down while
we're addressing this.
2024-03-11 16:31:58 -07:00
Karl Stolley 3a0621fb66 rendered_markdown: Blur code content behind REPL and copy buttons. 2024-03-11 15:38:03 -07:00
Karl Stolley 2df6b6c02a rendered_markdown: Present REPL and Copy buttons with modern techniques.
This also removes the `.btn` class and interference from Bootstrap
on the code Copy buttons.

Fixes: #29165
2024-03-11 15:38:03 -07:00
Karl Stolley 2cf726c53b rendered_markdown: Refine templates and logic for REPL, copy buttons.
Co-Authored-By: shashank-23002 <21bec103@iiitdmj.ac.in>
2024-03-11 15:38:03 -07:00
Aman Agrawal 73370087ed message_feed_top_notices: Simplify check for all message view. 2024-03-11 14:14:36 -07:00
Aman Agrawal fa8b7d898b stream_muting: Refactor to not use message_lists.home. 2024-03-11 14:14:34 -07:00
Aman Agrawal 233bbbaa5f reload: Remove redundant parameter.
`save_narrow` is always true right now and it makes sense
to always save the current narrow when reloading the app.
2024-03-11 14:13:26 -07:00
Aman Agrawal 19af746ce4 reload: Avoid using message_lists.home. 2024-03-11 14:13:26 -07:00
Aman Agrawal 5548a28980 message_fetch: Allow spectators to access all messages view. 2024-03-11 14:13:26 -07:00
Aman Agrawal 8204abf1ce unread_ops: Minor refactor. 2024-03-11 14:13:26 -07:00
evykassirer 03ec788a91 typeahead: Move module to web/src. 2024-03-11 09:56:18 -07:00