Commit Graph

50403 Commits

Author SHA1 Message Date
Prakhar Pratyush 1b7cbd9ef0 UserTopic: Refactor 'do_set_user_topic_visibility_policy'.
This commit refactors 'do_set_user_topic_visibility_policy'
to remove the if/else block and just have a single call to
'set_user_topic_visibility_policy_in_database'.

The branching out behaviour based on the user_topic
visibility_policy is reduced to one place, i.e.,
'set_user_topic_visibility_policy_in_database'.
2023-03-10 14:39:14 -08:00
Akarsh Jain b0928f55e7 streams: Add stream symbol to unsubscribe confirmation modal.
This commit adds the appropriate stream symbol to the
heading of the "Unsubscribe from stream" confirmation modal.

Fixes: #23953
2023-03-10 14:37:55 -08:00
sbansal1999 5f4bdfe6bc ts: Convert css_variables.js to TypeScript. 2023-03-10 14:35:23 -08:00
Ujjawal Modi 0eca9cb319 bots: Improve bots permission banner.
Added a separate template file for banner
messages in bots panel under personal and organisation
settings.

Banners for bots panel under personal
settings are shown only when user cannot add bots.
Banners for bots panel under organisation settings are shown
only when user cannot add bots or user is administrator.

Fixes #24155
2023-03-09 17:52:31 -08:00
Alya Abbott 560ce87063 help: Tweak documentation on migrating from other chat tools.
- Add a note about the Slack-compatible webhook.
- Make page more consistent with documentation style guidelines.
2023-03-09 17:50:50 -08:00
David Rosa b9f7b64793 help: Add instructions for viewing status.
- Adds instructions blocks for web/desktop and mobile.
2023-03-09 16:14:14 -08:00
palashb01 dee63680df docs: Update time format and Emoticon help page.
Updated the title and description in the 'enable-emoticon-translation'
file and renamed the file accordingly. Added a new bullet point for
'time format' in the 'configure-new-user-settings.md' file and updated
the sidebar index by replacing the title 'Use 24-hour time' with
'Change the time format'.
2023-03-09 16:12:45 -08:00
palashb01 f081c4abfd display_settings: Add fade to emoji-theme & user-list-style banners.
Added a 1000ms fadeout timer to the success banners for the 'Emoji'
theme and 'user-list-style' checkbox, to match the other banners in
display settings.

Fixes: #23288.
2023-03-09 16:12:45 -08:00
palashb01 189ceee8f0 display_settings: Move the 'user-list-style' out of Emoji section.
Move the 'user-list-style' checkbox from the 'Emoji' section to the
'Advanced' section, and update the 'settings_display.js' file by
replacing the 'theme-settings' classname with 'advanced-settings'
classname to display the success banner of 'user-list-style' checkbox
with the 'Advanced' title.
2023-03-09 16:12:45 -08:00
palashb01 3dd84910f4 display_settings: Rename and reorder the theme dropdown menu.
Rename 'Sync with computer' to 'Automatic (follows system settings)',
'Light Theme' to 'Light' and 'Dark Theme' to 'Dark', and rename the
color scheme label to 'Theme'.

Reorder the dropdown menu to have light theme before dark theme.
2023-03-09 16:12:45 -08:00
palashb01 af07db7971 display_settings: Rename 'Theme' section to 'Emoji'.
Rename the 'Theme' section to 'Emoji'. Since there is no 'Theme' section
anymore, replace the 'theme-settings' classname with
'emoji-display-settings' in the 'settings_display.js' file.

The existing "Theme" selector dropdown is moved from the now the
'Emoji' section to the 'General' section.
2023-03-09 16:12:45 -08:00
palashb01 2067c71a93 display_settings: Rename and update the 'language-time' section.
Rename the 'language-time' title to 'General'. As the 'language-time'
section no longer exists, replace the 'lang-time-settings' classname
with the 'general-settings' classname in the 'settings_display.js' file.

Updated the 'change-the-time-format.md' and 'change-your-language.md'
documentation files to reflect these changes.

To pass the puppeteer_test Replaced the 'lang-time-settings-status'
classname to 'general-settings-status' inside 'settings.test.ts' file.
2023-03-09 16:12:45 -08:00
David Rosa 49081b9682 help: Move "Configure how links open" to the Apps section.
- Moves page to the "Apps" section of the sidebar.
- Adds "in mobile apps" to the top-of-page title.

