Commit Graph

3594 Commits

Author SHA1 Message Date
Aman Agrawal 8acbf02ad7 reactions: Fix reactions not displayed in all messages view.
We were not updating all the rendered `messages-rows` but just
for the current view.

This bug was introduced in
df180f7bd5
2024-02-05 11:06:46 -08:00
Aman Agrawal f71337aaf7 compose_actions: Fix incorrect condition.
This was introduced in #28767 with the intention to skip scrolling
the selected message.

So, the actual bug that the PR fixed would have been just fixed
by opening the compose box early.
2024-02-05 08:51:10 -08:00
Tim Abbott 67ed87ecb5 web: Use better exponential backoff algorithm.
This matches the algorithm that we designed for the Python API, except
that we use a ratio of 2 rather than sqrt(2) in the message_fetch code
path, because it's a heavier request.

We increase the number of failures before showing a user-facing error
to roughly preserve the same time period before a user-facing error is
shown.
2024-02-04 17:38:56 -08:00
Tim Abbott e91748022f web: Respect rate-limiting headers in main APIs.
Previously, these endpoints just did exponential backoff, without
looking at the rate-limiting headers returned by the server, resulting
in requests that the client could have been certain would fail with an
additional rate-limiting error.

Fix this by using the maximum of the existing exponential backoff with
the value returned by the rate-limiting header.

Fixes #28807.
2024-02-04 17:38:56 -08:00
Tim Abbott 624e1a85ce message_fetch: Add small backfill delay.
This should help reduce the risk of hitting rate limits when users
have a very large number of messages to fetch via this mechanism.

Inline the `messages` variable that was only used in one place while
we're touching this.
2024-02-04 17:38:56 -08:00
Tim Abbott 370afd6464 reload: Add on-focus handler after a delay. 2024-02-04 17:38:56 -08:00
Tim Abbott 5f4e1de661 util: Fix call_function_periodically.
This function incorrectly and misleadingly did an immediate initial
call, despite both of its callers doing immediate calls themselves (in
one case, with a different parameter passed).

This led to unnecessary server load when reloading the app via event
system triggered reloads, since every client would call `/` twice.
2024-02-04 17:38:56 -08:00
Tim Abbott d8ec141de2 navigate: Fix buggy detection of start/end.
I was not able to reproduce obviously badly broken behavior from these
logic bugs, but after the renaming of message_viewport helpers in the
last few commits, it's clear that this logic was trying to check if
we're actually at the start/end of the possibly message feed, not just
the rendered portion, and doing so incorrectly.
2024-02-04 17:34:24 -08:00
Tim Abbott 4f8da7462d message_scroll: Add some explanatory comments. 2024-02-04 17:34:24 -08:00
Tim Abbott 84ec491e34 message_viewport: Rename at_top for clarity. 2024-02-04 17:34:24 -08:00
Tim Abbott 42956e0305 message_viewport: Rename at_bottom for clarity. 2024-02-04 17:34:24 -08:00
Tim Abbott 45f9bd21e5 message_viewport: Rename bottom_message_visible. 2024-02-04 17:34:24 -08:00
Tim Abbott 6562ea94e4 unread: Stop treating bottom of render windows as the global bottom.
The previous logic for both scrolling down and using pagedown would
incorrectly mark an entire conversation as read when reaching the
bottom of a render window, even if there were more messages loaded or
to fetch from the server.

Fix this error in the calculation by asking the correct data
structures if we're actually at the bottom.

To avoid the navigate.js keyboard shortcut code paths circumventing
this new logic, or needing to duplicate it, they now call
process_visible, rather than its helper.
2024-02-04 17:34:24 -08:00
Aman Agrawal da7cb0af1c bootstrap: Remove unused dropdown toggle class definitions. 2024-02-03 17:20:28 -08:00
Aman Agrawal ee2f08aa96 css: Remove state dropdown-toggle class. 2024-02-03 17:20:28 -08:00
Aman Agrawal 088eadbca1 css: Remove stale dropdown-list-widget class. 2024-02-03 17:20:28 -08:00
Aman Agrawal 1b8605a6e6 stream_popover: Remove remnants select_stream_widget.
We replaced the bootstrap dropdown with our custom dropdown
widget. These were missed during the migration.
2024-02-03 17:20:28 -08:00
Aman Agrawal 91073cfbe1 css: Remove stale CSS.
This doesn't seem to be effectively used anywhere.
2024-02-03 17:20:28 -08:00
Aman Agrawal e923c593f6 topic_generator: Rearrange checks inside if statement.
Primary objective is to remove the call to narrow_state.active,
in doing so, I rearranged the conditions a bit.
2024-02-03 17:19:30 -08:00
Aman Agrawal adedc0283f narrow: Remove not required call to save_narrow.
Since we always call `deactivate` from `hashchange`,
`browser_history.state.changing_hash` is always `true` and hence
`save_narrow` just retuns without doing anything.
2024-02-03 17:19:30 -08:00
Aman Agrawal eaafaba482 unread_ops: Remove unused function. 2024-02-03 17:19:30 -08:00
Aman Agrawal 3099457e06 narrow: Remove duplicate clear search form.
This function doesn't need to be called since `render_title_area`
already takes care of it which is always called when changing
narrow.
2024-02-03 17:15:26 -08:00
Aman Agrawal ea2bd14480
bootstrap: Remove duplicate `invisible` class.
The same definition is already present app_components.css, so
we don't need it here.
2024-02-02 11:00:35 -08:00
N-Shar-ma dbd2c80108 copy_and_paste: Refactor code block turndown code to reduce duplication.
So far, there were 2 separate turndown rules for code blocks; one for
general ones, and the other for Zulip message code blocks.

Now the filter rule has been generalised to handle both cases together.
As a side effect, the bug where partially copied Zulip code blocks
lost formatting on pasting has been fixed.
2024-02-02 10:34:09 -08:00
Tim Abbott 652fea9bdf narrow: Clarify some confusing details.
The update_selection function name was rather misleading, since that
function call is in fact what renders the message list object for the
view.

Also add comments about a few subtle/confusing details that I noticed
while debugging this code path today.
2024-02-01 12:27:46 -08:00
Tim Abbott 7d4ec1f93b narrow: Open compose box before rendering main message feed.
As discussed in the new comments, we had a bug where the
system-initiated animated scroll that happens when the compose box
opens as a result of narrowing would race with the internal
rerendering that occurs when the message_fetch request asking the
server for additional data returns.

The correct fix for this is just to open the compose box, if we're
going to do so, before setting the user's scroll position in the
narrowing/rendering process.

This ends up being a UI improvement (in that the compose box is
available for typing a bit earlier) as well as avoiding both the risk
of this race as well as the bad UX of adjusting the user's scroll
position multiple times as part of entering the view.

