Commit Graph

3791 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
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
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
Adam Birds c14dd92c2c integrations: Update Discourse Documentation.
I have updated the docs for the Discourse integration to include numbers
for better readability.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00
Adam Birds d03f75fd79 integrations: Update Docs for Hubot integrations.
I have updated the documentation for all the integrations that use Hubot
to include numbers for ease of readability.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00
Adam Birds 8f4983a093 integrations: Update Asana Documentation.
I have updated the documentatsion for the Asana integration to include
numbered steps to increase its readability.

Fixes part of #17633.
2021-03-16 15:29:47 -07:00
Vishnu KS cda64b6204 navbar: Tag organization profile update message properly for translation. 2021-03-16 15:15:09 -07:00
Vishnu KS c463ccc4e4 navbar: Tag desktop app security alert message properly for translation. 2021-03-16 15:15:09 -07:00
Vishnu KS 1c6f223d06 navbar: Tag unread alert message properly for translation. 2021-03-16 15:15:09 -07:00
Gaurav Pandey 7ddf6435a9 left-sidebar: Remove add-streams option out of scrollbar.
This commit removes the option to add more streams out of scrollbar
as it is not visible on mobile devices or organizations with large number of
streams until scrolled down.
2021-03-16 14:10:04 -07:00
Nikhil Maske 236393d5cf left_sidebar: Place the title at private_messages_header div.
The title in li.top_left_private_messages applies the title
to private-container too. This causes to show "Private message"
title to private message elements. To fix this, the title is
placed at div.private_messages_header.
2021-03-15 12:04:22 -07:00
Abhijeet Prasad Bodas 9223dced3b refactor: Rename filter to linkifier in frontend code and docs.
This only leaves `page_params.realm_filters`, which
will be changed in further commits along with the
API change.
2021-03-15 11:19:59 -07:00
m-e-l-u-h-a-n d95fc244d3 documentation(api): Fix typo in construct narrow documentation. 2021-03-14 22:05:31 -07:00
Megamind 238c2ff4fb
Rename "Add streams" to "Subscribe to more streams" in left-sidebar.
The "Add streams" button text made users think this was what you needed to create
additional streams in the organization.  While that's correct for the first user/organization 
administrator, it's not correct for most other users.
2021-03-14 18:09:37 -07:00
Vishnu KS f6b97f20e3 sponsorships: Don't translate the subject of support emails.
The email subject used to be translated to the language of
the user who requested the sponsorship. This was a bug since
the recipient of the emails are Zulip's support staff and
not the user who requested the sponsorship.
2021-03-12 13:30:46 -08:00
Anders Kaseorg 3e552268e5 templates: Delete unused markdown_help.html.
Apparently I failed to finish deleting it in commit
7f30e5f9df (#17560).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-11 21:45:48 -08:00
Anders Kaseorg 7f30e5f9df info_overlay: Render Markdown help with frontend Markdown library.
Fixes #15375.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-11 21:24:39 -08:00
Tushar912 55de66f944 api: Support user_id in get_user_presence_endpoint.
This is part of our general process of replacing emails, which are not
static with time, with user_ids when referring to users in the API.

We still keep the `email` reference option, since it can be useful for
linking third-party applications to Zulip on an intranet that might
have a user's corporate email handy and not want to do the extra round
trip to lookup the user.

The name of the parameter, user_id_or_email, was chosen to to make it
clear that the default/preferred option is user_id.

Fixes #14304.
2021-03-11 20:14:04 -08:00
Aman Agrawal e587c029f6 display_settings: Allow user to set default_view.
TextField is used to allow users to set long stream + topic narrow
names in the urls.

We currently restrict users to only set "all_messages" and
"recent_topics" as narrows.

This commit achieves 3 things:
* Removes recent topics as the default view which loads when
  hash is empty.
* Loads default_view when hash is empty.
* Loads default_view on pressing escape key when it is unhandled by
  other present UI elements.

NOTE: After this commit loading zulip with an empty hash will
automatically set hash to default_view.  Ideally, we'd just display
the default view without a hash, but that involves extra complexity.

One exception is when user is trying to load an overlay directly,
i.e. zulip is loaded with an overlay hash. In this case,
we render recent topics is background irrespective of default_view.

We consider this last detail to be a bug not important enough to block
adding this setting.
2021-03-11 18:09:08 -08:00
sahil839 9a432b0c3b events: Remove name field from update subscription events.
This commit removes name field from update subscription
events, as it is not used by any of the clients, and use
stream_id in the events code instead.
2021-03-07 22:03:24 -08:00
sahil839 b53c773987 events: Remove email field from update subscription events.
This commit removes email field from update subscription
events, as email field is of no use in this case.
2021-03-01 14:52:06 -08:00
Aman Agrawal 612f100e51 help: Improve documentation about Recent topics. 2021-02-25 17:32:31 -08:00
Aman Agrawal a210ee2b7d recent_topics: Don't revive focus when user is trying to type. 2021-02-25 17:31:33 -08:00
smit_patel 24ad553dc1 left_sidebar: Add tooltip for recent topics shortcut key. 2021-02-25 17:31:33 -08:00
Aman Agrawal b84bce2bc7 all_messages: Change default icon from home to align-left.
Since All messages narrow is no longer home page for webapp,
we change its icon to align-left which also shows a concept of
interleaved topics / messages.
2021-02-25 17:31:32 -08:00
Aman Agrawal 760e4fc1e7 recent_topics: Focus on search box on `t` keypress. 2021-02-25 17:31:32 -08:00
Aman Agrawal 39d123e355 recent_topics: Make it the default view.
Go to Recent Topics on "#", no hash and "#recent_topics".
Go to Recent Topics as the last destination for escape key.
Map `a` key to All messages and change its hash to
`#all_messages`.
2021-02-25 17:31:32 -08:00
Aman Agrawal 1eafb1d8b3 recent_topics: Move from overlay to a narrow-like view.
Recent Topics is no longer an overlay now, but note that it is
also not a typical messages narrow. It can reside between
an overlay and a Filter in the sense that it is dispalyed as
a typical Filter narrow but has properties of an Overlay.

Compose box is not visible in this view as it will be confusing
to many users and hence compose shortcuts have also been disabled.

Keyboard shortcuts that apply on messages have also been disabled.

The remaining shortcuts that apply to a narrow are still accessible
here.
2021-02-25 17:31:32 -08:00
Alex Vandiver e53be6d043 email: Set an envelope-from which may be different from the From: field.
The envelope-from is used by the MTA if the destination address is not
deliverable.  Route all such mail to the noreply address.
2021-02-24 17:32:28 -08:00
Suyash Vardhan Mathur f1eda37836 api docs: Fix documentation of update-subscription-settings.
The description of request parameter of update-subscription-settings was
wrongly pasted in yaml and wasn't completely removed from the md file.
Made appropriate fixes in yaml and md file.
2021-02-24 13:28:58 -08:00
Anders Kaseorg 378295351d desktop-app-install-guide: Update for APT repository move.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-02-17 10:24:04 -08:00
Aman Agrawal 009f88210a left_sidebar: Show title when mouse hover anywhere on the button.
Instead of showing title text when user hovers over the text in
the button, show title when user hovers anywhere on the button.
2021-02-16 17:00:20 -08:00
Tim Abbott 158752ca9b docs: Update contributor and developer documentation counts. 2021-02-15 17:45:34 -08:00
Tushar912 dfafdda9b3 api: Add REST API endpoint for looking up a user by email address.
Add new rest api endpoint GET users/{email} for looking up a user by
email, which is useful especially for corporate API applications that
might already have a user's email address.

Fixes #14302.
2021-02-15 17:38:33 -08:00
Signior-X 05140a6e20 docs: Replace A icon with help in format using markdown.
In the format-your-message-using-markdown, in the in-help
help section, the A icon is replace by help button. This
updates the docs.
2021-02-08 17:29:03 -08:00
Suyash Vardhan Mathur 63c13a8f13 api docs: Fix documentation of update-subscription-settings.
The responses for the API weren't being rendered from yaml, and were
incorrectly formatted in yaml. The parameters also weren't completely
included in yaml and needed to be moved. Made appropriate fixes in
yaml and markdown file.
2021-02-05 10:41:42 -08:00
Vishnu KS 6a9e534a22 help: Clarify the number of invites one can send.
The 100 invite per day restriction is only for the free plan. Also,
the value 100 is configurable using
settings.INVITES_DEFAULT_REALM_DAILY_MAX. On top of this, newly
created realms on free plan combined can only send
INVITES_NEW_REALM_LIMIT_DAYS number of invites. So it's better not
to hardcode 100 in the doc.
2021-02-04 21:08:06 -05:00
Aman Agrawal b26727ed16 invite-new-users: Specify that the limit spans for the whole day. 2021-01-29 09:51:11 -08:00
Aman Agrawal 961d1d0a68 community_topic_edit: Increase time limit to 3 days.
24hrs is a small time in an asynchronous conversation. Increased
time limit of topic editing for non-admins to 3 days.
2021-01-25 14:55:33 -08:00
Aman Agrawal 18bd2469fa help: Remove false claim in message topic editing table row.
Message editing setting doesn't effect a member being able
to edit other user's message topic.
2021-01-25 14:55:33 -08:00
Aman Agrawal 5a8150e34b media_query: Use 1199px instead of 1165px as xl breakpoint.
We use 1199px for hiding right column.

The components changed here were tested to be working fine.

This change is not likely to introduce any regression as the
calculations in the components here were not dependent upon the
breakpoint being at 1165px.
2021-01-25 14:49:32 -08:00
Tim Abbott 63539ddc37 website: Mention that we sponsor hundreds of projects. 2021-01-22 10:02:26 -08:00
Steve Howell d9740045a5 refactor: Eliminate checks in build_stream_dict_for_sub.
We eliminate some redundant checks.

We also consistently provide a `subscribers` field
in our stream data with `[]`, even if our users
can't access subscribers.  We therefore bump
the API version and tweak the docs.  (See further
down for a detailed justification of the change.)

Even though it is sometimes fine to have redundant code
that is defensive in nature, some upcoming changes are gonna
move subscriber-related logic out of build_stream_dict_for_sub
for certain codepaths as part of our effort to streamline
the payload for subscribers within page_params.

So we can't rely on the code that I removed here
inside of build_stream_dict_for_sub.

Anyway, it makes more sense to do these checks explicitly
in the validate function.

The code in build_stream_dict_for_sub was almost effectively
a noop, since the validation function was already preventing
us from getting subscriber info.  The only difference it
made was sometimes converting `[]` to `None`, and then
subsequently omitting the subscribers field.

Neither ZT nor the webapp make any distinction between
`[]` or <missing key> for the `subscribers` data in
`page_params`.

The webapp has had this code for a long time (and now
equivalent code elsewhere in this PR):

    if (!Object.prototype.hasOwnProperty.call(sub, "subscribers")) {
        sub.subscribers = new LazySet([]);
    }

The webapp calculates access based on booleans, anyway:

    sub.can_access_subscribers =
        page_params.is_admin || sub.subscribed ||
        (!page_params.is_guest && !sub.invite_only);

And ZT would choke if `subscribers` were missing, except that
it never gets to the relevant code due to other checks:

    def get_other_subscribers_in_stream(<snip>):
        assert stream_id is not None or stream_name is not None

        if stream_id:
            assert self.is_user_subscribed_to_stream(stream_id)

            return [sub
                    for sub in self.stream_dict[stream_id]['subscribers']
                    if sub != self.user_id]
        else:
            return [sub
                    for _, stream in self.stream_dict.items()
                    for sub in stream['subscribers']
                    if stream['name'] == stream_name
                    if sub != self.user_id]

You could make a semantic argument that we should prefer
<missing key> to `[]` when subscribers aren't even available, but
we have precedent from the way that `bulk_get_subscriber_user_ids`
has traditionally populated its result:

    result: Dict[int, List[int]] =
        {stream["id"]: [] for stream in stream_dicts}

If we changed `stream_dicts` to `target_stream_dicts` we
would faciliate a move toward `None`, but it would just cause
headaches for other server code as well as the frontends
(which, to reiterate, already prefer the empty array
for convenience).
2021-01-21 15:04:07 -08:00
Nikhil Maske 719217be8f markdown_help: Make spoiler-button work by changing its tag.
The "a" tag of spoiler-button present in Markdown formatting page
disrupts click handlers. To fix this, "a" tag is changed to "span" tag.
2021-01-21 14:32:13 -08:00
rht d514b799ad slack-import: Explain current implementation about threads. 2021-01-12 10:21:32 -08:00
Aman Agrawal c685d36821 hipchat_import: Remove tool from codebase.
Remove functions and scripts used by HipChat import tool and
those which will no longer be required in future.
2020-12-23 08:28:49 -08:00
Aman Agrawal 62d721e859 docs: Remove HipChat migration guide.
As of Feb 15th 2019, Hipchat Cloud and Stride
have reached End Of Life and are no longer
supported by Atlassian. Since it is almost 2 years
now we can remove the migration guides.
2020-12-23 15:43:13 +05:30
Mateusz Mandera 160cc5120a api: Require can_create_users permission to create users via API.
Allowing any admins to create arbitrary users is not ideal because it
can lead to abuse issues.  We should require something stronger that
requires the server operator's approval and thus we add a new
can_create_users permission.
2020-12-21 13:20:21 -08:00
Tim Abbott d513bb4aa6 help: Fix Gitter docs to encourage making users owners. 2020-12-17 18:45:05 -08:00
sushant52 9393371a94 docs: Add auth backend configuration is optional.
Tweaked by tabbott to use slightly clearer language.
2020-12-17 18:11:28 -08:00
Siddharth Asthana daac7536f3 accounts/deactivated: Show deactivated_redirect url if present
If a user visits a realm which has been deactivated and it's
deactivated_redirect field is set, we should have a message telling the
user that the realm has moved to the deactivated_redirect url.
2020-12-14 21:04:52 -08:00
shanukun 82a262018a dev_tools: Fix dev-secrets.conf path.
At /devtools 'Connecting to the local PostgreSQL database',
path for `dev-secrets.conf` should zulip/zproject/dev-secrets.conf
instead of zulip/zerver/dev-secrets.conf.
2020-12-08 18:11:14 -08:00
Anders Kaseorg c4d805a82c api docs: Use --data-urlencode in send-message curl example.
Commit 13c11ec5f3 (#16699) already fixed
the generated curl examples, but missed this, which is the only
hard-coded one.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-12-07 17:00:05 -08:00
rht 4911bc3c4d docs: Recommend Matterbridge for integration with IRC/Matrix/Slack. 2020-12-01 14:12:05 -08:00
Tim Abbott 3b5ea2dbad docs: Remove broken Gitter help center link.
Gitter's help center seems to no longer be on the Internet.
2020-11-18 13:02:07 -08:00
Tim Abbott a6744646e4 help: Clarify how deactivating an account interacts with organizations. 2020-11-18 12:51:39 -08:00
Abhishek Yadav 4d458eeb49
left_sidebar: Add data-placement to settings icon to prevent flickering.
Changing the position of tooltip using data-placement=bottom fixes this flickering artifact.

Fixes: #16676
2020-11-16 17:22:18 -08:00
Vishnu KS d6743da139 docs test: Verify zulip/zulip file and directory links locally. 2020-11-05 10:07:43 -08:00
Vishnu KS 2a17dd61aa docs: Link session length and idle timeouts to GitHub search.
The line number was outdated and was linking to totally unrelated
section. I think the best way to handle this case would be to
link directly to search.
2020-11-05 10:07:43 -08:00
shanukun be39672026 api_docs: Document the /fetch-api-key endpoint.
With tweaks by tabbott to document addition details.

Fixes: #16408.
2020-11-02 16:45:42 -08:00
Tim Abbott cba7425cdc docs: Clean up email testing docs a bit more. 2020-10-30 12:15:27 -07:00
Vishnu KS ff754ee528 emails: Pass help link as variable in password reset email. 2020-10-30 11:50:30 -07:00
Vishnu KS 0eec12ad8b emails: Pass reset link as variable in notify new login email. 2020-10-30 11:50:30 -07:00
Vishnu KS 0853c866a9 emails: Use link tag macro for realm uri in password reset email. 2020-10-30 11:50:30 -07:00
Vishnu KS e53008410a emails: Use email tag macro for email in password reset email. 2020-10-30 11:50:30 -07:00
Vishnu KS 1c08ea8134 emails: Use trans tag for ladap username in followup day 1 email. 2020-10-30 11:50:30 -07:00
Vishnu KS abc5fb6cea emails: Use email tag macro for email in followup day1 email. 2020-10-30 11:50:30 -07:00
Vishnu KS df882d1563 emails: Use link tag macro for realm_uri in followup day1 email. 2020-10-30 11:50:30 -07:00
Vishnu KS cb6ab43ba2 emails: Use link tag macro for realm_uri in realm reactivation email. 2020-10-30 11:50:30 -07:00
Vishnu KS 36b00b6b96 emails: Use email tag macro for old and new emails in confirm new email. 2020-10-30 11:50:30 -07:00
Vishnu KS c06d8f9e45 emails: Use link tag macro for realm_uri in confirm new email. 2020-10-30 11:50:30 -07:00
Vishnu KS 4b784f8869 emails: Use macros for link tags in new login email. 2020-10-30 11:50:30 -07:00
Vishnu KS 8abf6897cb emails: Use macros for email tags in realm reactivation email. 2020-10-30 11:50:30 -07:00
Vishnu KS 01a92abf12 emails: Use macros for email tags in notify new login email. 2020-10-30 11:50:30 -07:00
Vishnu KS 3bac784590 emails: Use macros for email tags in notify change in email. 2020-10-30 11:50:30 -07:00
Vishnu KS 689c636e29 emails: Use macros for email tags in confirm registration email. 2020-10-30 11:50:30 -07:00
Vishnu KS 0d56f3d73e emails: Use macros for email tags in verify new email. 2020-10-30 11:50:30 -07:00
Vishnu KS 2caee3d68c emails: Use macros for email tags in invitation reminder email. 2020-10-30 11:50:30 -07:00
Vishnu KS eb008fc864 emails: Use macros for email tags in invitation email. 2020-10-30 11:50:30 -07:00
Tim Abbott 5fb667cf9e templates: Make sure users know deletion is for everyone.
Implements a proposal I suggested in #16426.
2020-10-29 17:25:40 -07:00
Tim Abbott 5bfafae764 docs: Improve linking of documentation around message deletion.
This should help users confirm their understanding of how deletion
works in Zulip starting from the actual deletion UI.
2020-10-29 17:12:49 -07:00
sahil839 5d79dff00b docs: Extract help doc for wildcard mention policy.
This commit moves the wildcard mentions documentation to a top-level page.

Edited by tabbott to deduplicate with the existing docs, and add cross-links.
2020-10-29 15:29:52 -07:00
Alex Vandiver abb8b2166f docs: Fix name of realm rename function. 2020-10-26 12:48:56 -07:00
Steve Howell 0e7e4f1ad3 api feature level: Bump level for peer_add/peer_remove. 2020-10-26 07:18:08 -04:00
Alex Vandiver e3dacdadae help: Gitter imports do not use a token to fetch latest data.
This is a copy/paste error from the Slack import.
2020-10-23 16:47:28 -07:00
Anders Kaseorg 72d6ff3c3b docs: Fix more capitalization issues.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-23 11:46:55 -07:00
sahil839 1d5aa2e514 settings_org: Add frontend to change wildcard_mention_policy.
We add dropdown for wildcard_mention_policy in organization
permissions page.
2020-10-22 15:00:27 -07:00
Mateusz Mandera ec8fcf3a04 docs: Fix duplication in apple-error.md config error page.
SOCIAL_AUTH_APPLE_TEAM was repeated twice.
2020-10-22 12:07:46 -07:00
akshatdalton 1abae8baaa docs: Update guidelines to URL-encode stream name or topic name.
Updated create-bot-construct-url-indented.md file with
guidelines on how to URL-encode stream name and topic
name. The hyperlink added will solve the issue for those
who use emoji in stream name or topic name.

Tweaked by tabbott to edit the copy and update the non-indented
version as well.

Fixes #16430.
2020-10-21 11:14:42 -07:00
Tim Abbott 2ba76c8289 docs: Merge Zoom and BBB configuration pages. 2020-10-18 15:10:23 -07:00
strifel 1ed1614c9d docs: Add more specific Big Blue Button documentation. 2020-10-18 15:03:16 -07:00
the-rdt 03005dacdb preview_message_area: Use simplebar scrollbar.
Add `data-simplebar` attribrute to `preview_message_area` div in
`templates/zerver/app/compose.html`.

This will cause preview_message_area div to use simplebar scrollbar
instead of normal scrollbar.

Fixes #16468.
2020-10-18 14:35:16 -07:00
Aman Agrawal 8297121050 Revert "login: Fix alignment of error message in login form."
This reverts commit 6fe82620df.

Reverted since this misaligns other forms which use the same
class.
2020-10-18 14:06:20 -07:00
Anders Kaseorg dd48dbd912 docs: Add spaces to “check out”, “log in”, “set up”, “sign up” as verbs.
“Checkout”, “login”, “setup”, and “signup” are nouns, not verbs.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-10-13 15:47:13 -07:00
shanukun 537051e4f1 api docs: Fix JavaScript example for /streams api endpoint.
This commit fixes the JavaScript tab in 'Usage example'
for 'Get all streams' that currently shows python code.
2020-10-11 23:12:33 -07:00
Aman Agrawal 6fe82620df login: Fix alignment of error message in login form. 2020-10-07 16:18:54 -07:00
Tim Abbott 914862f8cd docs: Fix text for requesting an integration. 2020-10-01 17:29:17 -07:00
sahil839 78b98d8067 realm: Add wildcard_mention_policy setting.
We add a new wildcard_mention_policy setting to handle wildcard
mentions in large streams, with a wide range of policies available to
organizations.

We set the default to the safe option for preventing accidental spam:
only stream administrators being able to use wildcard mentions in
large streams.
2020-10-01 12:18:03 -07:00
Anders Kaseorg 57cb95af9f docs: Show simple POSIX shell quoting in send-message documentation.
This reverts commit 5275d49f05
(effectively), which created more problems than it solves.  #8484 is
not a bug: a newline can be included literally with no escaping within
POSIX quotes.  Meanwhile, $"" is a bashism, and not even the correct
bashism: it translates strings using the LC_MESSAGES catalog.  If the
user wants to do something complicated, they can consult the
documentation for their shell.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-30 17:31:55 -07:00
Gittenburg b245e1e49a compose: Display Formatting button as "Help".
The Formatting button that opens our Markdown help popover previously
had an "A" as its icon (the Font Awesome icon for font). This commit
changes the link to spell out "Help" to make it more discoverable.
2020-09-25 16:47:44 -07:00
Gittenburg 0c6df114f6 compose: Reorder message action buttons.
Now that they are tab accessible, we should order them by importance.
Previously the order was:

1. Add emoji
2. Formatting
3. Attach files
4. Add video call
5. Preview
6. Drafts

This commit changes the order to:

1. Attach files
2. Preview
3. Add video call
4. Add emoji
5. Drafts
6. Formatting

The "Add emoji" button is moved back because emojis can be more
conveniently entered using the typeahead triggered with ":" or the
emoticon conversions.
2020-09-25 16:47:43 -07:00
Dinesh 043146fa83 reset_password: Change reset password page heading. 2020-09-25 16:24:18 -07:00
Dinesh 232eb8b7cf auth: Render config error page on configuration error.
We previously used to to redirect to config error page with
a different URL. This commit renders config error in the same
URL where configuration error is encountered. This way when
conifguration error is fixed the user can refresh to continue
normally or go back to login page from the link provided to
choose any other backend auth.

Also moved those URLs to dev_urls.py so that they can be easily
accessed to work on styling etc.

In tests, removed some of the asserts checking status code to be 200
as the function `assert_in_success_response` does that check.
2020-09-25 16:16:17 -07:00
Anders Kaseorg faf600e9f5 urls: Remove unused URL names and shorten others.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-22 10:46:28 -07:00
Sumanth V Rao 2b9f7916c5 api: Document markdown changes for code blocks and bump API_FEATURE_LEVEL. 2020-09-18 17:15:47 -07:00
Aman Agrawal 2bc3924672 move_topic_to_stream: Allow moving to/between/from private streams.
Fixes #16284.

Most of the work for this was done when we implemented correct
behavior for guest users, since they treat public streams like private
streams anyway.

The general method involves moving the messages to the new stream with
special care of UserMessage.

We delete UserMessages for subs who are losing access to the message.
For private streams with protected history, we also create UserMessage
elements for users who are not present in the old stream, since that's
important for those users to access the moved messages.
2020-09-14 15:00:55 -07:00
Kaustubh Nair acf31f8934 docs: Add community_topic_editing_limit_seconds value to docs.
This was added to the response in e242ddc. Specifying the value
makes sure that the user does not have to dig in the commit history.
2020-09-11 15:48:08 -07:00
Alex Vandiver d04db7c5fe webhooks: Remove repetitive argument to UnsupportedWebhookEventType.
The name of the webhook can be added by the webhook decorator.
2020-09-10 17:47:21 -07:00
Alex Vandiver cf6ebb9c8d webhooks: Rename api_key_only_webhook_view to webhook_view.
There are no other types of webhook views; this is more concise.
2020-09-10 17:47:21 -07:00
Alex Vandiver 9ea9752e0e webhooks: Rename UnexpectedWebhookEventType to UnsupportedWebhookEventType.
Any exception is an "unexpected event", which means talking about
having an "unexpected event logger" or "unexpected event exception" is
confusing.  As the error message in `exceptions.py` already explains,
this is about an _unsupported_ event type.

This also switches the path that these exceptions are written to,
accordingly.
2020-09-10 17:47:21 -07:00
Alex Vandiver 8016769613 webhooks: Move UnexpectedWebhookEventType into zerver.lib.exceptions.
8e10ab282a moved UnexpectedWebhookEventType into
`zerver.lib.exceptions`, but left the import into
`zserver.lib.webhooks.common` so that webhooks could continue to
import the exception from there.

This clutters things and adds complexity; there is no compelling
reason that the exception's source of truth should not move alongside
all other exceptions.
2020-09-10 17:47:21 -07:00
Tim Abbott 7b62d31c32 invite: Set tabindex for 'Generate invite link'. 2020-09-04 13:03:27 -07:00
gr455 a8511bc710 docs: Add alt text to images
Add alt text to images in docs roughly stating the contents of the
image.
2020-09-04 12:56:07 -07:00
Anders Kaseorg edaed497ed lint: Remove unused ignorelongline and lint:ignore comments.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-09-02 11:00:44 -07:00
Aman Agrawal 6062db765b hello: Don't override bootstrap.js by fetching from CDN.
third/bootstrap/js/bootstrap.js is now reset at v2.3.2, so it
doesn't make sense to be fetch the same version again from CDN.
2020-08-31 14:01:11 -07:00
sahil839 fbae1685d6 openapi: Fix examples in response for deactivating user endpoints.
This commit fixes examples in "400" response for deactivating user
endpoints to have msg as "Cannot deactivate the last organization
owner" instead of "Cannot deactivate the last organization
administrator".

We had already removed the restriction on deactivating last admin
and added it for last owner, while adding owner role.
2020-08-30 17:12:57 -07:00
Tim Abbott d3b62b9f2d api: Further clean up outgoing webhook docs. 2020-08-28 16:47:16 -07:00
orientor 12efa41ed6 api_docs: Add response details to outgoing webhooks documentation.
Improve OpenAPI documentation of /zulip-outgoing-webhook by moving
data and making appropriate additions from its couterpart in the
/outgoing-webhook docs. Then remove the redundant documentation
from the doc and add command to render OpenAPI documetation. Also
add a test to outgoing_webhooks_interface.py to ensure that OpenAPI
documentation is correct.

Fixes #16203.
2020-08-28 16:47:10 -07:00
Kartik Srivastava 0b77525814 api docs: Document POST /user_groups/{group_id}/members endpoint. 2020-08-26 15:40:19 -07:00
Kartik Srivastava 7677ba2d2b api docs: Rename 'group_id' to 'user_group_id'.
This renames 'group_id' to 'user_group_id' in the api docs to remove
the naming mismatch between the url config and the docs and eventually
remove the 'user_groups' endpoints from 'pending_endpoints' in
test_openapi.py.
2020-08-26 15:40:19 -07:00
Kartik Srivastava 190701a062 api docs: Document POST /realm/profile_fields api endpoint. 2020-08-26 12:48:16 -07:00
Kartik Srivastava b74bf64c9d api docs: Document PATCH /realm/profile_fields endpoint. 2020-08-26 12:48:16 -07:00
Kartik Srivastava f8d6b9755a api docs: Document GET /realm/profile_fields endpoint. 2020-08-26 12:48:16 -07:00
Tim Abbott f39a90b808 help: Clean up documentation for Jitsi link. 2020-08-26 12:31:52 -07:00
Vishnu KS 963ecc3e87 plans: Mention the request sponsorship feature.
Tweaked by tabbott to provide a better link.
2020-08-24 18:31:48 -07:00
orientor 372e010dbb events: Add `op` field to `update_message_flags` events.
`update_message_flags` events used `operation` instead of `op`, the
latter being the standard field used in other events. So add `op`
field to `update_message_flags` and mark `operation` as deprecated,
so that it can be removed later.
2020-08-24 12:42:03 -07:00
Steve Howell ef5de173fe webhook docs: Avoid misleading `get_body` references.
For most cases you don't need to override `get_body`,
and for non-trivial cases, there's really no set pattern.

(It would be nice if we didn't default to json extensions
and just forced folks to be explicit about file extensions,
which would remove a whole class of `get_body` overrides.)
2020-08-24 12:34:46 -07:00
Steve Howell 2fdf966d9f webhook tests: Rename helper to send_webhook_payload.
Not all webhook payloads are json, so send_json_payload was a
bit misleading.

In passing I also remove "bytes" from the Union type for
"payload" parameter.
2020-08-24 12:34:46 -07:00
Steve Howell 388053db6b webhook tests: Rename main helper to check_webhook.
Almost all webhook tests use this helper, except a few
webhooks that write to private streams.

Being concise is important here, and the name
`self.send_and_test_stream_message` always confused
me, since it sounds you're sending a stream message,
and it leaves out the webhook piece.

We should consider renaming `send_and_test_private_message`
to something like `check_webhook_private`, but I couldn't
decide on a great name, and it's very rarely used.  So
for now I just made sure the docstrings of the two
sibling functions reference each other.
2020-08-24 12:34:46 -07:00
Priyansh Garg ba119a2f20
help: Fix typo in change-organization-url. 2020-08-24 12:22:17 -07:00
Sumana Harihareswara 47fe7b7d13 docs: Capitalize proper noun.
Signed-off-by: Sumana Harihareswara <sh@changeset.nyc>
2020-08-18 11:16:22 -04:00
sahil839 f046c9c58a streams: Add role field to Subscription objects passed to clients.
This commit adds "role" field to the Subscription objects passed to
clients.  This is important preparation for being able to work on the
frontend for this feature.
2020-08-14 16:33:11 -07:00
shanukun 5c6d42c6a5 navbar_alerts: Change HTML ordering for obvious tab order.
Fixes #16079.
2020-08-14 15:59:44 -07:00
shanukun aa6f2b1310 navbar_alerts: Fix navbar alerts inaccessibility.
Part of #16079.
2020-08-14 15:57:48 -07:00
Gittenburg 2545703b58 compose: Add role=button to message control buttons.
Fixes #9143. Part of #15910.
2020-08-14 15:49:14 -07:00
Gittenburg 05e792ec1a compose: Move send button after textarea in DOM.
This restores the Tab + Enter shortcut to send.

We are floating the send button to the right so that it still looks like
before. Instead of moving the button we could have also given every
message control button a tabindex, but these would be cumbersome to
maintain.

Tweaked by tabbott to add a comment recording the reasoning behind
the somewhat unusual CSS here.

Part of #15910.
2020-08-14 15:48:49 -07:00
Gittenburg 3b0694693b compose: Make message control buttons accessible.
Previously the emoji picker, the formatting help, the button to attach
files, the video call button, the Drafts button and the Press Enter to
send checkbox were all inaccessible from the keyboard.

This does break the Tab + Enter workflow for sending messages, which is
fixed in the next commit by moving the Send button to be the first
element after the textarea.

Part of #15910.
2020-08-14 15:46:50 -07:00
Tim Abbott b494b16791 meta tags: Use open graph titles/descriptions.
Apparently, we were incorrectly using constants for title/description
rather than the nice non-constant values from og:title and
og:description in our meta tags.
2020-08-14 10:58:18 -07:00
Tim Abbott 201df3432d help: Document Full Members more extensively.
Also reorder the Billing Administrator feature to not interrupt the
owner/admin/member/guest sequence, and add some important cross-links.
2020-08-13 16:42:12 -07:00