Commit Graph

44535 Commits

Author SHA1 Message Date
Abhijeet Prasad Bodas 2aea944a7e models: Rename UserTopic.date_muted to last_updated.
This is a follow-up to #19388.

We will in the future allow patch requests to change the visibility
of an existing topic, so `last_updated` is better name for this field.

This commit does not affect the API or events in any way, but only the
database.
2021-09-17 12:14:28 -07:00
Tim Abbott ea6a40661c migrations: Add progress output to confirmation backfill.
This makes it a lot easier to estimate how long this migration will
take to run. Additionally, document this migration in the upgrade notes.
2021-09-17 11:23:32 -07:00
Anders Kaseorg 7f9e5e2aad favicon: Fix embedded number font for Webpack 5 asset modules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-09-16 17:20:30 -07:00
Tim Abbott 26d9854a5a settings: Deduplicate notification settings labels. 2021-09-16 16:07:32 -07:00
Sahil Batra 1682ec46dd settings: Add live update code for realm-default notification settings. 2021-09-16 15:46:41 -07:00
Sahil Batra d4c8284d24 settings: Add UI for realm-level defaults of notification settings.
This commit adds UI for realm-level defaults of user notification
settings. We do not have "Send test notification" option here.
2021-09-16 15:46:41 -07:00
Sahil Batra ed71b3211a puppeteer: Specify container for notification settings tests.
We will add realm-level defaults of notification settings in
further commits which will result in two elements with same
class. So, this commit specifies container element id along
with the class of setting element to make sure that we wait
for the correct element.
2021-09-16 15:46:41 -07:00
Sahil Batra 8b9b0638c6 settings_config: Pass settings object as parameter to all_notifications.
We pass user_settings object to all_notifications and
get_notifications_table_row_data such that we can use these
functions for realm-level settings also.
2021-09-16 15:46:41 -07:00
Sahil Batra de1aa25059 notifications: Refactor update_notification_sound_source.
The container element and settings object are passed as
parameters to update_notification_sound_source. This change
is done so that we can use the same function for updating
the realm-level notification sound source.
2021-09-16 15:46:41 -07:00
Sahil Batra 079e45c7cf settings: Use variable for notification sound element.
This commit changes the click handler for playing
notification sound to use a variable instead of
directly using the element id such that we can
use the same code for realm-level settings also
by just setting the variable accordingly.
2021-09-16 15:46:41 -07:00
Sahil Batra 1252d1602b settings: Refactor notification settings frontend code.
This commit creates a new module user_notification_settings.js
for user-level notification settings and the settings_notification.js
will be used as a common module for both user-level and realm-level
settings.
We also add parameters to the functions in settings_notifications.js
to pass container elem and settings object for the same purpose.
2021-09-16 15:46:41 -07:00
Sahil Batra 791d09ccd0 settings: Use form element in handler for notification settings.
Notification settings uses '.on("change", "input, select")' to
handle changes to all types of input elements. But for realm-level
settings page, both display and notification settings have the
same container unlike the user-level settings, so we use inner
form element ".notification-settings-form" such that this handler
is for changing input of notification settings and not display
settings.
2021-09-16 15:46:41 -07:00
Sahil Batra 9551551b00 settings: Use settings_object variable instead of user_settings.
We set settings_object variable to user_settings object and then
use settings_object everywhere. This change will help us in using
the same code for realm-level settings also by setting the
appropriate value for settings_object.
2021-09-16 15:46:41 -07:00
Sahil Batra ebab2a89fb settings: Refactor change_notification_setting to have url parameter.
We refactor the change_notification_setting function to have a url
parameter instead of directly using "/json/settings" directly.

This change will help us in using the same code for realm-level
settings also.
2021-09-16 15:46:41 -07:00
Sahil Batra 44c820da3a settings: Fix live update code of notification settings.
We add code for live updating notification batching period
setting. This commit also adds 'continue' statement in the
else-if condition of update_page function such that we do
not execute the code of checkbox settings for notification
sound and email batching period settings.

We also update the other_notification_settings list in
settings_config.ts to remove email_notifications_batching_period
and instead have email_notifications_batching_period_seconds
which is the correct name of setting used in backend and in
the events sent to the clients such that the live-update is
done correctly.
2021-09-16 15:46:41 -07:00
Sahil Batra 90e4740455 settings: Use class instead of id for email batching period setting.
This commit removes the id from email notification batching period
setting dropdown and adds class such that we can use same template
for the realm-level settings as well. We also add 'setting_'
prefix as we do for other settings and modify the JS code accordingly.
2021-09-16 15:46:41 -07:00
Sahil Batra 67d534869c settings: Use container variable for accessing top-level element.
This change was missed in 032d347b4f.
2021-09-16 15:46:40 -07:00
Sahil Batra 1b530e74d2 settings: Disable realm-level defaults of user settings for non-admins. 2021-09-16 15:46:40 -07:00
Tim Abbott bf2071852b help: Fix heading for browsing muted topics.
The previous heading was one size too small, and thus was easily
missed when visually skimming for the information.

