Commit Graph

5130 Commits

Author SHA1 Message Date
Alya Abbott 947e1e05f8 portico: Adjust formatting and citation of a quote on /for/research. 2021-07-21 15:06:00 -07:00
Alya Abbott 83b81ff2c9 portico: Add links to quote citations on /for/research. 2021-07-21 12:24:35 -07:00
Aman Agrawal 56ce1f9f63 portico: Add pricing widget from /plans to for-education page. 2021-07-21 12:13:25 -07:00
Alya Abbott a8887948cb portico: Fix typos on case study pages. 2021-07-21 10:40:19 -07:00
Aman Agrawal 3c024b2fba portico: Add /for/education, /for/events, /for/research pages.
These modern landing pages cover use cases previously not detailed on
our website. Technically, we had a /for/research page before, but it
wasn't finished or linked everywhere.

Removed "function-url-quotes" stylelint rule
since I need to use quotes in url to use an
svg as list bullet point. There are spacing issues
using it as an image. Also, using quotes in url
is actually the recommended way to do it otherwise
there could be issue with escaping.
2021-07-20 22:37:52 -07:00
Tim Abbott d5b9f87ada portico: Use relative links on recently merged pages.
We apparently forgot to do this conversion when importing them into
the codebase.
2021-07-20 15:53:31 -07:00
Erik Tews 1ecb87ec80 auth: show _OR_ during login only when other methods are available.
There might be good reasons to have other external authentication
methods such as SAML configured, but none of them is available.

This happens, for example, when you have enabled SAML so that Zulip is
able to generate the metadata in XML format, but you haven't
configured an IdP yet. This commit makes sure that the phrase _OR_ is
only shown on the login/account page when there are actually other
authentication methods available. When they are just configured, but
not available yet, the page looks like as if no external
authentication methods are be configured.

We achieve this by deleting any_social_backend_enabled, which was very
similar to page_params.external_authentication_methods, which
correctly has one entry per configured SAML IdP.
2021-07-20 14:29:48 -07:00
Eeshan Garg 09a3ebf1e4 landing_page: Link to case studies in the top navigation. 2021-07-20 12:35:11 -07:00
Tim Abbott 256091dc15 settings: Merge settings API endpoints.
This API change removes unnecessary complexity from a client that
wants to change a user's personal settings, and also saves developers
from needing to make decisions about what sort of setting something is
at the API level.

We preserve the old settings endpoints as mapping to the same function
as the new one for backwards-compatibility. We delete the
documentation for the old endpoints, though the documentation for the
merged /settings endpoint mentions how to use the old endpoints when
needed.

We migrate all backend tests to the new endpoints, except for
individual tests for each legacy endpoint to verify they still work.

Co-authored-by: sahil839 <sahilbatra839@gmail.com>
2021-07-19 21:14:32 -07:00
Tim Abbott b73356e891 portico: Add UCSD case study. 2021-07-18 21:55:57 -07:00
Tim Abbott 9fb5149f78 billing: Select the models organization type by default.
Probably in an ideal world, something should make sure these values
are the same.
2021-07-18 20:48:50 -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
sahil839 ceb5333352 images: Rename loader.svg to loader-white.svg for clarity.
We rename loader.svg to loader-white.svg as this svg contains
white rectangles for clarity as we have also added loader-black.svg
which is same but with black rectangles instead of white.
2021-07-18 11:44:17 -07:00
Tim Abbott 95606a7347 api: Return user IDs, not display emails, in subscribers endpoints.
Sometime in the deep past, Zulip the GET /users/me/subscriptions
endpoint started returning subscribers.  We noticed this and made it
optional via the include_subscribers parameter in
1af72a2745, however, we didn't notice
that they were being returned as emails rather than user IDs.

We migrated the core /register code paths to use subscriber IDs years
ago; this change completes that for the endpoints we forgot about.

The documentation allowed this error because we apparently had no
tests for this code path that used the actual API.
2021-07-18 11:32:28 -07:00
sahil839 d5a0c1ede5 api: Remove "full_name" and "account_email" from response of '/settings'.
We remove the "full_name" and "account_email" fields from the response
of 'PATCH /settings' endpoint. These fields were part of the response
to make sure that we tell that the parameters not present in response
were ignored.

We can remove these fields as 'ignored_parameters_unsupported' now
specifies which parameters were ignored and not supported by the
endpoint.
2021-07-16 16:10:15 -07:00
sahil839 05aff3f271 api: Add "ignored_parameters_unsupported" to response of '/settings'.
We add "ignored_parameters_unsupported" field to the response object
of 'PATCH /settings' endpoint. This will contain the parameters
passed to the endpoint which are not changed by the endpoint and are
ignored.

This will help in removing the other fields like "full_name" from
response which was essentially present to specify that only these
fields were updated by the endpoint and rest were ignored.

We will also change other endpoints to follow this in future.
2021-07-16 16:10:15 -07:00
Eeshan Garg 6036524651 landing_page: Restructure top-level navigation.
This commit restructures the top-level navigation on our landing
page using dropdowns in a manner that allows us to advertise some
important pages to our visitors:

- Use cases for companies, open source projects, and communities.
- Miscellaneous pages about the product are now accessible from the
  "Product" dropdown.
- "Resources" are a few key resources our users may want to consult
  if they need help or support.
