Commit Graph

3641 Commits

Author SHA1 Message Date
Tim Abbott cdbcb43706 api: Fix encoding of strings in realm endpoint.
* Don't require strings to be unnecessarily JSON-encoded.
* Use check_capped_string rather than custom code for length checks.
* Update frontend to pass the right parameters.

With a much simplified populate_data_for_request design suggested by
Anders; we only support a handful of data types, all of which are
correctly encoded automatically by jQuery.

Fixes part of #18035.
2021-04-09 16:27:30 -07:00
Prakhar Gupta a220a7105e
left sidebar: Change label for exiting topic zoom to Back to Streams.
All streams in left-side bar cause discrepancy
as it is unable to express if it is heading for
the current column as "Streams" is in previous
column or is it text description for the back icon.
Renaming "All streams" to "Back to streams" removes
discrepancy.
2021-04-09 09:57:35 -07:00
Tim Abbott 681d2a08a1 help: Remove nbsp formatting from stream-permissions.
This doesn't look good, but it does look better and deletes code.
2021-04-09 08:52:50 -07:00
Tim Abbott b28b200f50 help: Clarify documentation on guest users and streams.
This tries to make it more immediately clear facts like that guests
cannot see public streams.
2021-04-09 08:52:40 -07:00
Tim Abbott 42b1f4e5f5 portico: Fix visual double-quote in FHIR quote.
The <blockquote> area adds its own set of quotation marks.
2021-04-08 23:26:44 -07:00
Aman Agrawal d4fa938a23 giphy: Convert `compose_giphy_logo` from id to class.
Since there are multiple `compose_giphy_logo` elements, we should
use it as a class as per HTML spec.
2021-04-08 10:03:51 -07:00
Aman Agrawal e9a9eb9a43 stream_header: Use consistent tooltip text. 2021-04-07 17:11:23 -07:00
Aman Agrawal 52eeb7bc68 streams_nav: Use tippy for tooltip.
Tippyjs automatically places it to right, placement can change to
bottom if there is no space available to right.
2021-04-07 17:11:23 -07:00
Aman Agrawal 910ceebfc1 user_list_title: Use consistent tooltip text for user search.
Make the text for tooltip on search icon and header same.
2021-04-07 17:11:23 -07:00
Aman Agrawal e0c9c92cf1 userlist_search: Use tippyjs for showing tooltips.
Placement is set to `auto` which is based on space available.
Hence, it varies based on browser width and the current narrow.
2021-04-07 17:11:23 -07:00
m-e-l-u-h-a-n 079f016a35 api docs: Document display settings endpoint.
With substantial changes by tabbott to fix bugs, clarify the
documentation, and add links.

Fixes #16048.
2021-04-07 12:10:25 -07:00
sahil839 86f7b6af60 events: Pass can_invite_others_to_realm to client using page_params.
This commit adds backend code for passing can_invite_others_to_realm
field to clients using the fetch_initial_state_data in the page_params
object.

Though this field is not used by webapp as of now, but will be used
to fix a bug of incorreclty showing the invite users option in
settings overlay in the next commit.
2021-04-07 09:05:16 -07:00
sahil839 4c8339fa8c settings: Replace invite_by_admins_policy with invite_to_realm_policy.
This commit replaces invite_by_admins_policy, which was a bool field,
with a new enum field invite_by_realm_policy.

Though the final goal is to add moderators and full members option
using COMMON_POLICY_TYPES, but this will be done in a separate
commit to make this easy for review.
2021-04-07 09:02:33 -07:00
Aman Agrawal d4248cf060 keyboard-icon: Use tippyjs for tooltip.
Tippyjs automatically places it to left.
2021-04-07 01:24:52 -07:00
Alya Abbott 4309760e8d portico: Update number of contributors listed on the website. 2021-04-06 21:06:38 -07:00
Sumanth V Rao 1ac8fe7538 events/tests/api: Send realm_playground events to clients.
We send the whole data set as a part of the event rather than
doing an add/remove operation for couple of reasons:
    * This would make the client logic simpler.
    * The playground data is small enough for us to not worry
      about performance.

Tweaked both `fetch_initial_state_data` and `apply_events` to
handle the new playground event.

Tests added to validate the event matches the expected schema.

Documented realm_playgrounds sections inside /events and
/register to support our openapi validation system in test_events.

Tweaked other tests like test_event_system.py and test_home.py
to account for the new event being generated.

Lastly, documented the changes to the API endpoints in
api/changelog.md and bumped API_FEATURE_LEVEL.

Tweaked by tabbott to add an `id` field in RealmPlayground objects
sent to clients, which is essential to sending the API request to
remove one.
2021-04-06 20:56:58 -07:00
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