This does not address an as-yet-unknown bug wherein the animated
scroll that occurs when opening the compose box, when racing with a
background rerender, results in a bogus ending scroll position, though
it's easy to see how that might occur given that rerendering does
clear the DOM briefly.
2024-02-01 12:27:46 -08:00
evykassirer 07234f6a31 marked: Stub marked and convert markdown module to typescript. 2024-02-01 12:12:06 -08:00
evykassirer f8875bf32f markdown: Pass individual arguments to contains_problematic_linkifier. 2024-02-01 12:12:06 -08:00
evykassirer 2fe6c5b041 markdown: Pass individual arguments to content_contains_backend_only_syntax. 2024-02-01 12:12:06 -08:00
evykassirer 66a56b8862 markdown: Pass individual arguments to parse_with_options. 2024-02-01 12:12:06 -08:00
evykassirer 0571145029 markdown: Remove wrapper around get_topic_links.
Since it's only used in one place, and all callers
of it user the same value for the linkifier.

https://github.com/zulip/zulip/pull/28652#discussion_r1470516258
2024-02-01 12:12:06 -08:00
evykassirer fb47efc981 markdown: Don't mutate the message in apply_markdown/render.
Needed for typescript, because we want to preserve
types, so instead of mutating a message object,
we can instead calculate return these values
for a message object before it's created in full.

This commit also renames apply_markdown
to render, see this comment
https://github.com/zulip/zulip/pull/28652#discussion_r1470514780
2024-02-01 12:12:06 -08:00
Karl Stolley f68d770312 portico: Center hero content on /apps. 2024-01-31 16:10:32 -08:00
Karl Stolley 6763456290 portico: Remove screenshots from /apps. 2024-01-31 16:10:32 -08:00
Tim Abbott 649072977e settings: Fix buggy conversion of emoji-display-settings-status.
6cd165386a incorrectly converted this
field with different names in the two places it is used.
2024-01-31 13:07:26 -08:00
Karl Stolley b522ffa317 plans: Add explicit values for uniform plans display. 2024-01-31 07:23:50 -08:00
Karl Stolley 30926ae62f plans: Remove discount-related layout cruft.
These classes and styles were introduced as hacky layout fixes,
and are no longer necessary with tooltip-style discount balloons.
2024-01-31 07:23:50 -08:00
Karl Stolley e622332cdf plans: Add tooltip-style discount balloon. 2024-01-31 07:23:50 -08:00
Karl Stolley f361a9bb50 plans: Enable better collapsing of plans panes. 2024-01-31 07:23:50 -08:00
Karl Stolley dc52194ecc plans: Remove underline from comparison subhead links. 2024-01-31 07:23:50 -08:00
Karl Stolley 16e1cbe374 plans: Implement background colors for hovers, dark mode. 2024-01-31 07:23:50 -08: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
Lauryn Menard 916892e437 templates: Move support templates to /templates/corporate/support.
Also, makes small updates to `next_plan_forms_support.html`.
Removes unneeded "btn" and "btn-default" classes, and updates
the placeholder text for the input as not marked for translation.
2024-01-30 10:06:48 -08:00
Lauryn Menard efd0d689fc templates: Move activity templates to /templates/corporate/activity.
Also, renames `ad_hoc_query.html` to `activity_table.html`,
`realm_summary_table.html` to `installation_activity_table.html`,
and `activity_details_template.html` to `activity.html`.

Removes the style attribute in the installation activity template
and uses a CSS class, "installation-activity-header", to center the
h3 and p tags instead. This removes an exception from the custom
lint check.
2024-01-30 10:06:48 -08:00
N-Shar-ma afba77300a typeahead: Prefer word boundary matches to arbitrary substring matches.
So far, when ordering typeahead suggestions, any query matches that did
not occur at the start of the target string were considered equally. So
for example, for the query "ok", "squared_ok" and "smoking" were
allotted equal priority, which does not make sense.

Now, matches from a word boundary (space, hyphen, underscore or slash)
are given priority (after exact matches and beginning matches), so that
in the above example, "squared_ok" is regarded as a better match than
"smoking".

Since recipients' sorting is complex, and needs word boundary matches
separately for decoupled sorting post triage, `triage_raw` is extracted
from `triage` to return the raw matches.

Fixes: #24127.
2024-01-29 17:24:11 -08:00
N-Shar-ma 2d21e71b93 typeahead: Clean up variable names to follow snake_case convention. 2024-01-29 17:24:11 -08:00
N-Shar-ma b89cd43588 typeahead: Sort exact matches too, in case there are multiple. 2024-01-29 17:24:11 -08:00
Anders Kaseorg 1a9441ec70 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-29 16:14:26 -08:00
Anders Kaseorg 24ecafbdd2 eslint: Fix @typescript-eslint/no-useless-template-literals.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-29 16:14:26 -08:00
Anders Kaseorg 2dca29ce5a eslint: Fix @typescript-eslint/no-unnecessary-type-assertion.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-29 16:14:26 -08:00
roanster007 04013cdec1 left_sidebar: Add mark all messages unread to three dot topic menu.
This commit adds a new option to the three-dot topic menu in the
left sidebar to mark all the messages of topic as unread, provided
the topic's messages are already read before choosing this option.

This is done with the help of bulk_update_read_flags_for_narrow
method to remove the read flag on bulk of messages.

Fixes #25085
2024-01-29 16:07:19 -08:00
roanster007 b1ca1fd606 unread_ops: Refactor bulk_mark_messages_as_read method.
This commit renames the bulk_mark_messages_as_read method to
bulk_update_read_flags_for_narrow, and takes in an additional
parameter - op, which takes in values of add or remove, indicating
whether to add or remove the read flag for bulk messages.

This is a preparatory commit to bulk mark multiple messages as unread.
2024-01-29 16:07:19 -08:00
Prakhar Pratyush edec29e0b6 support: Add support to configure fixed_price plan. 2024-01-29 11:23:20 -08:00
Lauryn Menard 15ba9cf8ec bootstrap: Remove bootstrap.btn classes from support view buttons.
Moves CSS styles for support view buttons to
`web/styles/portico.activity.css`.