Additionally, give it a more natural label.
2021-09-16 15:40:37 -07:00
Alya Abbott 45b7ffb06b user docs: Add a guide on Using Zulip for a class. 2021-09-16 13:36:44 -07:00
Mateusz Mandera 8ad7520180 ldap: Support alternative attrs to userAccountControl.
Fixes #17456.

The main tricky part has to do with what values the attribute should
have. LDAP defines a Boolean as
Boolean = "TRUE" / "FALSE"
so ideally we'd always see exactly those values. However,
although the issue is now marked as resolved, the discussion in
https://pagure.io/freeipa/issue/1259 shows how this may not always be
respected - meaning it makes sense for us to be more liberal in
interpreting these values.
2021-09-16 13:29:13 -07:00
Mateusz Mandera b32450f98e docs: Remove mentions of some ldap features being added in 2.0.
2.0 is old enough that explicitly mentioning when these features were
implemented isn't particularly useful and adds clutter.
2021-09-16 13:29:13 -07:00
Tim Abbott 0ff3bbd35c i18n: Update translation data from Transifex. 2021-09-16 13:18:19 -07:00
Tim Abbott 687c4b9d66 css: Improve EDITED styling for non-English languages.
In some non-English languages, including Russian, the translation of
EDITED does not properly fit.  The best solution is probably something
bigger or having translators abbreviate this string, but it's worth at
least this minimal change to fix extremely ugly overlap behavior for
this widget.

Actual CSS written by Greg Price.
2021-09-16 13:18:19 -07:00
Sahil Batra 3242a61894 user_groups: Hide system user groups from UI.
We do not have any system user groups as of
now, but this commit is just a prep commit
to prevent any change in user-facing pages
to avoid confusion till this feature is
completed.

This change was initially made in 6117c38,
but it was reverted in 1543775a due to merge
conflicts with the typescript migration of
user_groups.js.
2021-09-16 13:11:03 -07:00
Alya Abbott 310b8736af user docs: Add a bunch of "getting started" content. 2021-09-16 11:41:43 -07:00
Tim Abbott 1b760d9fb5 compose: Clarify subscribe-other-user button label.
This change was inspired by the problem of translators needing to
translate "Subscribe" to languages that use different forms depending
on the identity of the noun being subscribed.  In most places in the
app, a button with that as the entire label should be translated in
the "subscribe myself" form; but in this one it should be "subscribe
someone else".

Thinking about this, the current label is a bit misleading in English
for someone who ignores the error message text and just reads the
button, so the best fix is to just change the string, which of course
also makes things unambiguous for translators as well.
2021-09-16 11:09:53 -07:00
Gilbert Bishop-White 28932ba8ee test_signup: Refactor test_signup_without_full_name to use verify_signup.
The test now uses submit_reg_form_for_user, meaning a blank
full_name is posted to /accounts/register/ rather than the
parameter being excluded.

Fixes part of #7564
2021-09-16 10:51:01 -07:00
Gilbert Bishop-White 330d1385d9 test_signup: Refactor test_signup_without_password to use verify_signup.
I had to pass stop_after_reg_form=True, as the call to get_user in
verify_signup fails. I am not sure whether this is the expected
behavior. Also this causes the test to use submit_reg_form_for_user,
meaning a blank password is posted to /accounts/register/ rather than
no password.

Fixes part of #7564
2021-09-16 10:51:01 -07:00
Gilbert Bishop-White a632fc0e10 test_signup: Refactor test_signup_invalid_name to use verify_signup.
Extend `signup` helper function to enable it's use, and add additional
checks from  `test_signup_invalid_name`

