Commit Graph

44243 Commits

Author SHA1 Message Date
Riken Shah 8210daefc8 user status: Fix custom emoji not loading during page load.
The reason for this was we were not loading extra
parameters while storing the status emoji object.

For this we also need the emoji module to be initialized
early because the right sidebar would need it to display
the status emoji.
2021-08-02 13:38:51 -07:00
Riken Shah a6bef51541 set_user_status: Fix the alignment of the selected emoji widget.
This was previously hackily centered; we now center it properly.
2021-08-02 13:38:38 -07:00
Aman Agrawal eafada851b emails: Make footer fish more dark purple color. 2021-08-02 13:15:02 -07:00
rht 1bbd36d181 slack_import: Remove obsolete SlackImportAttachment placeholder.
This was introduced in f4ad464d82, and
incompletely removed in e037c2f93e649c28a71c02559b5ae7a3333f42a8; here
we finish removing it.
2021-08-02 13:13:28 -07:00
rht 9441bca282 import_realm: Explain the usage of the relative_path var of attachment_path. 2021-08-02 13:13:19 -07:00
Tim Abbott 24b1439e93 email_notifications: Avoid trying to email to bot users.
This fixes a regression in de04f0ad67.

We'll do a proper test in a follow-up commit; this is a quick fix to
make sure master works.

The emails will bounce, but it'll create all sorts of infrastructure
headaches.
2021-08-02 13:13:01 -07:00
Sahil Batra 93b51088c0 api: Fix "Changes" entry for enter_sends in zulip.yaml.
This commit fixes the feature level for enter_sends in
`/regiser` response and also modifies the "Changes"
entry to match with other settings.
2021-08-02 09:23:56 -07:00
Sahil Batra c3f31bd507 api: Fix feature level for zulip_merge_base in zulip.yaml. 2021-08-02 09:23:56 -07:00
Riken Shah 49193231aa puppeteer_test: Improve how we select the typeahead element.
Our typeahead system is very sensitive, a simple internal
focus can hide it. This leads to occasional failure on the
puppeteer test.

This commit tries to solve it by clicking via javascript
instead of manual puppeteer click.
2021-08-01 23:20:13 -07:00
Riken Shah 6c6b6643ce typeahead: Fix the bug where clicking by JS, selected the wrong elem.
The issue was with the typeahead `click` event where it
didn't activate the current target and called the `select`
method, which selected the element which was last
focused.

This was debugged by Anders Kaseorg.
2021-08-01 23:20:12 -07:00
Tim Abbott d1dd34d7e0 send_custom_email: Add option for sending marketing emails. 2021-08-01 21:45:34 -07:00
Tim Abbott f452e176da emails: Improve styling for headings.
We don't currently use headings in our emails, which is why the
previous CSS was able to be super weird.
2021-08-01 21:27:42 -07:00
Aman Agrawal c1c6674809 emails: Retheme to purple colors to match present logo. 2021-08-01 21:27:42 -07:00
Tim Abbott 65d60f4a25 api docs: Improve documentation for user_settings transition. 2021-08-01 15:30:40 -07:00
Tim Abbott 8755a76cf6 user_settings: Add types for all managed settings. 2021-08-01 15:30:17 -07:00
Sahil Batra 998d710275 frontend: Add new user_settings module for user's settings.
We add a new user_settings module similar to page_params
module in frontend and use it to access user's personal
settings instead of page_params.
2021-08-01 15:30:17 -07:00
Sahil Batra ea44b6bcc1 events: Use user_settings event in frontend live-update code.
We now use the newly added "user_settings" event in the frontend
code instead of previous "update_global_notifications" and
"update_display_settings" events which are now depreceated.
2021-08-01 15:30:17 -07:00
Sahil Batra e6f828a8e2 register: Send user_settings in response based on client capabilities.
We added "user_settings" object containing all the user settings in
previous commit. This commit modifies the code to send the existing
setting fields in the top-level object only if user_settings_object
client_capabilities field is False.
2021-08-01 15:30:17 -07:00
Sahil Batra 84742a040e api: Add "user_settings" object to '/register' response.
We add a "user_settings" object, containing all the user
settings, in the '/register' endpoint response for
better readability.
2021-08-01 15:30:17 -07:00
Sahil Batra 0364d0c8ca events: Add "user_settings_object" to client_capabilities.
This commit adds "user_settings_object" field to
client_capabilities which will be used to determine
if the client needs 'update_display_settings' and
'update_global_notifications' event.
2021-08-01 15:30:17 -07:00
Sahil Batra 7959ae3fab events: Add new event type 'user_settings' for updating user settings.
We send a event with type 'user_settings' on updating user's display
and notification settings.

