Commit Graph

53555 Commits

Author SHA1 Message Date
Aman Agrawal 1d697c344b message_avatar: Don't allow direct selection.
Use can no longer copy the avatar directly unless starting from
somewhere outside the `recipient_row` like date divider.
2023-09-28 14:26:21 -05:00
Aman Agrawal 3838561b05 message_body: Allow sender name to be selected.
This also blocked /me messages from being selected.
2023-09-28 14:26:21 -05:00
Aman Agrawal e7a3a44e35 util: Implement is_valid_url more correctly, with tests. 2023-09-28 12:22:44 -07:00
Aman Agrawal 7b252572b0 navbar: Stop restricting max-width of org name at 1170px window width.
This was unnecessary as tested manually.
2023-09-28 09:51:47 -07:00
Aman Agrawal 29c8f6bd06 navbar: Darken navbar on hover.
This improves the contrast between navbar text and background.
2023-09-28 09:51:47 -07:00
Karl Stolley 938b4f012a left_sidebar: Limit privacy icon styles to streams list.
This fixes a regression introduced in #26807, where a padding
adjustment spilled over to the privacy icon display in message
headers.

This fix should prevent future spillover by isolating left-sidebar
stream icon styles to just the streams list.
2023-09-28 09:36:44 -07:00
Hardik Dharmani 71b915e09d unread: Fix logic for wildcard mentions in direct messages.
Wildcard mentions in direct messages were not being count as mentions
due to incorrect calculation of `is_unmuted_mention` variable in
`update_message_for_mention()` function in `unread.js`. Fixed this by
correcting the calculation of `is_unmuted_mention`.
2023-09-28 09:35:30 -07:00
Aman Agrawal f7b633f511 settings_org: Move is_valid_url to util. 2023-09-28 09:13:51 -07:00
Aman Agrawal de2b1adfe6 markdown: Combine regexes. 2023-09-28 09:13:29 -07:00
Aman Agrawal 08d1290912 popovers: Remove unnecessary removal of popover classes.
has_popover is not used anywhere.
has_emoji_popover is not used anywhere.
has_actions_popover is handled by actions popover itself.
2023-09-28 08:45:43 -07:00
Aman Agrawal ddb0d8d298 flatpickr: Use flatpickr instance instead of has_popover to track it. 2023-09-28 08:45:43 -07:00
Aman Agrawal b065cfa0c1 stream_popover: Move left sidebar function to sidebar_ui. 2023-09-28 08:41:03 -07:00
Aman Agrawal 820b564072 right_sidebar_ui: Rename to sidebar_ui. 2023-09-28 08:41:03 -07:00
Lauryn Menard 5774486c12 api-docs: Correct error documentation for api/deactivate-own-user.
In commit 3e369bcf9, the `code` field for api/deactivate-own-user
was incorrectly documented as "BAD_REQUEST", which is the code for
the similar error returned by api/deactivate-user.

Corrects the error code to be "CANNOT_DEACTIVATE_LAST_USER" and
adds documentation for the two other fields returned by this
error response.

Note that the descriptions for the fields are added in the error
response schema will not be rendered in our current documentation.

They are rendered in other third-party tools and are therefore
good to have in our OpenAPI documentation. The description that
will be rendered in our documentation is the general error response
schema description and that is also updated for details about the
extra fields in this error response.
2023-09-28 08:39:29 -07:00
Aman Agrawal 54ac09174b recent_view_table: Add a tooltip to unread sort header. 2023-09-28 08:03:47 -07:00
Hardik Dharmani 55b0b5cb96 gear_menu: Remove href="#logout" from logout button.
Remove href="#logout" from last option of gear_menu as
logout is already handled by click handler for .logout_button.

Fixes part of #22802
2023-09-27 18:01:47 -07:00
Lauryn Menard 84f1ee84ff email-notifications: Add helper function to TestFollowupEmailDelay.
Adds a helper function to main test in TestFollowupEmailDelay so
that adding additional onboarding emails to the schedule is clearer.
2023-09-27 17:38:05 -07:00
evykassirer dec49883d4 search: Close search box when searching for an empty string.
Previously clearing the search box and pressing enter would
redirect the user to All Messages. This commit changes the
behavior so that the search bar closes with no other effects.

More discussion on this on CZO here:
https://chat.zulip.org/#narrow/stream/101-design/topic/recent.20conversations.20for.20streams/near/1621501
2023-09-27 17:33:49 -07:00
Mateusz Mandera ac14a8bcf5 typed_endpoint: Rename WebhookPayload to JsonBodyPayload.
This kind of payload that's loaded from json in the body of the request
is not only used for webhooks, but also in the push bouncer, and may get
used elsewhere too - so a general name is better.
2023-09-27 14:21:42 -07:00
Alya Abbott 31af4fb24b help: Document option to add stream to default streams when creating.
Option was introduced in #24216.
2023-09-27 14:10:08 -07:00
Alya Abbott 611996aaa9 help: Improve /help/view-a-messages-edit-history.
- Drop unnecessary heading.
- Reorganize and tighten content.
2023-09-27 14:07:41 -07:00
Karl Stolley b6fd9c3584 left_sidebar: Better express stream-icon vertical alignment. 2023-09-27 14:06:09 -07:00
Karl Stolley a27cfa9a84 left_sidebar: Express stream row as grid. 2023-09-27 14:06:09 -07:00
Karl Stolley bbedd0ca0d left_sidebar: Restructure stream rows to match topics. 2023-09-27 14:06:09 -07:00
Karl Stolley 874bfbfd43 left_sidebar: Remove whitespace near follow icon.
Only the icons and unreads should be treated as flex items. Not
text nodes or whitespace.