Also removed the "sea-green" and "small" classes from a few buttons
as no CSS rules were being applied and most of those buttons will
be removed when these forms are refactored to use a modal.
2024-01-29 10:59:33 -08:00
evykassirer ea04f7d27d topic list: Convert module to typescript. 2024-01-29 10:22:35 -08:00
evykassirer 7154539e80 typeahead_helper: Convert module to typescript. 2024-01-29 10:06:18 -08:00
evykassirer fdb6f212d0 Remove User type from types.ts. 2024-01-29 10:06:18 -08:00
Sahil Batra 5f82bf0002 css: Remove bootstrap css for "fade" class.
We do not use "fade" class in our app anymore so we can
remove its CSS from boostrap.app.css.
2024-01-29 09:55:32 -08:00
Sahil Batra d375921eb4 settings: Do not use bootstrap "fade" class.
We used bootstrap "fade" class to show the password strength
only after password_quality module is imported. Adding "fade"
class was only hiding the bar by setting opacity and the
transition defined in bootstrap was not used as it was
overridden by transition in progress_bar.css. So, we just
hide and show the bootstrap by using "hide" class and remove
the use of "fade" as part of the bootstrap removal project.
2024-01-29 09:55:32 -08:00
Sahil Batra 69d0c78f1e settings: Remove unnecessary code.
We do not use "#pw_change_controls" element any more as it
was removed in 2ca0fb412.
2024-01-29 09:55:32 -08:00
Tim Abbott 41fa2e7174 css: Remove unused portico tab-content CSS rules. 2024-01-28 16:08:30 -08:00
Tim Abbott 065dc8fc5d css: Remove several unused Bootstrap rules from portico. 2024-01-28 16:08:30 -08:00
Tim Abbott b44c3d321d css: Delete unused Bootstrap close rules from portico. 2024-01-28 16:08:30 -08:00
Tim Abbott 00aa0631fe css: Move Bootstrap alerts CSS to separate file. 2024-01-28 16:08:30 -08:00
Tim Abbott db9ee6237e css: Remove portico copy of Bootstrap typeahead CSS.
We don't use the typeahead component in portico pages.
2024-01-28 16:08:30 -08:00
Tim Abbott 56a884e0be css: Extract Bootstrap Typeahead CSS to its own file. 2024-01-28 16:08:30 -08:00
Tim Abbott 73aca658f6 css: Remove unused Bootstrap dropdown-backdrop rules. 2024-01-28 16:08:30 -08:00
Tim Abbott 4395c54c23 css: Remove unused Bootstrap CSS for nav elements. 2024-01-28 16:08:30 -08:00
Tim Abbott ee97d018af css: Remove unused Bootstrap dropup CSS. 2024-01-28 16:08:30 -08:00
Tim Abbott 3818969f04 css: Remove overridden body styles from app. 2024-01-28 16:08:30 -08:00
Tim Abbott 98637e3a88 css: Remove unused Bootstrap text-* styles from app. 2024-01-28 16:08:30 -08:00
Tim Abbott 49ff0dc2e2 css: Remove unused row/container CSS from app. 2024-01-28 16:08:30 -08:00
Tim Abbott 25d7740b26 css: Remove dead Bootstrap CSS from app.
The only reference to any of these was in a comment.
2024-01-28 16:08:30 -08:00
Karl Stolley f07dae6b25 bootstrap: Fork CSS into app, portico copies.
This aims to reduce the cognitive overhead of doing Bootstrap CSS
cleanup by concerning contributors only with Zulip or the portico.
2024-01-28 15:07:36 -08:00
Pratik Chanda f4260cf40d stream_settings: Add stream "reset to default notifications" button.
This commit introduces a "reset to default notifications" button to
the personal panel in stream settings. On clicking, it unmutes the
current stream and resets all its notification configurations to
default user settings.

Fixes zulip#27624.
2024-01-28 14:32:45 -08:00
evykassirer 3975c508b5 topic_generator: Convert module to typescript. 2024-01-28 14:20:45 -08:00
evykassirer d969ac3764 reactions: Rename reaction_info to rendering_details.
When we convert to typescript, these variables
will be of type EmojiRenderingDetails. This is
a more clear name.
2024-01-28 14:17:15 -08:00
evykassirer 3208235e79 emoji: Remove number as possible type for emoji_code.
More details here:
https://github.com/zulip/zulip/pull/28375#issuecomment-1878073956
2024-01-28 14:17:15 -08:00
evykassirer 0e358b9f85 reactions: Always call update_user_fields with should_display_reactors.
This was wrong before. `update_user_fields` is called with
`should_display_reactors` everywhere else.
2024-01-28 14:17:15 -08:00
evykassirer 84038a9984 reactions: Fix typo. 2024-01-28 14:17:15 -08:00
evykassirer fc1bd590b6 reactions: Remove view namespace.
This will make a migration to typescript easier,
and was unnecessary extra complexity.
2024-01-28 14:17:15 -08:00
Sahil Batra 3fc2bccc21 bootstrap: Remove css for btn-link elements.
We currently use btn-link class only in buttons used for
changing email and password in account settings panel and
for we already bootstrap CSS rules for those so we can
safely remove the CSS rules in bootstrap-btn.css.
2024-01-26 09:10:09 -08:00
Sahil Batra 6b459c0ea4 invite: Re-add bootstrap CSS rules for btn-link elements.
This commit re-adds the bootstrap CSS rules for the specific
btn-link elements in invite modal to zulip.css. This is part
of the bootstrap removal project.
2024-01-26 09:10:09 -08:00
Lauryn Menard bfd9eec4b3 activity: Add totals row as sticky footer to activity charts.
Updates the total row for the installation and remote activity
charts to be in the table footer. Makes the footer class sticky
to the bottom of the view so that it is always visible on the
chart.

Also, updates the installation activity column for revenue to
be formatted as a dollar string, since this formatting was being
applied in the updated total row.
2024-01-26 09:04:39 -08:00
Tim Abbott 371dea3f0d css: Remove unused btn-info styles. 2024-01-25 18:35:38 -08:00
Tim Abbott ee9a9bfa98 css: Remove unused btn-block styles.
The (unfinished) two-factor UI isn't designed at all, so we can just
remove the classes from it.
2024-01-25 18:35:38 -08:00
Tim Abbott f04b54ff47 css: Remove unused boostrap nav-header styles. 2024-01-25 18:35:38 -08:00
Tim Abbott 4b6b1da83c bootstrap: Remove now-unused tabs JS component.
This was the last bootstrap.js feature, so we finally get to remove
the whole module.
2024-01-25 18:35:38 -08:00
Tim Abbott f105c6b12e css: Remove unused Bootstrap nav-tabs styles. 2024-01-25 18:35:38 -08:00
vighneshbhat9945 642cce1a30 settings: Remove extraneous background for export button.
Removed the div along it's css rules which was
responsible for extraneous background around the
'start export of public data' button.

Fixes: #28625.
2024-01-25 18:24:06 -08:00
Sayam Samal 222364733f emoji_picker: Restructure CSS related to the emoji picker.
This commit tries to improve the CSS related to the emoji picker by
restructuring relevant parts of `reactions.css` and `dark_theme.css`.

Via this commit, the redundant classes -- "reaction", "status-emoji",
"composition" are also removed from `emoji_popover_emoji.hbs`.

If needed, specific styling -- according to the type of emoji picker,
can now be applied using the `data-emoji-destination` attribute of the
`.emoji-picker-popover`.
2024-01-25 18:15:45 -08:00
Sayam Samal d0c111c809 emoji_picker: Fix status emoji picker inconsistencies.
Due to a logical bug in the `process_enter_while_filtering` function,
the `toggle_reaction` was being called when pressing enter while
filtering the emojis in the status emoji picker.

This commit fixes the above bug, while also adding some cleanups to the
`emoji_picker.js` by combining multiple click handlers and aggregating
all the logic related to an emoji being selected into a common function.

Fixes #28464.
2024-01-25 18:15:45 -08:00
vighneshbhat9945 6d6fa145cc
css: Make the height of compose buttons steady.
When any stream name includes some other language's letters is scrolled down in 
the recent views, the height of compose-controls bar would change.

Fix this by setting a precise line-height for these elements.