The old event types - 'update_global_notifications' and
'update_display_settings', are still supported for backwards
compatibility.
2021-08-01 15:30:17 -07:00
Sahil Batra e73d2fff97 tests: Remove separate event tests for "enable_drafts_synchronization".
We do not require separate tests for checking events when changing
"enable_drafts_synchronization" as we already do this in the display
settings test because this setting is included in property_types.
2021-08-01 15:30:17 -07:00
Anders Kaseorg aeb0dc7269 video_calls: Support separate testing credentials for Zoom.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-08-01 14:26:46 -07:00
Tim Abbott f84703bc48 test-backend: Default to running all tests.
This switches the default of the previous --nonfatal-errors option,
and also moves to use the `-x | --stop` names used by the nose test
framework.
2021-07-30 16:18:42 -07:00
Tim Abbott aa651f75c1 ci: Adjust when production suite is run.
We make a few adjustments:
* We now run full CI whenever pushing to master. It's cheap enough
  that it's worth getting accurate signal.
* We now don't run production tests on PRs for changes to JavaScript/CSS
  in static/ that don't also affect the webpack configuration.
* We sort the list of paths that trigger tests.
2021-07-30 15:32:23 -07:00
Alya Abbott 8fdc662b20 portico: Clean up /for/open-source.
- Remove essay portion and link to /for/communities instead.
- Copy over relevant quotes from /for/communities.
- Move "Join the hundreds of open-source projects we sponsor."
2021-07-30 12:30:38 -07:00
Gaurav Pandey d89b4dcd0b api: Return zulip_merge_base alongside zulip_version.
Return zulip_merge_base alongside zulip_version
in `/register`, `/event` and `/server_settings`
endpoint so that the value can be used by other
clients.
2021-07-30 12:03:41 -07:00
Hemanth V. Alluri 6a3e98d14b drafts: Add API documentation for the core drafts endpoints.
These were added at some point in the past, but were not complete, and
it makes sense to document the current feature level as and when they
become available, since clients should not use the drafts endpoints on
older feature levels.
2021-07-30 10:41:52 -07:00
Tim Abbott 472c55a1ff populate_db: Create some drafts in the initial database. 2021-07-30 10:41:52 -07:00
Hemanth V. Alluri 6fee946a43 drafts: Send events to clients when drafts change.
With this, the core of the new drafts system is complete.
2021-07-30 10:41:52 -07:00
Hemanth V. Alluri c00089ac28 drafts: Add support for toggling drafts synchronization.
With changes mostly to the API documentation by tabbott.
2021-07-30 10:00:27 -07:00
Riken Shah 4d3b10d84d puppeteer: Fix the element becoming stale.
As the right sidebar re-renders many times, often the
element puppeteer selected becomes stale, to avoid this
issue we are using javascript to click on the element.

This commit also ensures that the set user status modal
is completely open before we start clicking.
2021-07-30 09:19:56 -07:00
Anders Kaseorg 1f5fc12989 video_calls: Remove call to deprecated Zoom Data Compliance API.
https://marketplace.zoom.us/docs/guides/stay-up-to-date/announcements#data-compliance

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-07-30 09:19:22 -07:00
Tim Abbott 399dc5046b Revert "narrow: Do not mark messages as read in mentioned narrow."
This reverts commit 5e97ec9ad9.

This change has been pretty confusing for users, and so we need to do
something more in order to make the UI acceptable to change this
default.
2021-07-29 17:31:51 -07:00
Priyam Seth 3ce7a9dd08 compose: Move warn functions from compose.js to compose_validate.js.
This commit moves the warn_if_private_stream_is_linked,
needs_subscribe_warning, and warn_if_mentioning_unsubscribed_user
to compose_validate.js from compose.js.

These warning functions are very naturally part of the compose box
validation system, though they're a bit different in being called from
the typeahead codebase.

Part of splitting compose.js into more natural modules.
2021-07-29 15:22:31 -07:00
Tim Abbott 665f479f4d docs: Update changelog since 4.0 release. 2021-07-29 14:54:17 -07:00
Suyash Vardhan Mathur ea6b21cd8c openapi: Document update-status endpoint. 2021-07-29 11:50:25 -07:00
Priyank Patel 1711dcbc6f ts: Convert settings_data module to TypeScript. 2021-07-29 11:30:18 -07:00
Priyank Patel 6b93fe0cd7 ts: Convert settings_config module to TypeScript. 2021-07-29 11:30:18 -07:00
aryanshridhar 3443f62d9a user_status: Trigger input focus once the modal is shown.
Previously, once the user opens the "Set user status" UI,
the focus isn't automatically set to the input bar.