See CZO discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/Left.20sidebar.20rows.20as.20grids/near/1645466
2023-09-27 14:06:09 -07:00
Karl Stolley e7814cbc46 left_sidebar: Display markers and controls as flex items.
This commit also resets a few styles that no longer make sense in
a flex setting for markers and controls.
2023-09-27 14:06:09 -07:00
Karl Stolley de88df5de8 left_sidebar: Establsh topic rows as a CSS grid.
This commit includes fixes to satsify vertical alignment, which is
now solely handled by CSS Grid. The commit also consolidates styles
and selectors for the sake of both necessity and readabilty.
2023-09-27 14:06:09 -07:00
Karl Stolley 7b6f078cfc left_sidebar: Explicitly register clickable topic areas.
This seems to more accurately express the current, desired behavior
in topics lists, but it is a necessity for moving the vdots into
the topic box (otherwise, vdots clicks simultaneously register on
the topic box itself).
2023-09-27 14:06:09 -07:00
Karl Stolley 951714b2d0 left_sidebar: Group topic markers and controls.
This also corrects a set of single quotes, on the href attribute in
the topic list-item template..
2023-09-27 14:06:09 -07:00
Karl Stolley c19c23e311 left_sidebar: Include vdots in topic box. 2023-09-27 14:06:09 -07:00
Karl Stolley 04e1d2c39d left_sidebar: Structure topic box as a div.
This helps clarify in the templates that the topic box is in fact
a box, and not an inline item (span).

Also, single quotes have been changed to doubles in li and new div
elements.
2023-09-27 14:06:09 -07:00
Tim Abbott 9e3133e820 openapi: Add inline code block around count parameter. 2023-09-27 14:02:27 -07:00
Prakhar Pratyush 49092dfa79 unread_msgs: Fix all unreads in muted stream being treated as muted.
Earlier, 'is_row_muted' returned 'true' if the message was in
a muted stream or muted topic.

If the message is in an unmuted or followed topic in a muted
stream, such topics should be treated as not muted topics
in an unmuted stream.

This commit fixes the incorrect behavior.

Now, for wildcard mentions, 'unread_msgs.mentions' exclude
the IDs in muted streams only if the message is in default or
muted topic.

Also, 'unread_msgs.count' takes into account the unreads in unmuted
or followed topics in muted streams too.

Documents that this bug was fixed in the API changelog.
2023-09-27 13:11:20 -07:00
Prakhar Pratyush a18a526427 muted_stream_ids: Use set for O(1) search operation.
Update 'get_muted_stream_ids' to return a set of IDs
instead of a list.

This will help to avoid linear time search operations later
while using 'if stream_id in muted_streams_ids'.
2023-09-27 13:11:20 -07:00
Prakhar Pratyush faa98317bc user_topics: Refactor build_topic_mute_checker to support each policy.
This prep commit renames the 'build_topic_mute_checker' function
to 'build_get_topic_visibility_policy' and updates it to support
all the visibility policies.

The function prefetches the visibility policies the user has
configured for various topics and prepares a dict named
'topic_to_visibility_policy' to be used later on.
2023-09-27 13:11:20 -07:00
Prakhar Pratyush b5232c56ad test_unread_msgs: Update comment regarding unread message count.
A comment was added in f797604 to convey that the unread count
at that time doesn't exclude the unreads in muted topics.

848c080 added the support to exclude the muted topic;
however, the comment was not updated.

This commit updates the comment to reflect the current behavior.
2023-09-27 13:11:20 -07:00
Aman Agrawal a11178310c navbar: Minor adjustments.
Use semi-transparent background color and few margin adjustments.
2023-09-27 13:07:57 -07:00
Aman Agrawal 54d2a02f7e footer: Minor adjustments. 2023-09-27 13:07:57 -07:00
Karl Stolley b70dc23a47 view_labels: Change 'Direct messages' to 'All direct messages'. 2023-09-27 12:48:06 -07:00
Karl Stolley 48424c4c8e navbar: Explicitly calculate offset from title and search.
A separate `margin-right:` declaration helps keep the calculation
and intention more readable.
2023-09-27 12:22:47 -07:00
Karl Stolley ad588e7441 navbar: Set search-container width in CSS vars. 2023-09-27 12:22:47 -07:00
Aman Agrawal 724e76ee80 package: Install `open sans` variable font.
This will be used by our new /hello page.
2023-09-27 12:15:03 -07:00
Tim Abbott efb3059fdb models: Add more comments documenting AbstractMessage. 2023-09-27 11:49:04 -07:00
Anders Kaseorg 83f696d217 util: Fix inefficient RegExp construction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-27 11:33:13 -07:00
Alya Abbott 6b92e71453 help: Tweak wording in help/add-a-custom-linkifier. 2023-09-27 11:32:32 -07:00
Deepayan Mukherjee 79916b9c24
onboarding: Finish renaming display settings -> preferences.
Fixes part of #26874.
2023-09-27 11:30:11 -07:00
Anders Kaseorg 50a751cc23 bootstrap: Delete button JavaScript.
Commit 537617b46d (#23466) removed our
last use of .button(), and we have never used data-toggle="button".

(We are still very entangled with the Bootstrap button CSS, so that
remains for now.)

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-27 11:13:45 -07:00
Tim Abbott b3c44864fa user_profile: Move show_button_spinner to correct module.
It's only used in one place, from code that we moved to
user_profile.js in recent weeks.
2023-09-27 10:41:05 -07:00
Vector73 9e9326b5df settings_users: Add "Reactivate user" option in "manage user" panel.
Fixes: #26693.
2023-09-27 10:41:05 -07:00
Tim Abbott 5177f25353 settings: Move confirm_reactivation out of settings_users.js.
This better organization may also simplify removing import cycles in
the future.
2023-09-27 10:41:05 -07:00