Fixes part of #7564
2021-09-16 10:51:01 -07:00
Mateusz Mandera 63162210c1 test_signup: Fix the fetching of UserProfile in verify_signup.
get_user_by_delivery_email should be used, given that the email variable
is the realm email address that the account is being created with, not
the .email field which can be a dummy address based on org settings.
2021-09-16 10:51:01 -07:00
Mateusz Mandera 99ade3f535 test_signup: Fix asserted redirect Location in verify_signup.
The expected Location should depend on the realm.
2021-09-16 10:51:01 -07:00
Mateusz Mandera 05fe62c96c docs: Adjust phrasing of "From your desktop, click on the gear...".
We actually mean the main Zulip UI here, so "from your desktop" sounds
potentially misleading; reodering the phrasing makes the meaning
unambiguous.
2021-09-16 10:47:56 -07:00
Alya Abbott 9df8fbde48 user docs: Document message notification email custom batching.
Also adjust the label slightly for better readability.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2021-09-15 17:39:51 -07:00
Vishnu KS 8729e658b7 templates: Deduplicate the pricing model. 2021-09-15 17:38:50 -07:00
Vishnu KS 392b2900cf plans: Redirect to /upgrade when clicked on buy standard from root.
Currently we used to redirect to /new when the user click on buy
standard from the root domain. Instead we redirect to /upgrade page.
The /upgrade page redirect would ask user to enter the subdomain
of their organization and would then redirect them to /upgrade
page of their organization.
2021-09-15 17:38:50 -07:00
Priyank Patel 397821660f ts: Convert sub_store module to TypeScript.
We also upgrade @babel/preset-typescript to the latest version to
get support for constant enums.
2021-09-15 17:19:39 -07:00
Priyank Patel 0d91472c64 ts: Convert timerender module to TypeScript. 2021-09-15 17:19:39 -07:00
Tim Abbott 1543775ac6 user_groups: Temporarily remove is_system_group check.
This effectively reverts 6117c3824a,
which merge conflicted with the typescript migration on this file, and
this commit is easier to undo.
2021-09-15 17:19:21 -07:00
Priyank Patel 9de3b2f4fd ts: Convert user_groups module to TypeScript. 2021-09-15 16:53:17 -07:00
Priyank Patel 3e6141d03f user_groups: Remove suppress_errors support for get_user_group_from_id. 2021-09-15 16:52:35 -07:00
evykassirer 251436f835 stream settings: Add whitespace before disabled attribute.
Fixes #19641. There was no whitespace between the 'checked' and 'disabled'
attribute, leading to muted checked checkboxes being neither checked nor
disabled (since `checkeddisabled='disabled'` didn't do anything).
This bug was introduced in 747e797.

This change adds a new line before the disabled template code, so that both
the checked and disabled attributes are added properly.

Tested manually to ensure the following cases didn't change when reopening
the stream settings view:

* unchecked disabled checkboxes
* checked enabled checkboxes
* checked disabled checkboxes
2021-09-15 12:29:46 -07:00
Tim Abbott 9c623a1b3e settings: Add periods to end of bot permissions strings.
This improves consistency with how all of our other settings tip
elements are written.
2021-09-15 09:59:20 -07:00
Sahil Batra 06f46cc146 settings: Add live update code for realm-level defaults settings.
This commit adds code for live-updating the realm-level default
settings page which contains only display settings as of now.

This commit also adds realm_user_settings_defaults object to
zpage_params so that we can write the tests.
2021-09-15 09:56:33 -07:00
Sahil Batra 96d6bf28db settings: Add UI for realm-level defaults of display settings.
This commit adds a new module settings_defaults.js which calls
the functions in settings_display passing appropriate container
element and settings object as parameters.
We also add one more parameter for_realm_settings to some of the
functions in settings_dislay to differentiate between the user
and realm-level settings.
2021-09-15 09:56:32 -07:00
Sahil Batra a440c93030 settings: Add realm_user_settings_defaults module. 2021-09-15 09:50:31 -07:00
Sahil Batra 6bae097bf1 settings: Refactor settings_display.js code.
This commit refactors the code in settings_display.js
by modifying the functions to receive the container
element and settings object as parameter such that
we can use the same functions for realm-level
settings by passing appropriate container element
and settings object.

This change is needed as settings_display will be
used as a common module for user settings and realm
level settings.

We also rename the default_language_name variable in
settings_display to user_default_language_name as we
would add a separate variable for realm-level setting
in future.
2021-09-15 09:50:31 -07:00
Sahil Batra e127cde3c1 settings: Make separate object for display settings labels.
This object will also be used for labels of realm-level
default of display settings.
2021-09-15 09:50:31 -07:00
Tim Abbott 39c897a2b0 help: Rename about-streams-and-topics to streams-and-topics.
This better matches the title of the page and more generally our
conventions around naming /help/ articles.  We include a redirect
because this is referenced from Welcome Bot messages, and we
definitely don't want those links to break.
2021-09-15 09:48:36 -07:00
Sahil Batra 6e169be933 settings: Fix the sticky behavior of saving indicator.
We want the saving indicator to be sticky in the cases
where we ask user to reload after changing settings.
This used to work correctly before 9e08c6db93, as
'if(remove_after)' returned false if remove_after was
null, but the condition was changed in 9e08c6db93
to 'if(remove_after !== undefined)' and thus the
condition returned true when remove_after was null.
This commit change the remove_after value to undefined
for sticky cases.
2021-09-15 09:47:08 -07:00