Fixes: #27837.
2024-01-25 15:16:00 -08:00
Sahil Batra 6781d06988 settings: Remove extraneous divider in account settings. 2024-01-25 14:28:48 -08:00
Sahil Batra 3d56f65df3 settings: Show the text about downloading config in "Active bots".
This commit moves the "Download config of all active outgoing
webhook bots in Zulip Botserver format." text to be shown in the
"Active bots" section since the text is relevant for active bots
only. This commit also updates the code to show the text only
if user has atleast one active outgoing webhook bot since the
text is relavant only for outgoing webhook bots.
2024-01-25 14:28:48 -08:00
Sahil Batra a6370fda68 settings: Do not use bootstrap tabs in bots panel.
This commit replaces the boostrap tabs with our own
tabs implementation from components.ts. This is part
of the bootstrap removal project.
2024-01-25 14:28:48 -08:00
N-Shar-ma 0003c3c1ef typeahead: Fix bug where typeahead showed momentarily on shift + tab.
Since the keyup event for keys including shift triggers the typeahead,
shift tabbing into the topic recipient field would show the typeahead
momentarily, which is distracting.

As we need typeahead to trigger on shift for certain use cases in the
compose box, but not in the topic recipient field, we now do not trigger
typeahead on shift keyup events in the topic recipient field.

Fixes: #24152.
2024-01-25 11:12:26 -08:00
N-Shar-ma e4258b56d5 hotkey: Introduce hotkey Alt+P to toggle preview for compose box.
On Mac, it's Option+P.

Fixes: #18471.
2024-01-25 10:51:25 -08:00
N-Shar-ma 972b4de7c4 hotkey: Correct Mac equivalent of Alt and handle exceptions separately.
Though the correct mapping for Alt in Mac is Option, we had so far been
mapping it to Command, since for the 2 pre-existing shortcuts that used
Alt, Command was the only key that worked on Mac. However, these are
exceptions.

Now we map Alt to Option, and handle the 2 exceptions separately, using
data attributes on those shortcut elements.

This is a prep commit for introducing a hotkey that uses Alt / Option.
2024-01-25 10:51:25 -08:00
N-Shar-ma 536ab78587 refactor: Extract new function `show_preview_area` for the compose box.
The code responsible for switching from edit mode to preview mode from
`compose_setup.js` is now extracted into a new function in `compose.js`,
to facilitate reuse.

This is a prep commit for introducing a hotkey to toggle between edit
and preview mode for the compose box.
2024-01-25 10:51:25 -08:00
Anders Kaseorg 118cfbea65 typeahead: Remove insecure default highlighter implementation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-24 17:46:56 -08:00
Anders Kaseorg 5348bee0eb settings_playgrounds: Fix HTML injection in language typeahead.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-24 17:46:56 -08:00
evykassirer d7b02a699c pygments_data: Move data to typescript. 2024-01-24 17:06:03 -08:00
evykassirer bd6471f0e3 page_params: Add custom_profile_field_types. 2024-01-24 17:06:03 -08:00
evykassirer ebb1105e2f typeahead: Fix type of sorting_comparator. 2024-01-24 17:06:03 -08:00
Sahil Batra 866a610664 group_settings: Empty right panel based on the url hash.
This commit adds code to empty the right panel if hash is
changed to "#groups/your" or "#groups/all".
2024-01-24 14:01:47 -08:00
Sahil Batra a87de19aa7 groups_settings: Fix browser back button for groups overlay.
There is no problem in behavior of browser back button if we open
the group settings overlay using "#groups/your", "#groups/all" or
"#groups/new" url hash, but someone can directly go to a link with
"#groups" and in this case we want to fix the browser back button.

This commit replaces "#groups" entry with "#groups/your" which is the
default section opened, such that pressing back when on "#groups/your"
does not go to "#groups", which will then a form a cycle and instead
go back actually.
2024-01-24 14:01:47 -08:00
Sahil Batra 6e61077ab4 gear_menu: Open group settings overlay with "#groups/your" hash.
This commit fixes the bug in browser back button behavior when
opening the groups overlay from gear menu. The bug was caused
due to browser history containing both "#groups" and "#groups/your"
entries, which essentially resulted in a "#groups/your" -> "#groups"
-> "#groups/your" cycle and thus nothing happend on clicking
browser back button.

The case for a user manually typing "#groups" url would be handled
in next commit.
2024-01-24 14:01:47 -08:00
Sahil Batra baad78aafd groups_settings: Make "Cancel" button work in group creation form. 2024-01-24 14:01:47 -08:00
Pratik Chanda 8559032d3a help_menu: Fix help_menu message formatting overlay not opening.
This commit fixes the behaviour of message formatting overlay in
help menu not opening due to assertion error in rendered markdown
after changes from #28418.
2024-01-23 18:09:57 -08:00
Anders Kaseorg e9ea4280ab vdom: Fix types to avoid relying on unsound bivariance.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-23 12:13:41 -08:00
Aditya Kumar Kasaudhan 19f315cf4f settings: Rename 'display_settings' to 'preferences'.
Fixes part of #26874.
2024-01-23 10:11:44 -08:00
Aditya Kumar Kasaudhan 6cd165386a settings: Rename 'emoji-display-settings' to 'emoji-preferences'.
Fixes part of #26874.
2024-01-23 10:11:44 -08:00
Aditya Kumar Kasaudhan 61a10dfca0 settings: Rename 'display-settings' to 'preferences'.
This commit renames "display-settings-radio-choice-label" to "preferences-radio-choice-label".

Fixes part of #26874.
2024-01-23 10:11:44 -08:00
Lauryn Menard ccfcb34bea activity-css: Make activity charts header row sticky.
This will be applied to both the overall installation activity chart
as well as the associated remote, client, realm and user views.

Co-authored-by: Karl Stolley <karl@zulip.com>
2024-01-23 09:31:05 -08:00
Sahil Batra 9fa39ce71d stream_edit_subscribers: Remove unnecessary logging.
There is no need to log if the stream edit UI is not opened
when an event for updating subscribers list is received and
we should just return because this is not a bug.
We do the same in other places where we just return early
without logging because we do not need to make any updates.
2024-01-22 22:08:10 -08:00
Anders Kaseorg cacdae5a10 message_viewport: Remove needlessly complex make_dimen_wrapper.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-22 18:21:53 -08:00
Lalit 6f6795f607 ts: Migrate `message_viewport` to typescript.
Used function overloading for methods - `make_dimen_wrapper`
and `scrollTop`.
2024-01-22 16:29:23 -08:00
Lalit f2c700b6e1 message_viewport: Refactor `message_viewport_info` method.
Refactoring to avoid having an object of incomplete type i.e. `res`.
2024-01-22 16:29:23 -08:00
Lalit 82841a7b5f message_viewport: Remove unused parameter from `in_view` function. 2024-01-22 16:29:23 -08:00
Lalit d4a4e2df3a message_viewport: Modify parameters for dimension wrapper functions.
JQuery's `height` and `width` methods only takes one argument in case
we want to set height or width. The argument is of type `string` or
`number` or a function.

Refrence: https://api.jquery.com/height/#height-value.

Therefore, we can get rid of argument array and just accept a single
argument in the inner function in `make_dim_wrapper`.
2024-01-22 16:29:23 -08:00
Lalit 530f4fc763 message_viewport: Avoid having unbound methods.
Passing class methods such as `$.fn.height` as values is dangereous
because it removes type safety by failing to capture `this`.
eslint-rule: @typescript-eslint/unbound-method.