This is so because the input field isn't visible at
the time when UI is loaded because of the bootstrap
fade property which delays the event.

Added a fix to trigger the focus event on input bar
only when the modal is completely shown.

Fixes #19417.
2021-07-29 11:26:26 -07:00
aryanshridhar 94b872828b MDLW: Render tippy tooltip once the selected items surpasses the limit.
This commit enhances our Multiselect dropdown list widget by
displaying a tippy tooltip over the dropdown button once it's
text changes to `n selected` where n is the number of items
selected by user which exceeds the limit passed.

It essentially helps the user to identify the dropdown items they
have selected by just hovering over the dropdown toggle button.
2021-07-29 10:09:03 -07:00
aryanshridhar 7c588d4747 dropdown_list_widget: Add support for Multiselect dropdown list widget (MDLW).
This commit adds the support to select multiple dropdown items by inheriting
dropdown list widget and overriding some of it's properties.

The parameters that can be passed along with it are-

- widget_name: The desired name of the widget.
- data: The data that needs to be populated as dropdown items.
- default_text: The default text to be rendered when none of the items is selected.
- on_update: Function to trigger once the filter button is pressed.
- on_close: Function to trigger once the dropdown is successfully closed after filtering.
- value: The default value that is initially selected by user.
- limit: The maximum number of dropdown items to display on button text.

This widget can later be implemented in recent topic view to replace the
several ellipses filter button and also within the organisation user's page
to quickly sort the users list according to their org role.
2021-07-29 10:09:03 -07:00
aryanshridhar 0d20a20b07 dropdown_list_widget: Improve keyboard focus events.
Previously, our dropdown list widget was lacking several
keyUp/keyDown keyboard focus events due to which the user
couldn't shift the focus from the dropdown item to it's
search input.

This commit essentially binds several additional keyboard events
by defining a `dropdown_focus_events` function which helps
in enhancing our keyboard focus events.

Due to the above changes, it removes the custom event binded
to dropdown list widget because of which we fallback to our
deprecated keydown event handler functions present in /third/bootstrap.
2021-07-29 10:09:03 -07:00
aryanshridhar 5c2bafc6b0 dropdown_list_widget: Refactor dropdown_list_widget to constructor function.
This is a prep commit for adding the support of Multiselect
dropdown list widget by prototypal inheritance.

The following change actually revamps the dropdown list widget
into a constructor function, due to which the widget is now to
be initialized with the `new` keyword (which adds a property
to __proto__ object that links to the constructor function's
prototype object).

Example-
const foo = new DropdownListWidget({....});

Due to the above change, this commit also modifies the declaration
of dropdown_list_widget across all our instances.
2021-07-29 10:09:03 -07:00
Aman Agrawal bbcc4798b7 for-companies: Change header image. 2021-07-29 09:22:09 -07:00
Alya Abbott 176e3b983d portico: Edit top and bottom of /for/companies. 2021-07-29 09:22:09 -07:00
Aman Agrawal a4dce136af for-companies: Add buttons at top and bottom.
TODO: Adjust header text.
2021-07-29 09:22:09 -07:00
Aman Agrawal ccecb99227 for-research: Fix incorrectly aligned image.
The image is aligned on left but should be on right.
2021-07-29 08:44:35 -07:00
Eeshan Garg 5555864e54 docs: Add doc root links to sidebar.
A recent commit (5a94bfcb88)
introduced a couple of regressions:

* The part of help.js that highlights the active page in the
  sidebar raised an exception on /help and /api since there
  was nothing to highlight for the doc roots in the sidebar
  anymore.
* Moving the doc root links to the header after the logo made
  it such that on narrow mobile widths, there was no way to get
  to the doc root since the links in the header were truncated.

With a CSS change by tabbott to avoid awkward vertical spacing.
2021-07-28 17:40:14 -07:00
Priyank Patel 1e94f6ac96 util: Rewrite same_recipents to not use switch.
In this case, for TypeScript narrowing to work correctly, we need
a if statement that check that both of the type are same. The one
condition we had that checked that both have the same type doesn't
work with TypeScript narrowing yet.
2021-07-28 17:32:09 -07:00