Commit Graph

4499 Commits

Author SHA1 Message Date
Anders Kaseorg a1895683b2 message_list_data: Fix _next_nonlocal_message type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 19:18:46 -07:00
Anders Kaseorg 24904f32bb message_list: Remove ids_greater_or_equal_than.
It’s unused since commit c876e12b86
(#23579).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 19:08:08 -07:00
Anders Kaseorg 9cee037f2a message_list: Remove nth_most_recent_id.
It’s unused since commit 748e5b6da6.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 18:56:59 -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 931f515207 message_list_data: Fix type of first, first_including_muted.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 16:41:50 -07:00
Anders Kaseorg 26fd6be88f billing helpers: Add missing $ prefix to jQuery object parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-23 15:41:18 -07:00
evykassirer 27b5c61399 composebox_typeahead: Allow for undefined topic in PersonSuggestionOpts.
Fixes this error, which occured when editing DM messages and bringing
up the mention typeahead with "@"

https://zulip.sentry.io/issues/5389123227/events/46ab6c6ca68344ac89af7444fa0f8c39/?project=4504556882821120
2024-05-23 14:55:40 -07:00
Sahil Batra 959c78e1e1 invite: Fix rendering invite modal for realms without default channels.
The default channels checkbox only exists in DOM if there are default
channels in the realm, so we should make sure that we check whether
there are default channels in the realm before accessing the
checkbox element in set_streams_to_join_visibility.
2024-05-23 11:32:09 -07:00
Aman Agrawal e6c074e206 recent_view: Fix no topic found at center of recent view.
The bug is hard to reproduce, but I was able to reproduce with #30134
and used the same strategy to fix it here.
2024-05-23 10:39:27 -07:00
Aman Agrawal e530af5013 narrow: Fix combined feed selecting random messages on narrow.
Reproducer:

* Have some unreads in the Combined feed view.
* Scroll up and select a message that was not part of initial fetch.
* Reload.
* Go a another narrow.
* Come back to combined feed to find your at a random message. This
  message is actually last message of the current fetch of
  combined feed view which was returned via `first_unread_message_id`.
2024-05-23 10:37:29 -07:00
Aman Agrawal b22adc1d5f filter: Fix combined feed navigating to muted unread message.
Some we didn't have a check for if topic is muted here which
resulted in combined feed trying to navigate user to muted
unread message if it was the first unread in the narrow.
2024-05-23 09:17:40 -07:00
Karl Stolley 20d6dd110a left_sidebar: Align more-topics indicator on topic grid. 2024-05-22 17:24:35 -07:00
Karl Stolley 50a7e3cf2c left_sidebar: Flatten renamed .sidebar-topic-name selector. 2024-05-22 17:24:35 -07:00
N-Shar-ma 68c83bce44 widgets: Fix bug where `process_submessages()` was run for empty rows.
We now check if the row exists in the current view, and only then do we
process the submessages in it, instead of letting `Error: Failed to
do_process_submessages` happen.
2024-05-22 17:16:54 -07:00
roanster007 3b73f19719 refactor: Extract method to create and update message lists in narrow.
This commit extracts the method to create and update message
lists in the narrow. This is particularly useful in cases when we
need to update the narrow and view with our own message lists.

This is a preparatory commit to #30114, since it involves
creating a new message list from the messages fetched,
which may be of a different narrow from that of the
initial filter, and updating the view and narrow with it.
2024-05-22 15:31:49 -07:00
Karl Stolley 0fbdd02d87 compose: Tune send-controls vdots for narrowest viewports. 2024-05-22 11:36:28 -07:00
Karl Stolley ac6ac58385 compose: Strengthen layout in send-controls area. 2024-05-22 11:36:28 -07:00
Sahil Batra 39c6a01c74 settings: Fix updating realm join restrictions setting.
This commit fixes the bug when updating
"Restrict email domains of new users?" setting by
adding data-setting-widget-type attribute to the select
element as get_input_element_value now expects every
element to have that attribute after 64c8262eaf.

Due to this change, we also need to update the code in
populate_data_for_request function to not send invalid
parameter in the request. This change resulted in some
refactoring which now helps in not passing in the
"disallow_disposable_email_addresses" and
"email_restricted_to_domains" when these fields are
not changed.
2024-05-21 21:20:50 -07:00
Sahil Batra ed8d7ed864 settings: Fix code for updating realm default language.
This commit fixes the bug when updating realm default
language setting by adding data-setting-widget-type
attribute to the relevant element with "prop-element"
class as get_input_element_value now expects every
element passed to it to have that attr after 64c8262eaf.

As a result we can now remove the code from
get_complete_data_for_subsection to handle realm
default language and just let get_input_element_value
handle it and it also helps in passing the parameter
unnecessary to request when the setting is not changed.
2024-05-21 21:20:50 -07:00
Sahil Batra a530311646 settings: Fix user notification batching settings.
This commit solves the bug for user notification batching
setting which was introduced during the typescript migration
of settings_components.js due to assertion error in
get_input_element_value.
2024-05-21 21:20:50 -07:00
Aman Agrawal 0d3e223493 compose: Fix formatting popover persists on wide screens.
Reproducer:

1. Make your window narrow, to get the `...` formatting buttons menu.
2. Open the menu.
3. Make your window wide again.
2024-05-21 14:56:00 -07:00
afeefuddin 206c8ffedc settings_profile_field: Fix class selector. 2024-05-21 09:09:58 -07:00
Aman Agrawal 7d41c8ce06 narrow: Add minor comment. 2024-05-20 15:01:48 -07:00
Aman Agrawal cd41e5f4fa narrow: Rename save_narrow. 2024-05-20 15:01:48 -07:00
Aman Agrawal 625b07c010 recent_view: Complete TODO to use first unmuted unread message id.
We already had the data at initial request, so we just add
some plumbing to make it available.
2024-05-20 15:01:47 -07:00
Anders Kaseorg ffb182fb25 compose_popovers: Fix message_type typo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-05-20 14:30:29 -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
afeefuddin dbd44bff5c settings_components: Rename subsection to $subsection_elem. 2024-05-20 13:33:08 -07:00
sujal 4a652ed38d stream_settings: Update feedback message to include user name.
Add user name in feedback message so that it is more clear
which user is unsubscribed.

With tweaks by tabbott to handle the yourself case.

Fixes #19165.
2024-05-20 11:32:19 -07:00
afeefuddin 64d8a18b76 settings_profile_fields: Convert Module to TypeScript. 2024-05-20 11:17:58 -07:00
afeefuddin 578f0319b2 types: Add UserExternalAccountData type. 2024-05-20 11:17:58 -07:00
afeefuddin ea4fdcb2a5 state_data: Add realm_default_external_accounts to realm_schema. 2024-05-20 11:17:58 -07:00
afeefuddin e40ef29e63 settings_profile_fields: Pass Jquery consistently. 2024-05-20 11:17:58 -07:00
afeefuddin 448870225b settings_profile_fields: Use this keyword instead of e.currentTarget. 2024-05-20 11:17:58 -07:00
afeefuddin 1fcc3e8878 settings_org: Move populate_data_for_request to settings_components. 2024-05-20 11:17:58 -07:00
Lalit 5ea98cba54 input_pill: Add test for `input` event handler. 2024-05-20 09:13:26 -07:00
Sayam Samal dbebd0ddbf popovers: Move navbar popovers to a subdirectory. 2024-05-20 09:10:36 -07:00
Sayam Samal a289a823a0 popovers: Move left sidebar popovers to a subdirectory. 2024-05-20 09:10:36 -07:00
Sayam Samal dd4b1fdfed popovers: Rename and move topic_sidebar_actions.hbs. 2024-05-20 09:10:36 -07:00
Sayam Samal 7e021e6699 popovers: Rename and move stream_sidebar_actions.hbs. 2024-05-20 09:10:36 -07:00
Sayam Samal e6cb690037 popovers: Rename and move personal_menu.hbs. 2024-05-20 09:10:36 -07:00
Sayam Samal 018142e6ec popovers: Rename and move gear_menu_popover.hbs. 2024-05-20 09:10:36 -07:00
Sayam Samal 05b1ae42b2 popovers: Rename and move navbar_help_menu.hbs. 2024-05-20 09:10:36 -07:00
Sayam Samal dae9b6b9ed popovers: Rename actions_popover.hbs. 2024-05-20 09:10:36 -07:00
Sayam Samal b30698e49d popovers: Rename and move starred_messages_sidebar_actions.hbs. 2024-05-20 09:10:36 -07:00
Sayam Samal f4129aa9df popovers: Rename and move drafts_sidebar_action.hbs. 2024-05-20 09:10:36 -07:00
Aman Agrawal 44fa39c4c4 recent_view: Fix error on initial fetch being all muted messages.
If the initial fetch pre #29740 fetches all muted messages we don't
have any messages in all message list and hence query for
oldest message is undefined.

This results in us trying to render oldest_message_timestamp
with its value as infinity.

To fix it, we include muted messages in our search for oldest
message in the list and if we still cannot find one, we wait
for the next fetch.
2024-05-19 23:27:14 -07:00
ecxtacy 6af748fa77 pills: Optimize removePill function.
The removePill function of input_pill module uses a for loop
for iterating and finding the required pill.
Replace the for loop with inbuilt findIndex function for efficiency.

Authored-by: Dhruv Chouhan <dc.dhruvchouhan@gmail.com>.
2024-05-17 10:47:22 -07:00
ecxtacy ac7dd6fa08 settings: Show user_group_popover when pill is clicked.
Add 'click' event listener to the pills in stream settings
to toggle the user_group_info_popover.

Fixes #28687.

Co-authored-by: Pieter CK <pieterceka123@gmail.com>.
2024-05-17 10:47:22 -07:00
PieterCK 82a817aaab hashchange: Fix popover not disappearing on overlay hash URL.
Refactored hashchanged() so that popover.hide_all()
is executed before checking is_overlay_hash() to close
popovers when the user changes hash but still on overlay.
2024-05-17 10:47:22 -07:00