Commit Graph

42973 Commits

Author SHA1 Message Date
Vishnu KS f55dbe33bb billing: Create is_realm_on_free_trial helper function. 2021-06-14 16:49:53 -07:00
Vishnu KS 06b5f9feae billing: Create is_free_trial function in CustomerPlan model. 2021-06-14 16:49:53 -07:00
Vishnu KS 44d8368003 plans: Don't hardcode plan_type values in template. 2021-06-14 16:49:53 -07:00
Signior-X c1833b74f0 login: Remove browser show password in IE, edge.
The Microsoft browsers such as IE and Edge has their own
show password that is a bit bugy and also conflicts with
the show password in Zulip that was added in #17305.
This fixes the issue by making the display none for the
ms-reveal that comes in the input.

More details can be found at
https://chat.zulip.org/#narrow/stream/101-design/topic/Show.20password/near/1173890
2021-06-14 16:35:25 -07:00
sahil839 aa5d2199b1 invite: Use handlebar template for invite-user overlay.
Fixes a part of #18794.
2021-06-14 13:46:57 -07:00
Ganesh Pawar f5f5943ee0 lightbox_overlay: Migrate to handlebars. 2021-06-14 13:41:36 -07:00
akshatdalton c507931ac8 refactor: Export non-markdown logic in mention.py. 2021-06-14 13:26:30 -07:00
Anders Kaseorg a9320accdc zjsunit: Remove unnecessary Handlebars wrapper function.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-14 12:20:56 -07:00
Steve Howell 398cdbd922 zjsunit: Remove stub_templates helper.
We now use mock_template everywhere.
2021-06-14 12:05:10 -04:00
Steve Howell 1e58e145ab node tests: Use mock_template in stream_list. 2021-06-14 12:05:10 -04:00
Steve Howell 1991218f6c node tests: Use mock_template in rendered_markdown. 2021-06-14 12:05:10 -04:00
Steve Howell 75f196b932 node tests: Use mock_template in recent_topics. 2021-06-14 12:05:10 -04:00
Steve Howell 107c0d480a zjsunit: Improve errors for non-invoked templates. 2021-06-14 12:05:10 -04:00
Abhijeet Prasad Bodas 5a36496ce5 node tests: Use mock_template in typeahead_helper. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 3c2dbf1537 node tests: Use mock_template in subs. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 9f857e5fc5 node tests: Use mock_template in stream_edit. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 1586907371 node tests: Use mock_template in settings_user_groups. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas de6988b16d node tests: Use mock_template in settings_profile_fields. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 30023d4b76 node tests: Use mock_template in settings_org. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 9e324c0338 node tests: Use mock_template in popovers. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 8a214c9d63 node tests: Use mock_template in drafts. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 177eafb72b node tests: Use mock_template in compose_video. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas b564d5c2f1 node tests: Use mock_template in compose_validate. 2021-06-14 09:17:50 -04:00
Abhijeet Prasad Bodas 09f8a8ec2b zjsunit: Clear require cache also for templates.
This is necessary for the new `mock_template` helper added in
97ad6b6b62 to work correctly without
leaks, since it uses `mock_cjs` under the hood.

This logic was added in 216493aae8.
2021-06-14 09:17:50 -04:00
Alex Vandiver dd90083ed7 puppet: Provide FQDN of self as URI, so the certificate validates.
Failure to do this results in:
```
psql: error: failed to connect to `host=localhost user=zulip database=zulip`: failed to write startup message (x509: certificate is valid for [redacted], not localhost)
```
2021-06-14 00:14:48 -07:00
Anders Kaseorg a9f6764d8c eslint: Add eslint-plugin-formatjs.
This guards against various mistakes, such as setting defaultMessage
to a computed expression that can’t be extracted.

https://formatjs.io/docs/tooling/linter/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-13 22:32:40 -07:00
Dinesh cde8d095bb tippyjs: Fix blueslip error on popover add emoji reaction hover.
This tippyjs event listener was active on 'add emoji reaction'
option in sender's popover menu of a message but it was only
intended for the add reaction button in message reactions bar
at bottom of a message.

Both of those having common selector `.reaction_button` caused
errors in tippyjs near `observer.observe` having wrong args.

Edited the css selector to be more specific to only target
add reaction button in reactions row of message.

This was introduced in 99e6f25.
2021-06-13 22:31:57 -07:00
Steve Howell 103c4c3995 zjquery: Split out zjquery_element.js.
The new file is an easier place to point developers
for the most typical questions about zjquery's
capabilities.
2021-06-12 12:21:44 -04:00
m-e-l-u-h-a-n 82394308fd stream-settings: Use util.strcmp instead of localeCompare for sorting. 2021-06-12 08:16:19 -07:00
m-e-l-u-h-a-n dfd37e797f invite.js: Use util.strcmp instead of localeCompare for sorting. 2021-06-12 08:16:19 -07:00
m-e-l-u-h-a-n 712e32805e todo_widget: Use util.strcmp instead of localeCompare for sorting. 2021-06-12 08:16:19 -07:00
m-e-l-u-h-a-n 59143c1d4d stream-edit: Use util.strcmp instead of localeCompare for sorting. 2021-06-12 08:16:19 -07:00
m-e-l-u-h-a-n f1d7971a7f popovers: Use util.strcmp instead of localeCompare for sorting. 2021-06-12 08:16:19 -07:00
m-e-l-u-h-a-n f76e904154 minor: Add complete tests for pill_typeahead.
Functions for input pill typeahead in pill_typeahead.js
were dependent on other modules for testing, and most of
those only tested the part required to ensure coverage.