Hence, I fixed this rule by directly binding `$scroll_container`
to these methods before passing them as values to wrapper function.
2024-01-22 16:29:23 -08:00
Lalit 69294d5baf message_lists: Add type for `opts` parameter of `select_id` method. 2024-01-22 16:29:23 -08:00
ColeBurch 9917ffa220 settings: Rename four custom profile fields types.
This commit renames four custom profile fields types.

Fixes part of #28511.
2024-01-21 12:51:53 -08:00
Aman Agrawal abe6e5b807 personal_menu: Fix clicking on `Set status` not working.
Use `tabindex` instead of `href` to set focus on `a` tag.

Ideally, we should use `button` for these elements but since
we want to keep the pattern for these dropdowns same where some
`a` elements do have a valid `href`.
2024-01-21 12:06:53 -08:00
Varun Singh c0a0c0e834 scheduled_messages: Convert module to TypeScript. 2024-01-21 08:54:20 -08:00
Varun Singh ac42de07eb scheduled_messages_data: Convert object to Map. 2024-01-21 08:54:20 -08:00
Aditya Kumar Kasaudhan 80ea965408 settings: Rename display_settings_labels to preferences_settings_labels.
Fixes part of #26874.
2024-01-19 17:55:13 -08:00
evykassirer 1948cf15a4 rendered markdown: Assert data-user-group-id is always defined. 2024-01-19 17:54:07 -08:00
evykassirer 8473b9dd48 rendered_markdown: Throw error if stream_id_string is undefined. 2024-01-19 17:54:07 -08:00
evykassirer 1de36ec743 rendered_markdown: Convert module to typescript. 2024-01-19 17:54:07 -08:00
evykassirer 4c5f115a6e people: Remove string type for user_id.
Further discussion here:
https://github.com/zulip/zulip/pull/28418#discussion_r1442220867
2024-01-19 17:54:07 -08:00
evykassirer e4ba07dcf2 message_store: Only allow number for message_id. 2024-01-19 17:54:07 -08:00
evykassirer e986813943 emoji_picker: Don't allow toggling of user status emoji. 2024-01-19 17:54:06 -08:00
Tim Abbott e32468e97f compose: Simplify convert_mentions_to_silent_in_direct_messages.
The behavior to replace existing message content was leftover code
from a previous version of the mechanism, and not intended.
2024-01-19 14:56:55 -08:00
Tim Abbott ca591b49ca compose: Don't convert bot mentions to silent mentions.
This fixes an unintended consequence of the silent mention conversion
logic added in 4d1ade1f88, where bots
that looked for personal mentions would not process mentions in 1:1
DMs.
2024-01-19 14:56:55 -08:00
vighneshbhat9945 d9865e960d emoji_picker: Avoid exception in emoji_picker.
Added if-else condition to check whether the
'section_head_offsets[]' is empty or not.
If it is empty then 'currently_selected' is
coded as 'Popular' else it is assigned with
'section_head_offsets[0].section'.

Fixes #24776.
2024-01-19 11:17:09 -08:00
sayyedarib 9f509d4ab2 status_emoji_selector: Replace fa-smile with custom zulip-smile-icon.
Signed-off-by: sayyedarib <sayyedaribhussain4321@gmail.com>
2024-01-19 09:48:02 -08:00
sayyedarib d41ee3d3d8 user_status: Fix alignment of select-emoji icon of user-status modal.
use flex display justify-content for vertical alignment
instead of using offsets like "top". for horizontal
alignment of smiley-icon use text-align center.

Signed-off-by: sayyedarib <sayyedaribhussain4321@gmail.com>
2024-01-19 09:48:02 -08:00
Aman Agrawal a17f18f155 narrow: Fix message row partially visible on narrow.
This will prevent any message we want to select after narrowing
from being offscreen entirely or partially.

Steps to reproduce the bug:
* `./manage.py populate_db -n 3000 --max-topics=2`
* Narrow to a stream and scroll high up.
* Align two recipient bars together with nothing between them.
* Click on the first recipient bar after keeping the selected message
  on the second recipient bar.
* You will see that the selected message is not in view.
2024-01-19 09:36:19 -08:00
Aman Agrawal db10cca4a2 Revert "desktop_app: Close popover when clicking on "Plan management"."
This reverts commit 1f79e6294f.
No longer required after
70ba7cc042
2024-01-19 08:42:25 -08:00
Aman Agrawal febeeb5dac popover_menu: Fix popover not closed on clicking external links.
For example, gear menu was not closed after `Integrations` button
was clicked since we don't have an event handler which opens
`/integrations` in a new tab but we let the browser navigate user
to `/integrations` after clicking on `a href='/integrations'`.

There was no handler for hiding the popover after clicking on such
links, so this commit adds one.
2024-01-19 08:42:25 -08:00
Mateusz Mandera 1f79e6294f desktop_app: Close popover when clicking on "Plan management". 2024-01-18 15:57:51 -08:00
Aditya Kumar Kasaudhan 1ab4520c4e settings: Rename display-settings-form to preferences-settings-form.
Fixes part of #26874.
2024-01-18 13:39:57 -08:00
Shubham Padia afac26e3e9 refactor: Don't use today arg from render_now in timerender tests.
We cannot remove the today argument for render_now since it is being
used in one other place: timerender.update_timestamps .
2024-01-18 08:32:30 -08:00
Shubham Padia a43a898e12 refactor: Remove today arg from absolute_time.
The today argument was only used in tests and now we're using
MockDate to set the current date.
2024-01-18 08:32:30 -08:00
Shubham Padia 3d2110be51 refactor: Remove current_date arg from last_seen_status_from_date.
The current_date argument was only used in tests and now we're using
and now we're using MockDate in tests.
2024-01-18 08:32:30 -08:00
Shubham Padia d5de26ff3b refactor: Remove current_date arg from relative_time_string_from_date.
The current_date argument was only used in tests and now we're using
MockDate to set the current date.
2024-01-18 08:32:30 -08:00
Shubham Padia 3a233d73c1 refactor: Remove today arg from render_date and use MockDate for tests.
Fixes #26774.
We don't need the today argument anymore since every value passed to
it was a new Date() except the tests where we are using MockDate now.
2024-01-18 08:32:30 -08:00
Aman Agrawal a15d4e2be7 narrow: Extract common methods around setting current list.
This will help us combine activate and deactivate.
2024-01-18 08:31:48 -08:00
Aman Agrawal 9aa8c1f156 lightbox: Use rows module to query message_row elements. 2024-01-18 08:31:48 -08:00
Aman Agrawal 07cc079c8d narrow: Remove unused `narrowed_view` class. 2024-01-18 08:31:48 -08:00
Aman Agrawal 514075329b pm_list: Remove not needed narrow_state mock. 2024-01-18 08:31:48 -08:00
Aman Agrawal 1f1749ffb1 actions_popover: Remove unused parameter `narrowed`. 2024-01-18 08:31:48 -08:00
Aman Agrawal df180f7bd5 single_message: Use data-message-id instead of zid. 2024-01-18 08:31:48 -08:00
Aman Agrawal 633f64a79e narrow: Use message list id to track message lists in DOM.
This removes use of zfilt and zhome from codebase.
2024-01-18 08:31:48 -08:00
Alya Abbott 8272210b47 notifications: Add # to stream name in desktop notifications.
Follows the general pattern of always using a stream marker.
2024-01-17 16:39:41 -08:00
CIC4DA c7fc82727f inbox_ui: Use Intl.ListFormat rather than .join(", "). 2024-01-17 13:43:17 -08:00
CIC4DA ea6b3b84c4 settings_org: Use Intl.ListFormat rather than .join(", "). 2024-01-17 13:43:17 -08:00
CIC4DA caa2dbbba4 filter: Use Intl.ListFormat rather than .join(", "). 2024-01-17 13:43:17 -08:00
CIC4DA cd91bc3d71 compose_ui: Use Intl.ListFormat rather than .join(", ") 2024-01-17 13:43:17 -08:00
CIC4DA efb2a5a38d util: Defining common formatter function 2024-01-17 13:43:17 -08:00
Aman Agrawal e2520da24d event_status: Avoid ever-increasing calls to start_status_polling.
In case, we have an error and `completed` is `false`, we start
two loops of `start_status_polling` which keep increasing with
each call.
2024-01-17 12:46:44 -08:00
Aman Agrawal 6d50a3b2db billing: Fix `Update card` from billing page not working.
Since we don't provide `tier` info to session on billing page,
it was not working.
2024-01-17 12:46:44 -08:00
vighneshbhat9945 59a7a2e11d
settings: Use correct tooltips for deactivated bots.
Added handlebars if-else conditions to display
'User is deactivated' tooltip for deactivated users
and 'Bot is deactivated' tooltip for deactivated bots.

