Commit Graph

4659 Commits

Author SHA1 Message Date
Sumanth V Rao d2e5b62dce realm/playground: Add API endpoint for deleting a playground entry.
Similar to the previous commit, we have added a `do_*` function
which does the deletion from the DB. The next commit handles sending
the events when both adding and deleting a playground entry.

Added the openAPI format data to zulip.yaml for DELETE
/realm/playgrounds/{playground_id}. Also added python and curl
examples to remove-playground.md.

Tests added.
2021-04-07 08:20:53 +05:30
Sumanth V Rao 251b415987 realm/playground: Add API endpoint for creating playground entry.
This endpoint will allow clients to create a playground entry
containing the name, pygments language and url_prefix for the
playground of their choice.

Introduced the `do_*` function in-charge of creating the entry in
the model. Handling the process of sending events which will be
done in a follow up commit.

Added the openAPI format data to zulip.yaml for POST
/realm/playgrounds. Also added python and curl examples for using
the endpoint in its markdown documented (add-playground.md).

Tests added.
2021-04-07 08:20:53 +05:30
Abhijeet Prasad Bodas 3bfcaa3968 mute user: Add backend infrastructure code.
Adds backend code for the mute users feature.
This is just infrastructure work (database
interactions, helpers, tests, events, API docs
etc) and does not involve any behavioral/semantic
aspects of muted users.

Adds POST and DELETE endpoints, to keep the
URL scheme mostly consistent in terms of `users/me`.

TODOs:
1. Add tests for exporting `zulip_muteduser` database table.
2. Add dedicated methods to python-zulip-api to be used
   in place of the current `client.call_endpoint` implementation.
2021-04-06 18:44:08 -07:00
Anders Kaseorg 738532ba51 requirements: Remove django-webpack-loader.
It does not seem like an official version supporting Webpack 4 (to say
nothing of 5) will be released any time soon, and we can reimplement
it in very little code.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-06 09:31:35 -07:00
LoopThrough-i-j bdcbd53db7 docs: Allow passing additional params to `call_on_each_event`.
`call_on_each_event` now supports additional params other than
`event_type` and `narrow`; Ex: `all_public_streams` to fetch events
of all public streams.

Also add a bit of explanation of how this parameter works.

Fixes zulip/python-zulip-api#647
2021-04-06 08:40:32 -07:00
Sushanth Reddy Manda ddbb0a5fbc help: Mention only owners can create reusable invite links.
Fixes #16951.
2021-04-05 17:44:15 -07:00
Aman Agrawal 5e83965e80 giphy: Use GIPHY web SDK to allow inserting GIFs in compose box.
We use GIPHY web SDK to create popover containing GIFs in a
grid format. Simply clicking on the GIFs will insert the GIF in the compose
box.

We add GIPHY logo to compose box action icons which opens the GIPHY
picker popover containing GIFs with "Powered by GIPHY"
attribution.
2021-04-05 15:04:49 -07:00
Vishnu KS 9d96847d43 faq: Add instruction for requesting sponsorship when free trial is disabled.
The request sponsorship form(/upgrade page) is shown after the organization
creation only when the free trial is enabled.
2021-04-05 12:29:13 -07:00
Siddharth Asthana e7f24ac8d4 docs: Improve documentation for changing a realm's subdomain.
The current documentation doesn't clearly explain the process of
changing the organization's subdomain.
This commit adds instructions for user to get the string_id of their
organization and then lists the commands to be executed in the
management shell to change the subdomain.