2021-07-15 10:56:47 -07:00
Eeshan Garg 0ac7d7d21d corporate: Store sponsorship request data in the database.
We are starting to run into situations where this data could be
quite useful for making future decisions, so it makes to store it
in the database, not just in an email.
2021-07-15 10:31:03 -07:00
Eeshan Garg 366b7fe2f5 analytics: Display org_type in /activity/support results. 2021-07-15 10:14:39 -07:00
Eeshan Garg 434c262365 analytics: Display org_type on /activity.
Moving forward we are hoping to collect data on org types from our
users, so it makes sense to display the org type on the "Counts"
tab of our /activity page.
2021-07-15 10:14:38 -07:00
Eeshan Garg faa695e86d registration: Collect organization type on sign-up. 2021-07-15 09:58:27 -07:00
sahil839 2f44a08b37 settings: Convert settings_overlay.html to handlebars template.
Fixes #18796.
2021-07-15 08:59:23 -07:00
akshatdalton b0764386bf help: Document the `is:resolved` search keyword. 2021-07-13 23:48:46 -07:00
Tim Abbott 87295dbb8a help: Extend search operator examples to document negation. 2021-07-13 23:48:46 -07:00
akshatdalton 272901326c narrow_banner: Add banner for no resolved topics found search. 2021-07-13 23:36:24 -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
Suyash Vardhan Mathur 309f4ba145 openapi: Make endpoint operationId dash-separated.
The operationId is directly used in URLs of API doc pages
to find the OpenAPI data to render. However, this is dash-
separated in the URLs, and having underscore_separated IDs
in OpenAPI data doesn't allow direct comparison of the two.

This commit changes all OperationIDs from underscore_separated
to dash-separated.
2021-07-13 16:46:22 -07:00
Alya Abbott 9688a4fc97 portico: Clarify that Zulip Standard is free for open source.
Advertise free hosting for open-source projects higher
on the /for/open-source page.
2021-07-13 08:41:16 -07:00
Suyash Vardhan Mathur 981e4f8946
openapi: Render all responses of an operation.
Previously, one needed to specifying all the HTTP status
codes that we want to render along with the operation,
but the primary use case just needs the responses of
all the status codes, and not just one.

This commit modifies the Markdown extension to render
all the responses of all status codes of a specified
operation in a loop.
2021-07-13 08:33:43 -07:00
Tim Abbott 0bf13ce5db portico: Add Technical University of Munich case study.
This isn't linked yet, since the main place we'll link to is isn't
added yet.
2021-07-09 13:04:38 -07:00
Gaurav Pandey d2074fc10c events: Remove `sender_id` from `delete_message` event.
Remove `sender_id` as part of responses from `/events`
api for `delete_message` event when `message_type` is
`private`.
2021-07-08 13:40:32 -07:00
Tim Abbott af47fa705e exceptions: Use HTTP 401 code for authentication errors. 2021-07-08 10:33:08 -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
Tim Abbott c02e872545 templates: Merge core of home.html into index.html.
This makes it easier to read and understand our templates, since now
the former home.html is all error message content.
2021-07-07 09:47:39 -07:00
Tim Abbott a085954042 templates: Move main_div definition to index.html.
This will make it easier to have JavaScript render the home.html
template.
2021-07-07 09:47:39 -07:00
Tim Abbott 63a99c55b7 templates: Move notification sound elements.
These more naturally should sit at the outside of the page, not the
bottom of home.
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
Tim Abbott bcc07b918a css: Set night theme font CSS on loading page. 2021-07-06 14:57:17 -07:00
nooblag 3d66914cca minor: Introduce color logo on loading page.
With a few small styling tweaks from tabbott.

Fixes #18890.
2021-07-06 14:56:02 -07:00
Eeshan Garg 5a94bfcb88 docs: Add proper backlink to the homepage from /help and /api.
Currently, the "Home" link at the top takes one to the doc root,
i.e., /help or /api. This is a little misleading since "Home"
seems to be more synonymous with the Zulip homepage.

This commit adds a proper backlink to the top logo that takes you to
the homepage and renames "Home" to be more specific. The text after
"|" will now take you to the doc root instead (/help or /api). Note
that this allows us to link the /help and /api pages from the
homepage while ensuring that backlinks allow the visitor to get back
to the homepage.
2021-07-06 10:35:41 -07:00
Suyash Vardhan Mathur e9189d63ab apidocs: Remove template of get-events.
Now, get-events template fits the standard
format of the api docs template, and so the
redundant markdown template can be deleted to
generate the page diretly from openapi data.
2021-07-06 10:17:50 -07:00
Suyash Vardhan Mathur acb1244f93 api docs: Move stray get_events Python example.
We also remove the call_on_each_event note, which has been misplaced
ever since we created the "real-time-events" page.
2021-07-06 10:17:03 -07:00
aryanshridhar 13399833b0 right_sidebar: Migrate to handlebars.
This commit migrates the `right_sidebar.html` Django template
to handlebars by creating a new file as `right_sidebar.hbs`
which is then rendered using `ui_init` module.

It also removes the tests in `test_home` due to the template
migration, since these elements aren't rendered on the backend
anymore.

We also remove `test_compute_show_invites_and_add_streams*`.

Fixes part of #18792.
2021-07-05 18:58:24 -07:00
aryanshridhar 8fb7ff7637 left_sidebar: Migrate to handlebars.
This commit migrates the `left_sidebar.html` Django template
to handlebars by creating a new file as `left_sidebar.hbs`
which is then rendered using `ui_init` module.

These are the minor changes introduced by virtue of template
migration -
 - The `compute_show_invites_and_add_streams` function now
   only concerns with the invite_to_realm_policy.
 - Renamed the `compute_show_invites_and_add_streams` function
   to `compute_show_invites` due to the above change.
 - Fixes relevant `test_home.py` tests due to the above
   changes.

Fixes part of #18792.
2021-07-05 18:49:43 -07:00
Damián Parrino d645f19adc help: Add a related link to the "Configure..." article
This change adds a new link to the "Related articles" section, so users can follow to
the new "Move content to another stream" article.
2021-07-05 17:25:26 -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
sahil839 7eb183fdf7 settings: Move presence-enabled setting to 'Account & privacy'.
The presence setting is more suited in 'Account & privacy'
section as it is not related to notifications in anyway
and resembles privacy of user by allowing user to hide
his status of being online.
2021-07-05 14:27:56 -07:00
Hashir Sarwar 87d90f47ee email_notifications: Show mentioned user group in email notifications.
Fixes #13080.
Cherry-picked from #15011 with edits.