Fixes #28593.
2024-01-17 12:45:03 -08:00
Vidhi Agrawal b21dc465b8 billing: Change background color of reactivate subscription.
Fixes #28428
2024-01-17 12:43:01 -08:00
Aman Agrawal 781473414f drafts: Fix flaky drafts tests.
There were two typeahead displayed while we were testing
create_private_message_draft. One was topic typeahead from previous
create_stream_message_draft test and the other was cordelia
DM typeahead. So, when clicking on the typeahead, we clicked
the topic typeahead when we really wanted to select the cordelia
typeahead. This resulted in drafts test failing.
2024-01-16 09:31:10 -08:00
Aditya Kumar Kasaudhan 8f39b6f905
e2e-tests: Rename display_settings_section to preferences_section.
Fixes part of #26874.
2024-01-16 09:29:40 -08:00
Karl Stolley 906559c2b5 portico: Extend proper background gradients to /plans. 2024-01-15 18:43:33 -08:00
Karl Stolley cc4bb3493a portico: Scope pricing-plans styles to pages that need it. 2024-01-15 18:43:33 -08:00
Karl Stolley f5245285b4 portico: Isolate global plans-page styles in own file. 2024-01-15 18:43:33 -08:00
Mateusz Mandera fc247cba3f remote_billing: Fix /self-hosted-billing/ handling for desktop app.
When you click "Plan management", the desktop app opens
/self-hosted-billing/ in your browser immediately. So that works badly
if you're already logged into another account in the browser, since that
session will be used and it may be for a different user account than in
the desktop app, causing unintended behavior.

The solution is to replace the on click behavior for "Plan management"
in the desktop app case, to instead make a request to a new endpoint
/json/self-hosted-billing, which provides the billing access url in a
json response. The desktop app takes that URL and window.open()s it (in
the browser). And so a remote billing session for the intended user will
be obtained.
2024-01-15 16:50:48 -08:00
shashank-23002 dcec36b824 typeaheads: Fix mention typeaheads spill width.
Fixes: #27825
2024-01-15 16:17:11 -08:00
Aman Agrawal 272337f0f9 filter: Remove incorrect check for `All messages` view.
All message view has `in-home` filter and is not empty.
If there are no terms provided, we set filter to display
all messages (including muted streams/topics).

We make it mandatory to provide terms to Filter.
2024-01-15 12:26:24 -08:00
Aman Agrawal 5357b9814e search: Check for narrow_state.filter being undefined. 2024-01-15 12:26:24 -08:00
Aman Agrawal b36163dd8f typing_events: Handle search_terms() being an empty list. 2024-01-15 12:26:24 -08:00
Aman Agrawal a217138788 message_list: Check filters to decide if list is narrowed.
All messages list always has the "in-home" filter. We are in the
process of removing "zhome/zfilt" from message list, so this would
help in that process.
2024-01-15 12:26:24 -08:00
Aman Agrawal 2f8b82d808 upload: Fix drag drop not working for edit message in `All messages`.
Instead of `zfilt`, we should use table name of the current
message list.
2024-01-15 12:26:24 -08:00
Aman Agrawal 2fdd43a917 filter: Fix tests for guest user without indicator. 2024-01-15 12:26:24 -08:00
Aman Agrawal 5b0d346dd9 filter: Don't modify original terms when testing. 2024-01-15 12:26:24 -08:00
Aman Agrawal d7cbe17773 message_list: Remove unused variable. 2024-01-15 12:26:24 -08:00
Aman Agrawal d52cce9c3a message_list: Cleanup use of zhome to check for all message list.
Add a simple method to check for in-home filter.
2024-01-15 12:26:24 -08:00
N-Shar-ma 2952f0f44f refactor: Initialise state variables to undefined instead of false.
For compose state variables `last_focused_compose_type_input` and
`message_type` that are assigned non-boolean values on user interaction,
`undefined` is the semantically better choice than `false` for
initialisation, to avoid incorrect boolean implications.
2024-01-14 18:11:26 -08:00
N-Shar-ma 79ec61b373 turndown: Paste single line of code as inline code in markdown.
When pasting any code without any newlines, whether from a code block or
a code span, it will always be pasted as inline code.

That is, a line of code copied from within a code span will retain code
span formatting on paste, and a line of code copied from within a code
block will be pasted as inline code, instead of a 1 line code block.
2024-01-14 15:36:38 -08:00
sanchi-t 446ba4d6df message_edit: Fix cursor style on hover in edit area.
Fixes #3938.
2024-01-14 15:34:28 -08:00
shubham 664f29b4f1 unread_ops: Use /messages/flags/narrow to mark stream/topic as read.
This commit refactors the original mark_all_as_read in unread_ops to
bulk_mark_mesages_as_read to include marking stream/topic as read.
The unread_ops API reamins the same to mark stream/topic as read but the
underlying implementation now uses a different endpoint. A new function
mark_all_as_read has been added so that the unread_ops API remains the
same.

Fixes #27372.
2024-01-14 15:32:03 -08:00
Sahil Batra af7cfb677f stream_edit_toggler: Remove setup_stream_subscriptions_hash.
We only update the url hash in one place, i.e. in callback for
toggler, so there is no need to have a separate function and it
also prevents in someone using that function incorrectly in future.
2024-01-14 15:30:46 -08:00
Sahil Batra f3add07280 stream_settings: Make the right panel empty according to the URL hash.
We now make the right panel empty if the URL hash is changed to
"#streams/all" or "#streams/subscribed" either manually or by
using the browser back button.

