Commit Graph

4393 Commits

Author SHA1 Message Date
m-e-l-u-h-a-n 70aa957e55 stream settings: Move stream list templates to stream_settings.
We move templates related to listing streams in left pannel of
stream settings overlay to stream_settings folder by making
following changes:

* Rename `subscriptions.hbs` to `browse_streams_list.hbs`.
* Move `settings_stream_list.hbs` to stream_settings folder.
* Rename `subscription.hbs` to `browse_streams_list_item.hbs`.
* Move `settings_stream_list_item.hbs` to stream_settings folder.
2021-07-19 10:54:11 -07:00
Tim Abbott a83a15b754 Revert "update-prod-static: Call django.setup during initialization."
This reverts commit b6c678cbc4.
2021-07-18 21:29:28 -07:00
Tim Abbott b6c678cbc4 update-prod-static: Call django.setup during initialization. 2021-07-18 21:18:55 -07:00
Tim Abbott d7ef0c7232 billing: Fix options and help text for sponsorship requests.
This makes several changes:

* Fixes a bug where the help text explaining our policies was not displayed.
* No help text was defined for many organization types.
* Copy-edits the help text somewhat.
* Offers all of the organization type options.
* Removes the 100% coverage requirement because it's annoying to test
  the e.currentTarget click handler.
2021-07-18 20:48:27 -07:00
Alya Abbott 844c62c64e portico: Create new "Zulip for communities" page. 2021-07-18 12:10:33 -07:00
Anders Kaseorg 0940f29a68 test_script: Fix path computation in find_js_test_files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-18 11:33:50 -07:00
Anders Kaseorg bcc89c80a2 ci: Remove unused detritus from Docker images.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-14 22:45:38 -07:00
sahil839 fd55df9f7c settings: Use dialog_widget for bot-edit form and remove edit_fields_modal.
This commit changes the bot-edit modal to use dialog_widget instead of
edit_fields_modal.

This commit also removes edit_fields_modal module as it is no longer used.
2021-07-14 13:02:26 -07:00
sahil839 ec3c5547ff frontend: Add dialog_widget module and refactor confirm_dialog.
This commit adds a new dialog_widget.js file containing most
of the code of confirm_dialog.js with some minor changes and
changes confirm_dialog to be a wrapper around dialog_widget.js.
We pass 'is_confim_dialog' as true in dialog_widget for a
confirm_dialog modal. This commit also renames confirm_dialog.hbs
and confirm_dialog_heading.hbs to dialog_widget.js,
dialog_widget.hbs and dialog_widget_heading.hbs respectively.
2021-07-14 12:58:00 -07:00
Anders Kaseorg db476bdc51 ci: Use apt-get -y in production-upgrade test.
We currently configure ‘APT::Get::Assume-Yes’ in our custom Docker
image, but this is the only place we rely on it (outside of the
Dockerfile itself), and it’s better not to.

Also ‘apt-get remove && apt-get purge’ is the same as just ‘apt-get
purge’.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-13 18:57:34 -07:00
Anders Kaseorg 47897c76a2 scripts: Use curl -f (--fail).
This makes curl exit with nonzero status on HTTP 4xx/5xx errors.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-13 16:47:49 -07:00
akshatdalton 2e4a333133 custom_check: Detect incorrect use of `assertTrue`.
This commit adds a check to avoid the use of assertTrue
for cases like: assertTrue(len(data) == 2).
We should use assert_length, assertGreater, or
assertGreaterEqual, whatever suits, in cases like these.
2021-07-13 13:03:38 -07:00
Christalee 69a31602ef
emoji: Correct spelling of 'judiasm' -> 'judaism'. 2021-07-13 08:35:29 -07:00
Anders Kaseorg 9fec1fb16d lint: Check *.pyi stubs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-11 09:20:19 -07:00
Anders Kaseorg 93f62b999e nagios: Replace check_website_response with standard check_http plugin.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-09 16:47:03 -07:00
Priyank Patel 519e8471c9 ts: Convert upload_widget to TypeScript. 2021-07-09 12:42:31 -07:00
Priyank Patel 261df2b4dc js: Rename muting_ui module to muted_topics_ui. 2021-07-09 10:00:45 -07:00
Priyank Patel 05c3164bb8 js: Split out muted_users_ui from muting_ui module. 2021-07-09 10:00:45 -07:00
m-e-l-u-h-a-n 781179c56a subs: Rename subs.js to stream_settings_ui.js.
We use subs as a common variable name for a collection of stream
data structure used in settings, in lot of modules. So this
rename clears a bunch of related shadowed variables.
2021-07-09 09:38:58 -07:00
Anders Kaseorg d4c8b01530 test_script: Use alphabetically first matches in find_js_test_files.
Otherwise the behavior depends on the filesystem order.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-07 15:14:00 -07:00
Tim Abbott 5872af340f templates: Rename home.html to message_feed_errors.html.
This much more clearly expresses the purpose of the remaining content
in this page.
2021-07-07 09:47:39 -07:00
aryanshridhar c6828767fa navbar: Migrate to handlebars.
This commit migrates the `navbar.html` Django template
to handlebars by creating a new file as `navbar.hbs`
within `/static/templates` which is then rendered
using `ui_init` module.

As a part of migration, we also remove the `search_pills_enabled`
and `embedded` parameters from the context attribute as they
are no longer needed now.