Co-authored-by: Abhijeet Bodas <abhijeetbodas2001@gmail.com>
2021-07-05 14:23:59 -07:00
Alya Abbott c4345429a6 portico: Extend billing FAQ.
Add two questions to the billing FAQ:
- What is the difference between automatic and manual billing?
- How will I be charged for temporary users (e.g. limited-time
  clients)?
2021-07-02 13:56:00 -07:00
Vishnu KS e0f5fadb79 billing: Downgrade small realms that are behind on payments.
An organization with at most 5 users that is behind on payments isn't
worth spending time on investigating the situation.

For larger organizations, we likely want somewhat different logic that
at least does not void invoices.
2021-07-02 13:19:12 -07:00
Priyansh Garg 5b2e21965c data_import: Add import attachments support for Mattermost.
Add support for importing message attachments from Mattermost.

Fixes: #18959
2021-07-02 11:19:45 -07:00
Tim Abbott afd67b4166 help: Remove reference to 'Settings'. 2021-07-01 12:15:43 -07:00
sahil839 437f4c2288 settings: Rename 'Your bots' to 'Bots' in settings sidebar.
As we have changed the tab selector above from "Settings" to "Personal
settings", we can simply change "Your bots" to "Bots" as "Bots" is
clear enough given the personal settings context.

We also need to update the API documentation for bots accordingly.
2021-07-01 12:14:48 -07:00
sahil839 8290a6fd8f settings: Fix header in settings overlay.
Previously the header of settings overlay
was 'SETTINGS / {name_of_section}'.

This commit changes it to be one of the two
mentioned below according to the opened
section-
1. 'PERSONAL SETTINGS / {name_of_section}'
2. 'ORGANIZATION SETTINGS / {name_of_section}'

Note - Have kept the header as original in
case of mobile as the above text will be
too long.
2021-07-01 11:47:14 -07:00
Tim Abbott a37346c128 api docs: Fix typo in link. 2021-07-01 11:38:57 -07:00
Tim Abbott a9cc3751cc api docs: Document history of rate limit format. 2021-07-01 11:24:14 -07:00
Suyash Vardhan Mathur c0615a00e6 openapi: Fix response description in outgoing-webhooks.
A response description was hardcoded in the template,
and the OpenAPI description was wrongly written. This commit
fixes the response description.
2021-07-01 11:20:37 -07:00
Suyash Vardhan Mathur 9f45914196 openapi: Fix fixture rendering in rest-error-handling.
The fixtures are now rendered differently, and using
just 400 in fixture renders all the 400 fixtures with
descriptions, whereas 400_1 and 400_0 are invalid now.
This commit removes the hardcoded descriptions, and fixes
the fixture rendering.
2021-07-01 11:20:37 -07:00
Tim Abbott 7f5e8f4799 help: Update references for 'User settings' => 'Account' in settings. 2021-06-30 17:02:00 -07:00
sahil839 b94d6c1a20 settings: Move timezone setting from display settings to profile.
The user timezone is only used for user's profile, so we can
move this setting to the Profile panel of settings and this
will also help us in covering some space when there are no
custom profile fields for the organization.
2021-06-30 16:56:03 -07:00
sahil839 0c80d23857 help: Update help pages according to profile page redesign.
This commit fixes the documentation of settings as we have
replaced "Your account" section into two new sections -
"Profile" and "Account & privacy".

This commit also fixes a comment in the test for settings
documentation in test_middleware.py.
2021-06-30 16:56:03 -07:00
sahil839 bb816e1998 settings: Separate "Your account" section in two different sections.
We separate "Your account" section to two different sections -
"Profile" section for user name, custom profile fields, and avatar
and "Account & Security" section for email, password, role, api-key
and deactivating button.

Another important change here is that the modal for changing name
is removed and now the name has a simple input text box and it
behaves similar to inputs for custom-profile-fields.

Fixes #18848.
2021-06-30 16:56:03 -07:00
Tim Abbott 0997eeae9e api docs: Document rate limiting rules.
Unfortunately, the example doesn't work due to some sort of bug with
the fixture generation system, which I've reported as #19072.
2021-06-30 13:40:07 -07:00
Damian Parrino afe0b7df61 help: Add "Related articles" links around topic editing.
Based on @timabbott 's feedback, I'm adding a "Related articles" section to:
- Rename a topic.
- Move content to another stream.
2021-06-29 13:58:01 -07:00
Damian Parrino 846200f36e help: Add an article about moving content to another topic.
This commit addresses @timabbott 's comments, by adding a new article
"Move content to another topic".

Thanks to the new article, I also simplified a step from the "Rename a
topic" article to keep it focused on renaming only.
2021-06-29 13:57:57 -07:00
Damian Parrino caea7f167d help: Reorganize articles on editing topics.
* Move content on moving topics between streams to a dedicated
  article. We advertise it as "move content" to hint that one can move
  messages or split topics, and link to it.

* This deletes change-the-topic-of-a-message, because the same content
  is already covered in rename-a-topic.

* This commit mostly just moves content between articles. Most of that
  content was redundant with the first few paragraphs of the surviving
  "rename a topic" article. The former "This is useful for" se ntence
  was adapted to the remaining article.

* This commit also adds a redirect for the removed article, and
  updates related links.
2021-06-29 13:52:06 -07:00
sahil839 c8849f8fe3 logo: Compute realm-logo url in frontend only.
This commit fixes the bug of always showing
day-mode realm logo when color scheme display
setting is set to automatic but the OS setting
is dark theme. This is because we cannot check
the OS setting on backend and we need to set
the logo url accordingly in frontend only.
So, we remove the logo url computation from
backend completely and instead compute it in
the frontend only.