Follow-up to #24447.
2023-03-09 16:11:51 -08:00
Anders Kaseorg 8102556578 ci: Run generate-failure-message from the right path.
This was broken by commit 3a0620a40c
(#23719).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-09 13:20:24 -08:00
Hardik Dharmani 570c9e260b overlays: Fix dependency cycle between popover.js and overlays.js.
This is a Prep PR for #24426.

Removes direct dependency cycle between 'popover.js'
and overlays.js by creating popover.initialize method
called from 'ui_init.js' that calls
overlays.register_pre_open_hook(hide_all) and
overlays.register_pre_close_hook(hide_all).

Created a function call_hook that loop call all
registered hooks at the start of 'open_overlay' and
'close_overlay'.
2023-03-09 10:42:27 -08:00
Anders Kaseorg 3bfbfb014a zilencer: Switch a log message back from %r to %s.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-08 22:56:55 -08:00
Anders Kaseorg 2d9b2a2a05 models: Remove type prefixes from __str__ values.
The Django convention is for __repr__ to include the type and __str__
to omit it.  In fact its default __repr__ implementation for models
automatically adds a type prefix to __str__, which has resulted in the
type being duplicated:

    >>> UserProfile.objects.first()
    <UserProfile: <UserProfile: emailgateway@zulip.com <Realm: zulipinternal 1>>>

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-08 22:56:55 -08:00
Anders Kaseorg f66136fcc2 zulip_tools: Improve error for `run` subprocess killed by signal.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-08 22:10:25 -08:00
Manas Jayaswal 3e24a05e66
settings: Improve wording of "Show API key" modal.
This commit changes the "Show API key" modal to use a more intuitive
description of the user's password field, and also to put the reset password
option, which should be the less common case, at the end.

Fixes: #24506.
2023-03-08 18:48:37 -08:00
David Rosa 010b362b29 help: Add “Configure how links open” page.
- Documents "Open links with in-app browser" option.
2023-03-08 15:56:04 -08:00
Lauryn Menard be5954270c landing-page: Add section on chat.zulip custom linkifiers.
Adds a section in the development community norms about using the
custom linkifiers in chat.zulip for the different Zulip project
repositories on GitHub.
2023-03-08 14:24:49 -08:00
Aman Agrawal c928c87645 google_analytics: Track realm registration separately from user signup.
While the function which processes the realm registration and
signup remains the same, we use different urls and functions to
call the process so that we can separately track them. This will
help us know the conversion rate of realm registration after
receiving the confirmation link.
2023-03-08 11:34:36 -08:00
N-Shar-ma 6a4c12b41e drafts: Space draft message content from restore draft button by 5px.
When the 1st line of a draft message took up the maximum horizontal space
possible, the last character was way too close to the pencil icon. More
noticeably, when a message began with a code block, it's right edge would
touch the icon.

To space the message contents and the restore draft button, now a margin
of 5px has been added to the draft message content. This makes the message
content narrower by 5px.
2023-03-08 11:33:53 -08:00
SameepAher 7f9fccedff css: Fix search bar width in right sidebar.
Remove old broken css which incorrectly set the width of the user list
filter bar in the right sidebar, for devices whose width is lesser than
md.
2023-03-07 16:50:30 -08:00
Aman Agrawal b0a468907b people: Add function get participants from user_ids_string.
This implements the TODO in recent_senders.
2023-03-07 15:43:03 -08:00
Aman Agrawal e6f3ffb946 recent_senders: Fix twice sent user ids in PM to self case.
This caused double user avatar to appear in recent conversations
for when showing user PM to self.
2023-03-07 15:43:03 -08:00
Lauryn Menard a633890d87 docs: Update documentation for tips when writing pull request comments.
Adds a 'Tips and best practices' section to the documentation on
writing reviewable pull requests.

Also, updates step 3 of the documentation on creating pull requests
to link to the new section and to not have an out-of-date screenshot
of the GitHub pull request template.
2023-03-07 15:40:04 -08:00
N-Shar-ma ce68911ab2 hashchange: Ensure no duplicate entries in browser history.
Until now, whenever the hash was updated using the `set_hash` function,
the new url was always pushed into the browser history, even if the current
hash was same as the new hash. This lead to multiple duplicate entries in
the browser history, when using the `z` hotkey to zoom to a message
repeatedly, which is very inconvenient when navigating through history.

This is now fixed by simply returning prematurely from `set_hash` if the
new hash is same as the current one. This fix will also prevent any future
features like `z` from causing duplicate browser history entries.

Fixes: #24468.
2023-03-07 15:39:36 -08:00
evykassirer 6581276a87 search css refactor: Nest media queries. 2023-03-07 15:38:11 -08:00
evykassirer 0a7fbc7085 search css refactor: Move search-related selectors out of media queries. 2023-03-07 15:38:11 -08:00
evykassirer 1df3b4f86f search: Rename .search_button to more correct .search_close_button. 2023-03-07 15:38:11 -08:00
evykassirer 3d3d00ab8e search css refactor: Split pill searchbox code into its own section. 2023-03-07 15:38:11 -08:00
evykassirer a030fe40ac search css refactor: Split up general media query. 2023-03-07 15:38:11 -08:00
evykassirer f1e6f4b5dd search css refactor: Move relevant css from zulip.css. 2023-03-07 15:38:11 -08:00
evykassirer caba06e93d global css: Convert SASS variables to CSS custom properties. 2023-03-07 15:38:11 -08:00
Hardik Dharmani e61a092f1e
stream_settings: Fix save/discard widget on narrow screens.
In narrow screens, the save/discard widget was incorrectly shown
even with no changes, due to the CSS intended to switch it from `inline-block` 
to `block display.

Fixed by adding `display: none` to `.hide` class for @media(width < 575px)
to hide buttons on screen width less than 575px.

Fixes #24589.
2023-03-07 15:37:24 -08:00
Sahil Batra 0488dfdd9e openapi: Add links to email_address_visibility help documentation. 2023-03-07 15:11:28 -08:00
Sahil Batra a48faec887 create_user: Refactor notify_created_user function.
This commit refactors the notify_created_user function to
call format_user_row twice with different parameters instead
of modifying the person object returned by format_user_row.

This change makes the code somewhat more easy to understand
than it was before.
2023-03-07 15:11:03 -08:00
Alex Vandiver a06a699c35 invites: The aggregate is null if there are no rows to sum. 2023-03-07 15:04:39 -08:00
Alex Vandiver 36da7783ce invites: _max_invites is currently never None.
dc1eeef30a made the column nullable, with the meaning for null of
"use the current `settings.INVITES_DEFAULT_REALM_DAILY_MAX`."
However, 8a95526ced switched to calling `do_change_plan_type` during
realm creation, which sets `realm.max_invites` based on the plan type,
thus ensuring that no new realms have their `_max_invites` set to
null.

Check `max_invites` instead of `_max_invites`.  This requires test
adjustments for the fact that `apply_invite_realm_heuristics` is now
run.
2023-03-07 15:04:39 -08:00
Alex Vandiver 75138102f4 invites: Extract new realm invitation heuristic. 2023-03-07 15:04:39 -08:00
Alya Abbott 46fd215893 help: Link to /apps from help center. 2023-03-07 15:03:49 -08:00
Alya Abbott dbf92c4e2f help: Drop outdated "Zulip in a terminal" help page. 2023-03-07 15:03:49 -08:00
Alya Abbott d23e48441a help: Improve Supported browsers article.
- Simplify explanations, and make them consistent with documentation
  style guide.
- Add related articles.
2023-03-07 15:03:49 -08:00
Alex Vandiver a253c478f6 test_classes: Provide path to test-backend for ease of copy/paste. 2023-03-07 15:02:31 -08:00
Alex Vandiver 739d527b16 sentry: Enable reporting on portico and other unauth pages. 2023-03-07 15:01:27 -08:00
Alex Vandiver b04843e2f9 sentry: Consistently use "(root)" for empty realm in user info. 2023-03-07 15:01:27 -08:00
Alex Vandiver cd288af4d5 sentry: Better URL filtering.
Always add `webpack_public_path` to all of the URL filters, and make
it a regex.  Also adjust to respect undef realm_uri, such as when a
spectator.
2023-03-07 15:01:27 -08:00
Lauryn Menard dfb9f74017 api_docs: Add page documenting HTTP headers in the api docs.
Adds a page to the general api documentation about HTTP headers,
so that information about the special response headers for rate
limits have a more logical location in the docs and so that other
HTTP header information can be shared, such as `User-Agent`
conventions.

Adjusts some text and linking on the rest-error-handling page and
overview page for the REST API for the addition of the HTTP headers
page.
2023-03-07 12:51:17 -08:00
Lauryn Menard d9d17eb87e help: Add article for supported browsers.
Creates new help article for supported web browsers. Also updates
links in the `/apps` landing page as well as the unsupported-browser
template and the `set-up-your-account` article.

Fixes #14732.
2023-03-07 12:01:48 -08:00