Part of #17857.
2021-04-05 08:43:34 -07:00
rht 4f38da5ce7 docs: Add info on zulip-archive on for/working-groups-and-communities. 2021-04-03 08:05:02 -07:00
Tim Abbott f745efdde0 help: Link quote-and-reply and permalink articles.
This to a partial rewrite of the quote-and-reply article to explain
the current details for how it works (the permanent link is relatively
new).
2021-04-03 07:51:29 -07:00
Tim Abbott c01c947f5b help: Clean up documentation around permanent links. 2021-04-03 07:51:10 -07:00
Mateusz Mandera 1e367f9509 docs: Mention plans to add stream unarchiving. 2021-04-02 22:08:23 -07:00
Mateusz Mandera 82b43a8cfe streams: Use "archive stream" phrasing instead of "delete stream".
The previous phrasing was misleading in relation to what the action
actually does.
2021-04-02 22:06:48 -07:00
Zeeshan 811eff1a03 api-docs: Fix table in update_message_flags to use proper html.
The Available flags table in update_message_flags.md was using
markdown for certain content inside HTML, which resulted in the
table not being rendered properly.
This commit fixes the table to use proper HTML for content rendering
instead of markdown, since the table was written in markdown's HTML
syntax.
2021-04-01 15:26:25 -07:00
Anders Kaseorg 0868641ea4 Revert "static: Make alert-box available for portico pages."
This reverts commit a00f5dd90e (#17801).

That commit introduced a regression in the portico pages as described
in commit 85b3157b47.  Since that fix
introduced a regression of its own, we need to revert both commits for
now.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-04-01 15:25:23 -07:00
m-e-l-u-h-a-n aea31eb31f api: Add REALM_DEACTIVATED error code.
In `validate_account_and_subdomain` we check
if user's realm is not deactivated. In case
of failure of this check, we raise our standard
JsonableError. While this works well in most
cases but it creates difficulties in handling
of users with deactivated realms for non-browser
clients.

So we register a new REALM_DEACTIVATED error
code so that clients can distinguish if error
is because of deactivated account. Following
these changes `validate_account_and_subdomain`
raises RealmDeactivatedError if user's realm
is deactivated.

This error is also documented in
`/api/rest-error-handling`.

Testing: I have mostly relied on automated
backend tests to test this.

Fixes #17763.
2021-03-31 08:46:13 -07:00
m-e-l-u-h-a-n 2eeb82edba api: Add USER_DEACTIVATED error code.
In validate_account_and_subdomain we check if
user's account is not deactivated. In case of
failure of this check we raise our standard
JsonableError. While this works well in most
cases but it creates difficulties in handling
of deactivated accounts for non-browser clients.

So we register a new USER_DEACTIVATED error
code so that clients can distinguish if error
is because of deactivated account. Following
these changes `validate_account_and_subdomain`
raises UserDeactivatedError if user's account
is deactivated.

This error is also documented in
`/api/rest-error-handling`.

Testing: I have mostly relied on automated
backend tests to test this.

Partially addresses issue #17763.
2021-03-31 08:46:13 -07:00
Sumanth V Rao e12f682e2e markdown: Include text & url in `topic_links` parameter of our API.
The linkifier code now includes both the shortened text and the expanded
URL, sorted by the order of the occurrence in a topic. This list is passed
back in the `topic_links` parameter of the /messages and the /events APIs.

topic_links earlier vs now:

earlier: ['https://www.google.com', 'https://github.com/zulip/zulip/32']

now: [{'url': 'https://www.google.com', 'text': 'https://www.google/com},
      {'url': 'https://github.com/zulip/zulip/32', 'text': '#32'}]

Similarly, the topic_links local echo logic in the frontend now returns
back an object.

Fixes: #17109.
2021-03-30 15:53:07 -07:00
Megamind 27d1f5e0e3
frontend: Use fa-user-plus as invitation icon in gear menu. 2021-03-29 13:31:38 -07:00
Mateusz Mandera c70f926dc1 docs: Clarify situation with custom domains on Zulip Cloud.
We can support it, and it's not that hard, but it does require ongoing
work to manage/maintain SSL certificates.
2021-03-29 09:00:39 -07:00
Vishnu KS 8737634347 navbar: Include opening and closing braces in translation tags.
This fixes the bug introduced in the following commits.

161342a298
3165ffa8e2
2021-03-26 16:28:45 -07:00
shanukun bc2d58ad4a custom_profile_fields: Remove op field for the event.
* `op` (operation) field, added in f6fb88549f, was never intended for
`custom_profile_fields` event. This commit removes the `op` as it doesn't
have any use in the code.

* As a part of cleanup, this also eliminates the schema check warnings
for `custom_profile_fields` event, mentioned in #17568.
2021-03-26 16:28:33 -07:00
PIG208 a00f5dd90e static: Make alert-box available for portico pages. 2021-03-26 09:41:08 -07:00
Tim Abbott 459bf379c2 dev_panel: Use correct content helper for portico pages.
In 1a12e112d9, this page was converted
to use portico styling, but we intentionally left this page not using
the portico_content class since we didn't want the header/footer.

We still don't want the header/footer clutter, so instead, we achieve
that same goal using the isolated_page flag.
2021-03-26 09:40:40 -07:00
Mateusz Mandera f18d7fa7ed docs: Remove "beta" mark from message-retention-policy.md.
The retention policy has been sufficiently well tested at this point to
consider it stable.
2021-03-25 12:43:54 -07:00
Adam Birds 3acdbd277a integrations: Update Capistrano Documentation.
I have updated the capistrano docs so that the indentations are all
correct and align with the numbers correctly.

This one, if wanting to pout backticks round the code whilst indented,
doesn't render properly. Has to be double indented.

Fixes #17633.
2021-03-25 01:40:38 -07:00
Adam Birds 503e129af4 integrations: Update Twitter Documentation.
I have updated the docs for the twitter plugin to include number to
increase ease of readability.

Fixes part of #17633.
2021-03-25 01:40:38 -07:00
Adam Birds 22cbcadeb1 integrations: Update Trac Documentation.
I have updated the docs for the Trac integration to include numbers for
ease of readability.

Fixes part of #17633.
2021-03-25 01:40:38 -07:00
Adam Birds e723e9abe7 integrations: Update Puppet Documentation.
I have updated the Puppet docs to include numbers for increase of
readability and have removed a thank you message from the bottom to
bring in line with the rest of the docs.

Fixes part of #17633.
2021-03-25 01:40:38 -07:00
Adam Birds ff1b344179 integrations: Update Phabricator Documentation.
I have updated the docs for the Phabricator integration to include
numbers to match the style of the rest of integrations docs.

Fixes part of #17633.
2021-03-25 01:40:38 -07:00
Adam Birds 3a91f5baf6 integrations: Update Openshift Documentation.
I have updated the Openshift docs to include numbers to increase its
readability.

Fixes part of #17633.
2021-03-25 01:40:38 -07:00
Adam Birds 132bae3850 integrations: Update Email Documentation.
I have updated the documentation for the email integration to include
numbers to match the rest of the integrations.

Fixes part of #17633.
2021-03-25 01:40:38 -07:00
Adam Birds 1128453e50 integrations: Update Nagios Documentation.
I have updated the Nagios documentation to include numbers to increase
ease of readability.

Fixes part of #17633.
2021-03-25 01:35:57 -07:00
Suyash Vardhan Mathur d3a3c6898c api docs: Add documentation of deactivate-own-user endpoint.
Currently, there was no markdown page for deactivate-own-user API
endpoint. Created deactivate-own-user.md for the API page and
created a new owner client in test-api to reactivate the client
deactivated during testing.

Also changed endpoint name from deactivate-my-account to
deactivate-own-user, for better consistency with other endpoints.

Fixes #16163.
2021-03-25 01:05:44 -07:00
m-e-l-u-h-a-n 2699048208 markdown: Extend user mention syntax to support user_id for mentioning.
Extend our markdown system to support mentioning of users
by id also. Following these changes, it would be possible
to mention users with @**|user_id** and silently mention
using @_**|user_id**.

Main intention for extending the mention syntax is to make
it convenient for bots to mention a users using their ids. It
is to be noted that previous syntax are also supported.

Documentation tweaked by tabbott for better readability.

The changes were tested manually in development server, and also
by adding some new backend and frontend tests.

Fixes: #17487.
2021-03-25 00:44:56 -07:00
smit_patel 5ddb5fc534 popovers: Change "Delete all messages in topic" to "Delete topic".
This cleans up the copy a bit to be more readable.

Documentation changes cleaned up by tabbott.

Fixes #16856.
2021-03-23 15:46:00 -07:00
Anders Kaseorg d22a61443e notifications: Remove in_browser_notify and bootstrap-notify.
Follow up to #14768.  This feature was already non-functional due to
.alert-display { display: none; }, and if we want to reimplement it,
we should do it using a modern library.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-22 23:40:38 -07:00
Anders Kaseorg aff8a32bc1 notifications: Simplify sound playing.
Remove the unused notifications-area wrapper.  Remove the feature
detection code as all browsers recognize the <audio> element.  Create
the <audio> statically with the page template.  Use multiple <source>s
to let the browser detect the appropriate format instead of trying to
do its job for it.  Remove the absurd loop="yes" attribute, which had
fortunately been specified on the wrong element.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-22 23:36:38 -07:00
Gaurav Pandey dea5245590 right-sidebar: Fix design bugs with keyboard-shortcuts.
The keyboard-shortcuts icon currently has a fix position
causing design related bugs such as overlapping with userlist
in the sidebar.

The fix wraps the invite-more-users link and keyboard icon inside
a div with display property as flex instead of just using the anchor
tags inside the side-bar items.
2021-03-22 19:29:46 -07:00
Vishnu KS a404711740 support: Show the actual user email in /support. 2021-03-22 18:10:03 -07:00
Vishnu KS 38e7903425 support: Show role of the user in search result. 2021-03-22 18:10:03 -07:00
Tim Abbott f121e40848 message: Record whether unread_msgs data is truncated.
This is preparatory work for investigating reports of missing unread
messages.

It's a little surprising that not test failed after adding the code
without API documentation.

Co-Author-By: Tushar Upadhyay (tushar912).
2021-03-21 19:48:13 -07:00
Megamind ec43f5418d
right sidebar: Improve icon for "Invite more users".
This replaces the `+` with a version that has a user head next to it.
2021-03-17 17:33:25 -07:00
Tim Abbott a14cd23bdb integration docs: Fix organization of Google calendar doc. 2021-03-16 15:35:15 -07:00
Adam Birds bd79428a19 integrations: Update SVN Documentation.
I have updated the docs for the SVN integration to properly indent the
code block etc as well as using 1. for the numbers rather than 1. 2. and
so on.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00
Adam Birds d74f608147 integrations: Update RSS Documentation.
I have updated the docs for the RSS integration to include numbers to
increase its readability.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00
Adam Birds eca9cfd7d7 integrations: Update Perforce Documentation.
I have updated the docs for the Perforce integration to include numbers
to increase readability.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00
Adam Birds 26916bdf85 integrations: Update Jenkins Documentation.
I have updated the docs for the Jenkins integration to include number
for ease of read as well as switching over to the new
{create-a-bot-indenmted.md} template to allow the continuation of
numbers.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00
Adam Birds eaf0212f6a integrations: Update Google Calendar Docs.
I have updated the docs for the Google Celndar integration to include
numbers to increase its readbility.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00