Fixes #18778.
2021-06-29 13:42:44 -07:00
sahil839 f0b167e5a8 help: Fix section in deactivate-your-account help page. 2021-06-28 22:11:24 -07:00
sahil839 e0a6cfc708 help: Fix warning in deactivate-your-account help page.
After adding owner role, we allow last admin to deactivate
but not allow the last owner to deactivate, and this commit
fixes the warning about not allowing last admin.
2021-06-28 22:11:24 -07:00
aryanshridhar 8140a1a6ee info_overlay: Render search operators using info_overlay.
This commits ports the `search_operators.html` file from
./templates to handlebars, essentially creating a new file
as `search_operators.hbs` within /static/templates which is
then rendered using info_overlays.js.

As part of this migration, we rewrote the way internationalization was
done, since the previous implementation incorrectly did not support
languages with a different word order than English.

We also not consistently use periods at the end of the descriptions.

Co-authored-by: Tim Abbott <tabbott@zulip.com>

Fixes #18504.
2021-06-28 09:14:09 -07: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 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
Tim Abbott 8aa05620d2 help: Document resolving topics. 2021-06-24 13:57:02 -07:00
Suyash Vardhan Mathur 23b991a801 api docs: Replace most markdown files with a common template.
This PR adds a basic .md template that is followed by lot of /api
pages. Since we have recently done the migration work to ensure that
our REST API documentation pages for individual endpoints are almost
all identical files following a common pattern, we can now get the
payoff of deleting them all in favor of a shared template.

This removes 2000 lines of somewhat finicky configuration from the
codebase, and thus should save significant effort when documenting new
API endpoints in the future.

The markdown files for endpoints or other pages which deviate from the
standard template remain, and the docs are instead generated from
those files using the existing system.
2021-06-24 10:42:08 -07:00
Suyash Vardhan Mathur 0c4330f926 openapi: Automatically add python tab whenever required.
As a part of goal of moving towards a common template,
the hardcoded python tabs need to be removed to ensure
that endpoints which don't have python examples can be
covered by the common template as well.

This commit also modifies the markdown extension for python
examples to render empty string in case the examples don't
exist, which would allow it to be called whether the endpoint
has python examples or not.
2021-06-24 10:38:44 -07:00
Suyash Vardhan Mathur fe07f67360 apidocs: Standardize parameters text for get-own-user.
We use the "does not accept any parameters" language in the common
template that we'll be migrating to shortly, so we remove this
variance (And adjust its test).
2021-06-24 10:37:56 -07:00
Tim Abbott 5e53563016 api docs: Fix unsubstituted values in register-queue docs.
This was a bug introduced in d0e44eaaae,
whichw as missed due to #18573 proceeding to delete the file soon after.
2021-06-23 17:31:22 -07:00
Suyash Vardhan Mathur d0e44eaaae openapi: Move stray register-queue description into OpenAPI. 2021-06-23 16:12:18 -07:00
Suyash Vardhan Mathur dd7c3de36f openapi: Move stray get-user-groups description into OpenAPI. 2021-06-23 16:09:36 -07:00
Suyash Vardhan Mathur 7f8d8e0a9c openapi: Move stray update-notification-settings description into OpenAPI. 2021-06-23 16:05:47 -07:00
Suyash Vardhan Mathur 3129895818 openapi: Move stray custom emoji description into OpenAPI. 2021-06-22 17:39:29 -07:00
Suyash Vardhan Mathur 3f104c378b openapi: Move stray get messages description into OpenAPI. 2021-06-22 17:39:22 -07:00
Suyash Vardhan Mathur 570f3d350c apidocs: Move stray update message description to OpenAPI. 2021-06-22 17:39:17 -07:00
Suyash Vardhan Mathur f90b23b265 apidocs: Move stray upload file description to OpenAPI. 2021-06-22 17:39:12 -07:00
Suyash Vardhan Mathur 987b7206aa apidocs: Move stray display settings description to OpenAPI. 2021-06-22 17:39:06 -07:00
Suyash Vardhan Mathur 78910ec16a apidocs: Move stray message flags description to OpenAPI. 2021-06-22 17:38:51 -07:00
Suyash Vardhan Mathur 550e43bb9f apidocs: Move stray events description text to OpenAPI. 2021-06-22 17:38:34 -07:00
Suyash Vardhan Mathur d6ed38e0c9 apidocs: Move stray server settings description to OpenAPI. 2021-06-22 17:38:30 -07:00
Suyash Vardhan Mathur aedca6d6c6 apidocs: Move stray message history description to OpenAPI. 2021-06-22 17:38:10 -07:00
Suyash Vardhan Mathur 8d7634a572 apidocs: Move stray events description to OpenAPI. 2021-06-22 17:38:06 -07:00
Suyash Vardhan Mathur 8da27b8a5b apidocs: Move stray delete description reference to OpenAPI. 2021-06-22 17:37:44 -07:00
Suyash Vardhan Mathur bb175a1a32 openapi: Remove unnecessary URL encoding notes. 2021-06-22 17:36:27 -07:00
Suyash Vardhan Mathur 5f07c06040 openapi: Auto render response descriptions.
This commit modifies the templates to
auto-generate general descriptions of
responses directly from the newly
added field of x-response-description
as a part of the goal of a common template.
2021-06-22 10:58:43 -07:00
Suyash Vardhan Mathur cc2aa41fae openapi: Auto render parameter descriptions.
This commit modifies the templates to
auto-generate general descriptions of
parameters directly from the newly
added field of x-parameter-description
as a part of the goal of a common template.
2021-06-22 10:58:43 -07:00
Tim Abbott 67fd5585f9 help: Briefly document new tabs in full profile. 2021-06-21 17:21:24 -07:00
Suyash Vardhan Mathur a2be9a0e2d apidocs: Modify curl examples in templates.
Now, all possible configurations for curl examples
are rendered directly from openapi data, and
the templates should just call the markdown
function once.