Fixes part of #18792.
2021-07-06 16:46:50 -07:00
PIG208 8b9011dff8 json_error: Completely remove json_error.
This completes the migration from `return json_error` to
`raise JsonableError`.
2021-07-06 15:34:33 -07:00
Eeshan Garg ef6582edb8 readthedocs: Add proper backlink to the Zulip homepage.
Now that we are starting to link this pages from the landing page's
top navigation, it makes sense to have proper backlinks to the
homepage so that there is some continuity when the user clicks on
a link that takes them to a ReadTheDocs page from the main website.
2021-07-06 10:59:59 -07:00
Priyam Seth 57340a888c compose: Extract "compose_validate.js".
This commit first moves the compose.validate() function out
with the functions that are needed by it. Then one by one
checked for which function is now not needed in compose.js.

This moves all validation related functions out of "compose.js"
to "compose_validate.js".

Splitting compose announce variables out of compose.js.

This commit moves the "user_acknowledged_all_everyone" and
"user_acknowledged_announce" out of compose.js to reduce
cyclic dependency of compose_validate on compose.js.

Moving wildcard mentions to compose_validate.

The wildcard mention settings are mostly used while validating.
Also to reduce the cyclic dependence of compose in
compose_validate, the related wildcard mentions are moved out to
compose_vaidate.js.

This also converts reset_acknowledged functions to set values
by passing values.
2021-07-05 19:21:56 -07:00
Priyank Patel 3f0110d9c0 ts: Convert ui_util module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel 4fa4309338 ts: Convert loading module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel a8cdc968cc ts: Convert csrf module to TypeScript. 2021-07-05 17:04:06 -07:00
Priyank Patel 35738e148b ts: Convert padded_widget module to TypeScript. 2021-07-05 17:04:06 -07:00
Anders Kaseorg 0ae94c6051 mypy: Move configuration to pyproject.toml.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-05 17:01:32 -07:00
Anders Kaseorg ee8724e436 docs: Correct Big Blue Button to BigBlueButton.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-05 16:59:00 -07:00
Anders Kaseorg 99533b4aa2 js: Fix, and check for, non-ES5 syntax in webpack bundles.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-05 13:32:37 -07:00
Anders Kaseorg 684dad8145 tools: Use root-based absolute import for tools.lib, etc.
Mypy can’t follow absolute imports based on directories other than the
root.  This was hiding some type errors due to ignore_missing_imports.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-05 12:21:52 -07:00
akshatdalton 3da6f3c0af lint: Exclude `zerver/views/development/` from i18n lint rules.
This is consistent with how we handle JsonableError and friends; it
doesn't make sense for translators to spend time on strings only
visible in a development environment.
2021-07-01 14:56:53 -07:00
Anders Kaseorg 06033545eb bootstrap-awscli: Remove executable bit.
Even though this looks like an independently runnable script, it
should not be run independently: a SHA-256 mismatch will fail to stop
the script, unless it was sourced from another script that has ‘set
-e’.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-28 17:13:57 -04:00
aryanshridhar 942f4372f0 info_overlay: Render keyboard shortcuts using info_overlay.
This commits ports the `keyboard_shortcuts.html` file from
using the Django template to handlebars, essentially creating
a new file as `keyboard_shortcuts.hbs` within /static/templates
which is then rendered using info_overlays.js.

Fixes part of #18792.
2021-06-27 18:29:52 -07:00
Anders Kaseorg 0ba9114c22 install-yarn: Rewrite Yarn installer.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-27 16:58:17 -07:00
Anders Kaseorg 91bfebca7d install: Replace wget with curl.
curl uses Happy Eyeballs to avoid long timeouts on systems with broken
IPv6.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-25 09:05:07 -07:00
Anders Kaseorg d428c0e0dd lint: Add .bash extension for tools/lib/git-tools.bash.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-25 09:01:13 -07:00
sahil839 36560da0f0 modals: Add edit_fields_modal.js and edit_field_modals.hbs.
We create a new widget edit_fields_modal such that this common
framework can be used in bot-edit modal, linkifier-edit modal
and user-edit modal, which have very similar implementations.

The "edit-fields-modal-status" is used only for edit-linkifier
modal and remains empty for others, so this change does not
cause problems with other modals.
2021-06-24 16:55:22 -07:00
Anders Kaseorg 16067bc4fc ci: Remove superfluous generate-dockerfiles template system.
Dockerfiles already support variables.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-24 15:34:11 -07:00
Anders Kaseorg 3b60b25446 ci: Remove bullseye hack.
base-files 11.1 marked bullseye as Debian 11 in /etc/os-release.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-24 14:35:51 -07:00
Anders Kaseorg bf361e9951 ci: Remove uses of VERSION_CODENAME.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-24 14:35:51 -07:00
m-e-l-u-h-a-n 777f784e07 popovers: Extract user_profile_modal functions in separate module.
We had a lot of functions and click handlers that were only
involved with user profile modal and were not related to
popovers logic in any way. So we extract these functions
into a separate module `user_profile.js`.
2021-06-23 17:43:08 -07:00
Priyank Patel 043b0c6ef3 ts: Convert spoilers module to TypeScript. 2021-06-22 09:14:09 -07:00
Priyank Patel d660f512fa ts: Convert list_util module to TypeScript. 2021-06-22 09:14:09 -07:00
Priyank Patel 6ed635b5ed ts: Convert night_mode module to TypeScript. 2021-06-22 09:14:09 -07:00
Priyank Patel 31abcaafb8 ts: Convert ready module to TypeScript. 2021-06-22 09:14:09 -07:00
Priyank Patel c862c673af ts: Convert blueslip module to TypeScript.
We turn off the eslint no-use-before-define for TypeScript files
because it does not work correctly for types. There is already
a typescript-eslint version of it that is enabled for TS.

We also update the error handler on window to use instanceof check
for ErrorEvent instead of checking the error property.
2021-06-22 09:09:36 -07:00
Priyank Patel f7235912ff ts: Convert ui_report module to TypeScript. 2021-06-22 09:09:36 -07:00