We call the function to make the right panel empty in change_state
and not in the callback function for toggler.goto because the right
panel empty becomes empty due to change in hash and not due to
toggling between subscribed and all streams.
2024-01-14 15:30:46 -08:00
Sahil Batra 332d61f820 stream-settings: Do not toggle right section in switch_to_stream_row.
We handle showing the correct section in right panel by calling
set_up_right_panel_section from show_settings_for, so there is
no need to call stream_edit_toggler.goto from switch_to_stream_row.
2024-01-14 15:30:46 -08:00
Sahil Batra e26ca5a547 stream-settings: Refactor code used to update url hash.
This commit refactors code to not try to update the hash multiple
times.

We now update the url hash only in the callback function for
toggler.goto and remove the call to setup_subscriptions_stream_hash
in open_edit_panel_for_row. This change works as the hash depends
on the section being opened in right panel, so it seems better to
handle the hash update while toggling to the correct section.

A couple of more changes we need to do to make this work correctly
are -

- We extract the code to call "toggler.goto" for the correct section
outside the update_toggler_for_sub to a new function
set_up_right_panel_section. This is changed as update_toggler_for_sub
returns early without doing anything if the url hash is not the one
we have when settings panel for a particular stream is opened and
now the hash is updated after that check as a callback from
toggler.goto.

- set_up_right_panel_section uses stream_edit_toggler.select_tab
to toggle to the correct section in right panel so we now need
to set stream_edit_toggler.select_tab in change_state.
2024-01-14 15:30:46 -08:00
Sahil Batra a03e3ddc5a stream-settings: Don't change tab when navigating between streams.
This commit fixes the bug of tab in right side being changed to
"general" when navigating between streams through keyboard instead
of opening the tab which was opened for previous stream.

Fixes #28422.
2024-01-14 15:30:46 -08:00
evykassirer 572844f257 typeahead: Maybe stop advance for keypress always.
We don't want to process the key if `suppressKeyPressRepeat`
is true, but we always want to check to see if we should
stop propagation, or else characters typed into the input
field can be processed as hotkeys.
2024-01-14 15:07:24 -08:00
evykassirer 177dfade9d typeahead: Create helper function for stopping propagation.
No functional changes, only a refactor. This is about to be
used in a third place.
2024-01-14 15:07:24 -08:00
evykassirer cf2f0d88c3 search: Add setter and getter for search bar text.
The search bar input is about to get more complicated,
and an upcoming commit will be switching the element
from `input` to a contenteditable div, which means
we'll be accessing the text with text() instead of
val(). To make that change easier, and reduce future
bugs of using the wrong text/val, this commit
makes setter and getter functions so that the text/val
is isolated to one spot.
2024-01-14 15:07:24 -08:00
evykassirer 128c12d0e2 search: Nest pill styling under the typeahead styles.
This is needed for adding pills to search, so that these
styles don't get applied to the search pills.
2024-01-14 15:07:24 -08:00
evykassirer ec0ef35f3c search: Remove unnecessary export of narrow_or_search_for_term. 2024-01-14 15:07:24 -08:00
evykassirer 33e4c9b25c topic_list_data: Convert module to typescript. 2024-01-14 14:50:49 -08:00
N-Shar-ma a4fad5dda1 compose: Revamp and improve test suite for compose formatting buttons.
Earlier, the tests for compose formatting were verbose, hard to read as
well as extend, and overly granular, without even having the ability to
test the final text selection or the cursor position.

Now, new test helpers, `init_textarea_state` and `get_textarea_state`,
have been added, enabling the tests to be more concise and readable,
while also being more powerful. A representative string alone now
describes the textarea state (the text and the selection / cursor),
making each test case as easy as defining the initial state as a string
and comparing the expected state post formatting with another string.

These new tests helped surface a couple bugs which have been fixed in
preceding commits.
2024-01-12 15:48:53 -08:00
N-Shar-ma aba5997557 compose: Fix bug where toggling off link formatting left extra spaces.
In cases where either the description or the URL, or both were empty,
there would be an unneeded space, originally intended to space out the
description and URL, lingering even when the description and/or URL was
missing. The resulting highlight would also be off at times.

Now we only add in a space if both the description and URL are present,
and the highlight too is as intended.
2024-01-12 15:48:53 -08:00
N-Shar-ma b686f97a71 compose: Fix bug where spoiler would not always start on a new line.
Earlier, when a selection not starting at the beginning of a line was
formatted as a spoiler, the spoiler would not start on a new line, and
so would not be rendered as a spoiler. The `Header` highlighting too
was off by one character.

Now, the spoiler starts on a new line, and the `Header` highlighting
works as expected too.
2024-01-12 15:48:53 -08:00
Aditya Kumar Kasaudhan 49a9954413 settings: Rename settings_display to settings_preferences.
This commit renames "settings_display.js" file to
"settings_preferences.js".

Fixes part of #26874.
2024-01-12 15:33:16 -08:00
Tim Abbott 40f99d0990 Revert "portico: Extend proper background gradients to /plans."
This reverts commit 536d2f4e7f.

Apparently pricing_plans.css is included in many unrelated pages.
2024-01-12 14:43:28 -08:00
Aman Agrawal 03254bea5b billing: Change how flat discount on billing/upgrade page is displayed. 2024-01-12 08:50:51 -08:00
Aman Agrawal c9a4660911 header: Avoid using `.dropdown` for class name.
This is avoid conflict with styles defined for `.dropdown` in
bootstrap.
2024-01-12 08:40:51 -08:00
Aman Agrawal 9d1e977e2a portico: Don't use `dropdown-toggle` class.
We want to avoid using `dropdown-toggle` class to avoid
properties leaking from bootstrap.
2024-01-12 08:40:51 -08:00
Aman Agrawal 70ecdf2add helpers: Remove dead bootstrap tabs code. 2024-01-12 08:40:51 -08:00
Anders Kaseorg be13557ead playground_links_popover: Remove wrong $ prefix for non-jQuery variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-11 18:15:59 -05:00
Anders Kaseorg 43e53d9b9d user_status: Fix parsing of partial user_status events.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-11 14:06:11 -08:00
Alex Vandiver e0bd169c77 docs: Fix other help pages that were renamed or moved, to save a redirect. 2024-01-11 13:52:12 -08:00
Vector73 ed97420ffc
settings: Fix setting label click functionality.
This commit fixes "Automatically follow topics where I'm mentioned"
setting label click functionality so that the setting is toggled
on clicking the label.
2024-01-11 13:34:46 -08:00
Karl Stolley fd559495ab message_row: Remove unnecessary .sender-status-controls style and structure. 2024-01-11 12:53:31 -08:00
Karl Stolley 272b62138e message_row: Remove styles and JS for nonexistant .sender-status. 2024-01-11 12:53:29 -08:00
Karl Stolley 09ae717fee message_edit: Lay out edit buttons with flexbox. 2024-01-11 12:51:02 -08:00
Karl Stolley f0f8d6a42d message_edit: Remove styles with no associated structure. 2024-01-11 12:51:02 -08:00
Karl Stolley fd5fe64a33 message_edit: Consolidate styles into message row CSS. 2024-01-11 12:51:02 -08:00
evykassirer 4b14f0efad stream_topic_history_util: Convert module to typescript. 2024-01-11 12:45:39 -08:00
evykassirer 8bd9a91216 stream_list_sort: Convert module to typescript. 2024-01-10 17:43:08 -08:00
evykassirer a75253cdba stream_list_sort: Use more accurate stream_id name. 2024-01-10 17:43:08 -08:00
evykassirer 426e345e65 stream_list_sort: Use a flag instead of checking for undefined list. 2024-01-10 17:43:08 -08:00
Aman Agrawal c58c12911c typing_events: Show typing notification in a proper topic narrow.
It is possible to have multiple topic / stream terms if user
is searching or if the URL is malformed. So, we should check
if the user is in a proper topic narrow before showing
typing notifications.