This commit adjusts all the templates by removing
hardcoded configurations and descriptions for
individual curl examples.
2021-06-21 11:06:05 -07:00
Tim Abbott a307de95de right sidebar: s/Filter users/Search people/.
We previously had a mix of "Filter users" and "Search people" for this
widget. "Search" is more correct because the right sidebar can only
show a subset of the organization in some settings.
2021-06-18 16:41:37 -07:00
Tim Abbott 420cf531ce help: Add basic details on how typing notifications work.
This isn't the best writing, but it'll help us remember to cover these
details when we do a major pass on this article after adding upcoming
status changes.
2021-06-18 14:40:48 -07:00
sahil839 c3d7703369 help: Update the documentation to document edit_topic_policy. 2021-06-16 15:04:42 -07:00
sahil839 828759d2ba models: Replace allow_community_topic_editing with edit_topic_policy.
This commit replaces the allow_community_topic_editing boolean with
integer field edit_topic_policy and includes both frontend and
backend changes.

We also update settings_ui.disable_sub_settings_onchange to not
change the color of label as we did previously when the setting
was a checkbox. But now as the setting is dropdown we keep the
label as it is and we don't do anything with label when disabling
dropdowns. Also, this function was used only here so we can safely
change this.
2021-06-16 14:59:36 -07:00
Aman Agrawal 988c6a4cbd left_sidebar: Hide starred and mentions links for spectators. 2021-06-16 10:17:15 -07:00
Aman Agrawal b99a720012 left_sidebar: Hide "Add streams" widget for spectators. 2021-06-16 10:16:40 -07:00
Suyash Vardhan Mathur 1acee9f516 apidocs: Migrate admin_config out of templates.
Currently, the `admin_config` configuration was
hardcoded in the templates, but as a goal of creating
a common template, we need to move all configurations
outside.

Moved the checking for function and language which need
admin_config out of templates into the code and added a
boolean `x-admin-config` to store whehter the operation
requires admin config.

Also, added the banner for admin access to auto-generate
if admin_config is present, and fixed the admin_config
for endpoints that were earlier missing it in the templates.
2021-06-16 09:52:43 -07:00
Vishnu KS 808e9cce90 actvity: Describe what the rate column shows. 2021-06-16 07:48:44 -07:00
Vishnu KS fdae1be144 activity: Rename effective rate column to rate. 2021-06-16 07:48:44 -07:00
Riken Shah b2ab448b71 gear_menu: Extract the gear menu as a handlebars template.
For this extraction, we need to move some context
parameter (from home_real in `views/home.py`) to extra
page_params parameter (of
build_page_params_for_home_page_load in
`lib/home.py`) so handlebars template can access them.

While moving I confirmed that these parameters are not
used elsewhere if some parameter is used elsewhere
(like `apps_page_url`) then I didn't remove it from the
context list, I just added it to the page_params list.

Fixes: #18795.
2021-06-15 12:17:45 -07:00
Ganesh Pawar 5e4b1e1867 deprecated_feature_notice: Migrate to handlebars. 2021-06-15 11:59:01 -07:00
Ganesh Pawar 1d4b6c1320 about_zulip: Migrate to handlebars.
This results in moving the `zulip_merge_base` parameter to
page_params, so that it's available to JavaScript.

Since this is technically a tiny overlay, it needs to be initialized
before hashchange.js.
2021-06-15 11:55:20 -07:00
Ganesh Pawar c220c01ad2 user_status: Migrate to handlebars.
We also reorganize the click handlers to live in the main UI file for
the element, and depend less on initialization order.
2021-06-15 11:32:33 -07:00
Ganesh Pawar 8744b42beb message_history: Migrate to handlebars. 2021-06-15 11:31:01 -07:00
Vishnu KS 5da3a69505 plans: Mention whether realm is on free trial. 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
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
Suyash Vardhan Mathur 274f73d117 apidocs: Automatically add javascript example tabs.
The javascript tab in .md templates can be
generated along with the line that adds js
example.

Further, as a part of the effort of moving
towards a single template, the markdown extension
for javascrit examples is modified to return empty
string if javascript example doesn't exist for that
endpoint. This would make it possible to cover more
endpoints with a single template.

The js example tabs are now automatically generated
during generation of javascript code, and so need to
be removed. Also, the markdown function to render js
examples can be added in all templates, since it is
parses and returns an empty string if the examples
don't exist, and allows us to move towards a common
template.

The pages have been verified to be correct
by using diff between old and new pages' raw HTML.
2021-06-11 07:43:22 -07:00
Vishnu KS d32de76c23 activity: Rename amount variables to arr. 2021-06-11 07:41:02 -07:00
Vishnu KS cfbea80f08 activity: Don't show plan, ARR and discount when billing is disabled. 2021-06-11 07:41:02 -07:00
Vishnu KS 40ab415005 activity: Show effective rate of realms in /activity page. 2021-06-11 07:41:02 -07:00
Tim Abbott 75dbd2c80d templates: Remove logout form shared template.
It's sufficiently tiny that the shared code benefits don't justify the
cost, given that we plan to move index.html to a different templating
system soon.
2021-06-10 13:14:25 -07:00
Ganesh Pawar 19fb6114d7 message_edit: Migrate to using `confirm_dialog`. 2021-06-10 12:23:48 -07:00
Suyash Vardhan Mathur 5be92ad30d openapi: Auto-render heading with return values.
The headings for return values were currently hardcoded
in cases where they occur, but they can be rendered directly
in the markdown extension if the return values exist.
2021-06-10 11:25:13 -07:00
Steve Howell 842b14b916 layout: Introduce a #compose-content div.
This should make it more intuitive to add
new elements to the compose box (such as
banners), and it also makes it a bit more
clear for styling purposes that the same
geometry happens whether the compose box
is open or the buttons are visible.