As part of changes done to pill_typeahead for code clarity we
split its functions logic to clearly handle three types of
pills instead of hacky checks. So to completely test the logic
for various possible combinations of types, we add separate tests
for these functions.
2021-06-12 07:59:43 -07:00
m-e-l-u-h-a-n 5ad850f1ff minor: Refactor pill_typeahead.js to use include_users check.
Functions in pill_typeahead.js assumed the type of required pills
to be user by default. But this created several readability
issues with its code, as a result, this codebase appeared
hard to change because of hacky checks involved due to this
assumption.

To improve these we use `include_users` check wherever possible
and simplify the code to clarify the logic involved in typeahead
functions in this module.

Also updated existing stream_edit tests to adjust them with changed
code.
2021-06-12 07:59:43 -07:00
m-e-l-u-h-a-n edeb1bf53b minor: Fix return value and redundant variables in pill_typeahead. 2021-06-12 07:59:43 -07:00
akshatdalton 1a76d06add test_push_notifications: Use responses module to mock HTTP responses. 2021-06-12 07:31:12 -07:00
Riken Shah efbde2ad01 provision: Use the `clean_unused_caches.main` function.
We currently have created a copy of the
`clean_unused_caches.main` function in
`provision_inner.py` to clean the unused caches. But as
we have now converted the script into a python file we
can directly call that function.

This commit replaces that function (introduced in adc0ed4206) with
`clean_unused_caches.main`.
2021-06-12 07:28:16 -07:00
Riken Shah c5580607a7 purge-old-deployments: Use the `clean_unused_caches.main` function.
We currently run the `clean_unused_caches.py` as a
script to clean the unused caches.

This commit replaces that with
`clean_unused_caches.main` function as it would be
faster.
2021-06-12 07:28:16 -07:00
Riken Shah 45af71e33b clean_unused_caches: Allow the main function to accept `Namespace` args.
This commit will allow us to pass the arguments in the
'clean...' functions when calling the `main` function (in
`provision`). It also changes args parsing
function location to `if __name__ == "__main__"` block as
we wouldn't need it to parse args when we call the
function.
2021-06-12 07:28:16 -07:00
Riken Shah 4f54e15993 refactor: Convert `clean-unused-caches` to`clean_unused_caches.py`.
We convert the `clean-unused-caches` script to a
python file so we can run it in provision by importing it
instead of running the script, hence saving some time.
2021-06-12 07:28:16 -07:00
Riken Shah 405073d590 puppeteer: Fix the selector for opening the message action menu.
In this 90041ff453,
we remove the `info` class from the message action
menu, that's why it was failing.

This commit replaces it with the correct selector.
2021-06-12 09:00:57 -04:00
Tim Abbott c18ef0b93f puppeteer: Stop using .info class to find element.
In 90041ff453, I failed to consider the
possibility we would be relying on this badly named element directly
in tests.
2021-06-11 18:08:36 -07:00
Mateusz Mandera b1da5d9d76 ldap: Prevent creation of users with malformed email value. 2021-06-11 17:30:46 -07:00
Mateusz Mandera 18dab5619c ldap: Fix ldap access control tests.
These tests didn't configure ldap settings correctly and as a result,
the user involved in these tests wasn't actually hamlet@zulip.com, but a
new, malformed user with email "hamlet" that was being created by the
ldap auto-registration codepath. This wasn't caught because the codepath
didn't validate the email address and thus created such a malformed user
silently.
2021-06-11 17:30:46 -07:00
Tim Abbott 8181a2fe57 css: Remove unnecessary font sizes in stream settings. 2021-06-11 17:15:46 -07:00
Tim Abbott 95efadaf86 css: Use default font size for buttons and dropdowns. 2021-06-11 17:15:45 -07:00
Tim Abbott 7291f2c1ca css: Avoid hardcoding font size in input pills.
This also fixes horizontal alignment issues when scaling.
2021-06-11 16:59:35 -07:00
Tim Abbott 6a7d4d96c5 settings: Fix size of dropdown_list_widget elements.
We remove the small CSS class, which set the font size as something
tiny, and also restructure it with a fixed height and more natural
markup for the reset link.
2021-06-11 16:58:52 -07:00
Tim Abbott 579a9d60e9 css: Remove 15px font usage in full profile.
Together, these larger font size declarations made the modal look
worse, in addition to just being inconsistent with the rest of the
app.
2021-06-11 16:03:39 -07:00