This fixes the error of topic being undefined due to there
being multiple topic terms in narrow when trying to display
notifications.
2024-01-10 09:08:38 -08:00
evykassirer cd58655a4b stream_topic_history: Convert module to typescript. 2024-01-10 09:02:17 -08:00
evykassirer 8a1fa8b161 stream_topic_history: Simplify add_or_update params. 2024-01-10 09:02:17 -08:00
Sahil Batra dcac272afc user_group_popover: Convert module to typescript. 2024-01-09 16:47:37 -08:00
afeefuddin d0deaff7fd portico-header: Dropped find accounts link for smaller windows.
Fixes #27477
2024-01-09 16:46:24 -08:00
Karl Stolley 5c0e37844b plans: Reduce font-size of text comparison elements. 2024-01-09 16:00:16 -08:00
Karl Stolley f71c7458a7 plans: Consolidate positioning on comparison values. 2024-01-09 16:00:16 -08:00
Karl Stolley 941b76f510 plans: Reduce font-weight on push placeholder button. 2024-01-09 15:59:38 -08:00
roanster007 69de75ec0b compose: Fix display of compose banner when dm disallowed.
Previously, when the compose bar was open with any DM recipient,
and the organization wide setting to disallow DM is toggled, then
the DM not allowed banner is not displayed on the compose until
it is reopened.

This is fixed by changing the server event dispatch of
private_message_policy from noop to a method to  check for
the compose's posting policy status, and display the banner.

Fixes #27774
2024-01-09 12:35:02 -08:00
N-Shar-ma ed949fbc92 compose: Fix duplicate warning banners for the same private stream.
Earlier, a new banner would be showed for each mention of the same
private stream in the compose box. This commit fixes that by checking
if the private stream warning banners already shown include the private
stream just mentioned, and if so, not showing a new banner.

This implementation is in line with the one for warnings for mentions of
users not subscribed to the current stream.

Fixes: #26914.
2024-01-09 10:44:43 -08:00
ecxtacy 62fcb08b1b dev: Center devtool link buttons on devlogin page. 2024-01-09 10:42:47 -08:00
Anuja Patil a3252e0de7
typeahead: Improve slash command typeahead text.
Update the text displayed in the typeahead suggestions for slash commands 
(/poll, /todo, /me) to be cleaner and clearer.

Fixes #27391.
2024-01-09 10:34:05 -08:00
Karl Stolley b80f8eabd4 plans: Specify text color on :active comparison links. 2024-01-09 10:20:00 -08:00
Karl Stolley 6d3f0361f5 plans: Remove overwrought !important declarations.
These were unnecessary, and interfered with expected link, :hover,
and :active styles.
2024-01-09 10:20:00 -08:00
Anders Kaseorg 79379c479d notification_settings: Open push notification docs link in new tab.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-01-09 09:22:31 -08:00
Aman Agrawal 2c6a811468 upgrade: Fix free trial showing annual schedule.
If localstorage has `annual` schedule set, upgrade page for
free trial will show annual schedule. We fix it was overriding
the schedule if it was set to be fixed to a value by us.
2024-01-08 14:41:22 -08:00
Aman Agrawal 3cb1ebeb34 plans: Align price with `details` when no discount is applied. 2024-01-08 14:41:22 -08:00
Karl Stolley 536d2f4e7f portico: Extend proper background gradients to /plans. 2024-01-08 14:15:37 -08:00
kota-karthik 9143172619 settings: Fix color leak during row dragging in tables.
Fixed an issue in the linkifier and custom profile tables where
dragging darker rows color changes in the background.
Following a CZO discussion on using alpha values in HSL,
I implemented a fix using the CSS color-mix property. This approach
mixes the original color with var(--color-background-modal) in
sRGB mode, effectively eliminating the use of alpha and preventing
color leaks. For more context, see the CZO discussion:
[https://chat.zulip.org/#narrow/stream/6-frontend/topic/alphas.20in.20color.20definitions].

Fixes #26480.
2024-01-07 19:30:00 -08:00
Angelica Ferlin 3fcb44e24d
organization settings: Use tippy for edit/delete custom field.
Fixes #27816.
2024-01-07 19:08:05 -08:00
N-Shar-ma f99635d582 refactor: Pass only stream id, not name, to `compose_actions.start()`.
As part of the process of moving from stream names to ids, we now only
pass the stream id in compose args to `compose_actions.start()`.

For when we still need the stream name, and have access to the compose
args, we compute it from the id exactly where needed, to localise the
instances of stream names.
2024-01-07 16:39:56 -08:00
Varun Singh af3b15ef10 read_receipts: Convert module to TypeScript. 2024-01-05 11:52:59 -08:00
Tim Abbott c5a9c78af7 settings_realm_domains: Fix linter error.
This got through into main because the linter error is new.
2024-01-05 11:32:04 -08:00
Varun Singh 4b04716237
settings_realm_domains: Convert module to TypeScript. 2024-01-05 10:50:08 -08:00
evykassirer 979ace1cea message_util: Convert module to typescript. 2024-01-05 10:47:12 -08:00
evykassirer c20df9d64a message_list: Return consistent data structure from add_message.
This was weird, and I think incorrect. Places that call add_message
seem to expect consistent data structures.

I tried looking a bit into it, and couldn't find anywhere where
returning true made more sense. I'm sort of confused this hasn't
caused issues though.
2024-01-05 10:47:12 -08:00
Karl Stolley 9fde83c161 billing: Add Cloud comparison table. 2024-01-04 18:46:05 -08:00
evykassirer 4e66e8742f rows: Convert module to typescript. 2024-01-04 12:45:42 -08:00
evykassirer e3e0125092 rows: Throw exception instead of returning NaN.
We don't expect this to happen, and we don't want
to try to maintain the difficult task of gracefully
handling errors that we don't expect to happen
anyways. This will also make the conversion
to typescript easier.
2024-01-04 12:45:42 -08:00
evykassirer 17bc9af106 message edit: Select message id before getting row.
Getting the row was sometimes causing errors because
the row wasn't in the DOM at the time of trying to
get it. By selecting the message id first, we ensure
it's in the DOM before we call `get_row`.

More conversation here:
https://chat.zulip.org/#narrow/stream/464-kandra-js-errors/topic/Error.3A.20Caller.20should.20pass.20in.20a.20single.20row.2E
2024-01-04 12:45:42 -08:00