I lifted the #compose_container div into
the server template.  It's not totally
clear to me why we need both #compose
and #compose_container, but there are
some scary comments about 1400px that
made me too timid to address that quirk.

In passing I removed a clearly redundant
click handler.
2021-06-10 11:22:05 -07:00
Tim Abbott d17d00a416 templates: Remove unused settings_sidebar.html.
This was orphaned in 805ac2475b.
2021-06-10 10:36:46 -07:00
Tim Abbott afe5b2e7e5 templates: Inline tiny subscriptions/drafts templates. 2021-06-10 10:31:22 -07:00
Eeshan Garg 50a6887d94 plans_page: Compute sponsorship link for subdomain pages correctly.
Currently, in the FAQ on our /plans page, when the user clicks on
the sponsorship link in the answer for the first question, they
are always taken to /accounts/go, causing them to have to input
their organization URL even if they are on a subdomain page.

This commit makes it so that when the user is on a subdomain page,
they are taken to /upgrade#sponsorship directly. On the other
hand, when they are on a root domain (/) page, they have to go
through /accounts/go and specify their organization's name.
2021-06-10 09:10:38 -07:00
Vishnu KS 1938076f67 billing: Enforce license limit for plans on manual license management. 2021-06-09 17:42:38 -07:00
Anders Kaseorg d8adeb66ca docs: Deemphasize Hubot as an integration bridge.
The Hubot project looks to be abandoned; it hasn’t been updated in
years and its own installation instructions don’t work anymore.
Remove our special placement of Hubot alongside Zapier and IFTTT.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-06-09 14:04:01 -07:00
Suyash Vardhan Mathur 1fa82c2fcd apidocs: Fix response in API templates.
Now, the descriptions and all subschemas
are directly returned just by
`generate_code_example`, and so, these individual
subschemas and descriptions can be removed from the
templates.

All API endpoints docs are exactly the same after the
change, except few where missing 400 responses got added
due to the modification
2021-06-09 12:43:12 -07:00
Aman Agrawal 4822bd0822 left_sidebar: Set tooltip placement of search to top.
This looks nicer.
2021-06-08 14:55:48 -07:00
Aman Agrawal b6898704f0 left_sidebar: Replace search icon with filter icon. 2021-06-08 14:55:48 -07:00
Aman Agrawal 4b4fdad0e3 left_sidebar: Replace cog icon with plus icon.
We add a popover on click which allows user to create or browse
streams too.

Reason for doing so:

At present, it is hard to discover how to join streams
and create new streams. In particular:

Users have a hard time finding the gear in the STREAMS
header in the left sidebar and realizing that it's relevant for them.
Even once a user is in the STREAMS menu, the Create
stream button is hard to spot.

Fixes #18694.
2021-06-08 14:55:48 -07:00
Tim Abbott 5926b89fee docs: Link from custom profile fields to LDAP/SAML docs. 2021-06-08 14:50:37 -07:00
Tim Abbott 647e66dd6e help: Document setting oneself available again. 2021-06-08 12:09:10 -07:00
Riken Shah ccfee49407 navbar_alerts: Replace HTML template with handlebars architecture.
This moves this block of HTML templates, which are dynamically
rendered with some user data, to be managed by the frontend handlebars
template system.

This migration involves only displaying active alerts in the DOM, and
thus we no longer need navbar_alerts to have display: none by default.
2021-06-07 17:52:08 -07:00
Alya Abbott 467028511c portico: Fix up /features.
Replace "PERSISTENCE" feature with "MUTE USER". All feature
tiles now have Help Center links.
2021-06-06 07:57:33 -07:00
Gaurav Pandey 9b696cf212 api: Expose event_queue_longpoll_timeout_seconds in /register.
Rename poll_timeout to event_queue_longpoll_timeout_seconds
and change its value from 90000 ms to 90 sec. Expose its
value in register api response when realm data is fetched.
Bump API_FEATURE_LEVEL to 74.
2021-06-05 07:37:19 -07:00
sahil839 cbb508fa23 help: Update invite docs to accomodate the UI change.
This commit updates the docs as the setting for invites
is separated into two UI elements - a checkbox for
'are invites required to join organization' and a
dropdown for setting 'who can invite new users'.
2021-06-03 18:45:29 -07:00
sahil839 f827debe9d settings: Move move-message-between-stream setting to "Message Editing".
This commit moves "Who can move messages between streams" setting to
"Message Editing" section.
2021-06-03 17:13:32 -07:00
sahil839 4d20bce6e4 settings: Move message edit settings to "Organization Permissions".
The message-editing section of settings is moved from "Organization
Settings" to "Organization Permissions", which feels like a more
natural place for these settings.
2021-06-03 17:13:32 -07:00
Vishnu KS 5db53029a5 api: Include is_billing_admin as an attribute in user response.
This is sufficiently useful that it should be made available to clients.
2021-06-03 10:27:07 -07:00
Gilbert Bishop-White e4d9e58c7d emails: Make it obvious when registering creates new realm.
Checked the email looked OK in `/emails` for both creating realm and
registering within an existing one.

Not sure zerver/tests/test_i18n.py test has been suppressed correctly.

Fixes #17786.
2021-06-02 15:18:03 -07:00
Gaurav Pandey f67fc37f7d settings: Rename MAX_EMOJI_FILE_SIZE.
Rename MAX_EMOJI_FILE_SIZE to
MAX_EMOJI_FILE_SIZE_MIB reflecting
the size in mebibytes.
2021-06-02 13:55:15 -07:00
Signior-X f79b92a4d0 docs: Add syntax highlighting in api docs.
This commit adds the language of code snippets in api
markdowns wherever it was left.
2021-06-01 10:03:25 -07:00
Mateusz Mandera e17758f8ad auth: Implement a generic OpenID Connect backend.
Fixes #11939.
2021-05-28 09:43:06 -07:00
sahil839 d37ddf13a4 registration: Show spinner and disable button while processing.
This commit disables the button and shows a loading spinner on
the button when signup request is being processed to avoid race
conditions caused by user clicking on the button multiple times.

The fix is done observing that for the case when form is invalid
the whole page is rerendered and thus we do not need to remove
the spinner and enable the button again and for other errors
we redirect to some other page.

And for the validation taking place in client-side, the button
is disabled and spinner is shown, only is form is valid, by
using "$('#registration').valid()".
2021-05-27 22:51:13 -07:00
Alex Vandiver 915e5a40d7 docs: Clarify that the Slack app and API token should be removed. 2021-05-27 22:46:02 -07:00
Suyash Vardhan Mathur 05b7d4ba13 apidocs: Replace hardcoded titles with generated ones.
This commit replaces the hardcoded titles
of /api pages with the auto-generated ones
from the openapi data using the markdown
processor.
2021-05-26 17:38:01 -07:00
Suyash Vardhan Mathur e15af5ae14 apidocs: Add summary field to endpoints.
As a part of effort of removing .md files for /api pages, the
title of each page can be added into the summary OpenAPI
parameter. This also adds a nice summary visible in Swagger
and enhances the documentation. Added the parameter for all endpoints.
2021-05-26 17:38:01 -07:00
Tim Abbott 66052954e0 apidocs: Fix messages match narrow URL.
The operationId was clearly a better label.
2021-05-26 17:38:00 -07:00
Suyash Vardhan Mathur b41be98c42 apidocs: Fix playground URLs and operationIDs.
We standardized on "Code playground" for this feature, so use that
in the URLs and API documentation.
2021-05-26 17:38:00 -07:00
Tim Abbott 7d1db086c3 api docs: Clarify how mention flags can change.
The previous description didn't make clear that you can edit a message
to add a mention.

Also, adjust indentation to be the normal 4-space style we use for HTML.
2021-05-26 11:59:40 -07:00
Tim Abbott 55f30458e1 emails: Use 'has invited you' phrasing for invitations. 2021-05-26 11:41:13 -07:00
Gaurav Pandey 64bd461bad register api: Rename realm_upload_quota.
Rename `realm_upload_quota` to `realm_upload_quota_mib`
reflecting file size in mebibytes. Update frontend and bump
API_FEATURE_LEVEL.
2021-05-26 11:38:24 -07:00
Vishnu KS b22a6447dd i18n: Tag strings in status message settings for translation.
Fixes #18609
2021-05-26 11:04:04 -07:00
Vishnu KS 3e62a793f7 user status: Remove data attributes from user status options.
I don't see any good reason why we have to store the status
values in data attributes when they are already stored as
the content of the buttons.
2021-05-26 11:04:04 -07:00
Nikhil Maske 60be1416ad left_sidebar: Place all the classes in a single class attribute.
Placing multiple classes in multiple class attributes enforces
them to override each other css properties. To avoid this
streams_filter_icon class is moved to a single class attributes.
2021-05-25 19:49:49 +05:30
Allen Cao bdedaba273
help: Remove obsolete reserved names documentation.
Because our mention logic now has a way to distinguish a user with one of these
weird names from a wildcard mention, we no longer need this explicit warning.

(It'd still be a bit confusing, but no more so than various other weird names you could
invest).
2021-05-24 17:44:28 -07:00
sahil839 75227335dc changelog: Fix repetition of feature levels in changelog.md.
This typo was introduced in 70c0abc2e5.
2021-05-23 13:19:24 -07:00
slefforge 99097b10fc help: Fix formatting on stream-permissions table legend.
This is a bit hacky, but it avoids the legend being weirdly
misaligned.

Fixes #18062.
2021-05-23 12:04:11 -07:00
Riken Shah 51e24519b8 refactor: Rename `panels.js` to `navbar_alerts.js` as it better explains it. 2021-05-21 17:49:12 -07:00
m-e-l-u-h-a-n 5b4e823836 help: Mention possibility of re-hiding muted user's revealed message. 2021-05-21 17:23:29 -07:00
Aman Agrawal 70c0abc2e5 do_change_stream_invite_only: Ensure stream is not web public.
When changing stream permissions to invite_only or public, ensure
that stream doesn't have is_web_public set to True.
2021-05-20 15:23:19 -07:00
Tim Abbott 2e67b879ed api: Add server_timestamp to register response.
Since this is currently only useful to interpret presence data, we
send this only if presence is requested.

I'm not sure that server_timestamp is the right name for this field,
but ultimately it should match the main presence API format.
2021-05-20 14:57:34 -07:00
Aman Agrawal 637c7e297c streams_filter_icon: Convert from id to class.
This will allow us repeat the class which we cannot do with id.
2021-05-20 14:41:40 -07:00
Anders Kaseorg 9d290798eb templates: Escape some unescaped > and & characters.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-20 12:09:47 -07:00
Vishnu KS 5ad50b19cb billing: Show billing email in /billing page. 2021-05-18 17:46:38 -07:00
PIG208 4e8dd43841 devtools: Improve the appearance of dev_panel. 2021-05-18 17:35:29 -07:00
rht aa3cdfa2e9 Fix typos using codespell.
The command:
codespell --skip='./locale,*.svg,./docs/translating,postgresql.conf.template.erb,.*fixtures,./yarn.lock,./docs/THIRDPARTY,./tools/setup/emoji/emoji_names.py,./tools/setup/emoji/emoji_map.json,./zerver/management/data/unified_reactions.json' --ignore-words=codespell_ignore_words.txt .

The content of codespell_ignore_words:
```
te
ans
pullrequest
ist
cros
wit
nwe
circularly
ned
ba
ressemble
ser
sur
hel
fpr
alls
nd
ot
```
2021-05-18 17:33:51 -07:00
Tim Abbott 39519fc5c6 help: Use a tip to highlight giphy self-hosting situation. 2021-05-14 16:11:03 -07:00
Tim Abbott 16d39db043 help: Better highlight email gateway configuration is required. 2021-05-14 16:11:03 -07:00
Tim Abbott 0fe785183f help: Document anti-tracking features of images. 2021-05-14 16:11:03 -07:00
Tim Abbott b28389c5e4 help: Document GIPHY privacy story. 2021-05-14 16:11:03 -07:00
Vishnu KS 323ad83d98 billing: Allow updating licenses of plans on manual license management. 2021-05-14 15:10:02 -07:00
Vishnu KS 45f7a25351 billing: Rename licenses_used variable to seat_count. 2021-05-14 15:10:02 -07:00
Anders Kaseorg e015f3ed7d docs: Correct “webapp” to “web app”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-14 13:15:38 -07:00
Abhijeet Prasad Bodas 9a64f741ec help: Clarify what muting means for the muted user.
We don't want to claim something so strong as the first of this text,
because the mutee can still guess that they have been muted if the
muter suddenly starts completely ignoring messages, especially PMs.

But this framing is better in retaining the perspective as you.
2021-05-14 11:14:48 -07:00
Anders Kaseorg e0c5994f5c changelog: Fix version number typo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 15:48:52 -07:00
Tim Abbott bf4f6544e7 version: Update version following 4.0 release. 2021-05-13 15:48:15 -07:00
Tim Abbott 825192a051 Release Zulip Server 4.0. 2021-05-13 15:37:37 -07:00
Anders Kaseorg 3275b781b8 about-zulip: Clean up about dialog.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 15:29:56 -07:00
Tim Abbott efed2fc8bc navbar: Enable 'About Zulip' in production. 2021-05-13 11:50:41 -07:00
Anders Kaseorg 668b5137b0 version: Display Zulip version in About Zulip dialog.
We record Git details about the merge-base with upstream branches in
the zulip-git-version file, if the upstream repository is available.

Note that the first Git upgrade after merging the parent commit will
not include the merge-base details, since the upstream repository will
not have been available.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-13 11:36:12 -07:00
Tim Abbott 0cc3375c41 help: Improve reference to moving topics in moderation guide. 2021-05-13 09:25:54 -07:00
Tim Abbott 97f1dc4e08 help: Document new setting for moving a topic between streams.
I'd like to do more refactoring on this documentation, but at least we
now explain the current model accurately.
2021-05-13 09:02:24 -07:00
Tim Abbott 1d8daebbfb portico: Label terminal app as beta.
This is more consistent with how other projects name things, as the
app is safe to use and works as one's primary client.
2021-05-12 11:52:17 -07:00
Tim Abbott 8946e44200 help: Simplify explanation of muting. 2021-05-12 11:50:56 -07:00
Tim Abbott b5d5ed956a help: Adjust mute-a-user documentation to link related articles. 2021-05-12 11:50:56 -07:00
Tim Abbott 06f1ea657e navbar: Adjust label for usage statistics. 2021-05-12 10:34:12 -07:00
Tim Abbott 02676d5400 navbar: Reorder elements in gear menu. 2021-05-12 10:34:04 -07:00
Vishnu KS 051dab58ea navbar: Add gear menu advertisement for sponsoring zulip. 2021-05-12 10:21:48 -07:00
Abhijeet Prasad Bodas e5a339df25 recent topics: Handle muted user avatars in participants.
We use styling same as that of the number shown for overflow
(e.g "+3") which has a gray background.
To keep these avatars up-to-date, we need to rerender the
recent topics view after receiving a `muted_users` event.

Also update the user documentation to mention this detail.
We deliberately avoid mentioning "recent topics" because
this applies to mobile too.
2021-05-12 09:30:24 -07:00
Tim Abbott a87749b478 api docs: Avoid confusing the API changelog with the changelog.
We change the title to be more descriptive and also link to the
overall Zulip changelog, since one can reasonably get to this page
when googling for "Zulip changelog".
2021-05-11 22:00:05 -07:00
Abhijeet Prasad Bodas c637994612 help: Fix typo in mute-a-user page.
Also make the sentence more clearer.
2021-05-11 13:21:38 -07:00
Alex Vandiver 9d7fc01622 docs: Clarify wording about muting and admin pages. 2021-05-10 14:39:08 -10:00
Abhijeet Prasad Bodas 67cd385cec mute user: Add user documentation page.
Also link to it from the API documentation page,
other help pages, and the confirmation dialog for
muting a user.

With substantial edits by tabbott and alya.
2021-05-10 17:10:40 -07:00
Abhijeet Prasad Bodas 9519221bb5 mute user: Remove development environment checks. 2021-05-10 16:38:21 -07:00
Siddharth Asthana 6ee7d5c983 docs: Improve documentation for changing a realm's subdomain.
Add a single line for self-hosting case to point to the ReadTheDocs
section of management command to change the realm's subdomain.

Fixes: #17857
2021-05-10 12:33:43 -07:00
Gaurav Pandey 96e035a2f0 api: Fix encoding of strings in streams endpoint.
* Remove unnecessary json_validator for string parameters.
* Update frontend to pass right parameter.

Bump api feature level and highlight the fix for `emojiset`
parameter of `settings/display` endpoint in zulip.yaml file.

Fixes part of #18035.
2021-05-10 10:29:22 -07:00
Anders Kaseorg 544bbd5398 docs: Fix capitalization mistakes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-10 09:57:26 -07:00