Commit Graph

24741 Commits

Author SHA1 Message Date
Cynthia Lin f0f6bdf077 compose: Improve error message for mentioning unsubcribed users.
Previously, some users were confused as to whether or not they needed
to hit the subscribe button here.

Fixes #8550.
2018-03-06 13:00:45 -08:00
Xavier Cooney 769052d9c7 css: Allow the bot API key to be selected on all browsers.
The problem that prompted this PR is that I couldn't select the API
key of a bot in chrome to copy it, but I could on Firefox.

Using the `auto` proerty value to override the `user-select`
property  of a parent does not seem to be compatible
with all browsers.
2018-03-06 12:55:53 -08:00
Eeshan Garg 12c4a8293d webhooks/crashlytics: Update the text.
This commit:

* Restructures the doc to use a numbered-step format.

Note that there are no screenshots. I signed up for a
Fabric/Crashlyics account but you have to link an Android/iOS app
to even get to the settings panel, which seemed like too much work
just to get a screenshot.

However, the way we can verify (somewhat) the correctness of the
last step is that it is a paraphrase of the first paragraph of
Fabric's Webhook docs, which can be found here:

https://docs.fabric.io/apple/crashlytics/custom-web-hooks.html
2018-03-06 12:52:22 -08:00
Eeshan Garg 53ccbdcfd6 webhooks/dropbox: Update text and remove screenshots.
This commit modifies the text to:

1. Removes unnecessary screenshots.

2. Use the numbered-style format.

3. I also removed the instructions for generating an access token.
   I took a look at Dropbox's docs and you shouldn't need that
   for a webhook setup. The whole point behind a webhook is that
   one can get by without using OAuth.

4. Rearranges the instructions to only contain 4 steps. For
   uncomplicated instructions, that seems to be the ideal number.
2018-03-06 12:52:22 -08:00
YJDave a059247398 message editing: Fix bugs in `recipient-row` template rendering.
In `recipient-row` template, if conditions to add/hide/show edit
icon for message topic is incorrect.
In some cases, we only want to just hide the edit icon, but icon
should be in DOM, cause in future if organization settings are
changed we want to show edit icon in message row.

If user can edit topic of message, surely add edit icon element to
DOM regardless of user is allowed to edit or not. If user is
allowed to edit then show edit icon otherwise hide edit icon element.
2018-03-06 07:17:28 -08:00
YJDave eb67c46928 message editing: Move update msg-topic-edit-icon func to `message_edit.js`.
Move function `update_message_topic_editing_pencil` to file
`message_edit.js` from `settings_org.js`.
2018-03-06 07:17:28 -08:00
YJDave a4366d9a6d message editing: Clean update msg-topic-edit-icon function.
`update_message_topic_editing_pencil` function update edit
icon for message topic in message row header.

- Remove erroneous `meta.loaded` check.
- Add proper check of message editing permission in realm
  before updating message-topic-edit-icon in function.
- Update `always-visible-topic-edit` element in function
  simultaneously.
2018-03-06 07:17:28 -08:00
YJDave d360a70523 static/js/settings_org.js: Rename func which updates msg-topic-edit-pencil.
Rename `toggle_allow_message_editing_pencil` to
`update_message_topic_editing_pencil` in `settings_org.js`.
As this function update the pencil icon for updating message
topic in message row header.
2018-03-06 07:17:28 -08:00
Aditya Bansal 06cabc1e8a popovers: Fix issue with user-info-popover in legacy mention messages.
We fallback to using data-user-email attrib for mention messages
from the times when we use to expose user emails to frontend.
This is only required for cases where we are dealing with anything
that isn't rendered dynamically (like the messages that were already
sent and stored long time ago). Hopefully we won't be needing this
kind of fallback logic in more places so I am putting off efforts
to try to extract fallback logic for common use. Also this is like
this because it will probably be tricky to extract out a common
fallback logic in this case because of different situations involved.

Fixes: #8588.
2018-03-06 06:41:17 -08:00
Shivam Gera baffcf0948 Fix: broken link zulip/zulipbot 2018-03-05 10:51:56 -08:00
Shubham Dhama 3fb862533f upload: Fix upload under message edit mode when edited using hotkeys.
This refactors the attachment of jQuery-filedrop handler into
`message_edit.start_edit_with_content`.
2018-03-05 10:42:38 -08:00
Tommy Ip 5ee6c608c0 message edit: Allow uploading files.
Fixes: #198.
2018-03-05 10:42:38 -08:00
Tim Abbott 787d5c50e0 upload: Inline clear_out_file_list.
This provides a slightly clearer interface, allowing us to remove the
unnecessary split of the code for the clone_file_input concept across
multiple modules (we now just clone it on-demand).
2018-03-05 10:42:38 -08:00
Tim Abbott f253f96211 lint: Add "Gravatar" to capitalized terms in linter. 2018-03-05 10:29:18 -08:00
Anupam-dagar f531d37e4f Reorder "create bot UI" for embedded bots.
Fixes: #8580
2018-03-05 10:22:00 -08:00
synicalsyntax a615b21bde signup: Wrap hostname overflow with scrolling in realm creation form.
Tweaked by tabbott to adjust the widths a bit.

Fixes #8488.
2018-03-05 09:47:35 -08:00
Tim Abbott 3d8e45f1cb cache: Avoid caching /help/ documentation page content.
This should make it a lot less annoying to edit these pages locally,
without regressing the test performance which motivated the cache.
2018-03-05 09:26:58 -08:00
amanagr 4d2c6efa09 help: Correct broken link and clarify email gateway integration.
This helps make it clear that this feature isn't supported on all
Zulip installations.
2018-03-05 09:26:10 -08:00
Rhea Parekh 416f11030f user settings: Display avatar source.
This makes it easier for users to tell how Zulip ended up with an
avatar for them without them uploading one: through the Gravatar
service used across many Wordpress blogs.

Fixes #8225.
2018-03-05 09:12:59 -08:00
Aditya Bansal 9eeb1c59f6 bugdown: Remove email from rendered content of messages with mentions.
This field has been unused by clients for some time, and isn't great
for our public archive feature plans (where we'll not want to be
including email addresses in messages).
2018-03-04 20:04:27 -08:00
YJDave d36ec962bb deactivation-stream-modal: Make stream name a template variable.
In stream deactivation modal, make "stream_name" a template variable,
rather than patching stream name to modal header in javascript.
Add tests for deactivation stream modal.
2018-03-04 19:26:50 -08:00
YJDave 8ba91e48c1 stream settings: Add delete stream button.
Add option to delete stream in stream setting page for
realm admins only.
2018-03-04 19:26:50 -08:00
YJDave 077e56e3b6 static/js/settings_streams.js: Refactor delete stream method. 2018-03-04 19:26:50 -08:00
Tim Abbott 14f1f10662 display_settings: Mark night mode as no longer experimental.
It's now been tested enough to be a solid feature.
2018-03-04 19:24:11 -08:00
Tim Abbott fb340811a4 display_settings: Fix pencil being lost updating default language.
The HTML was just done sloppily in the first version of this feature.
2018-03-04 19:23:58 -08:00
Tim Abbott 9acf30b3d3 display_settings: Fix real-time sync of default language.
We apparently weren't sending to the frontend the data needed to
update the display of the current language.
2018-03-04 19:23:58 -08:00
Tim Abbott c9724fe284 display_settings: Clean up and mark real-time sync issues.
This fixes the real-time sync of the settings state for night mode,
and also makes it clear where a few outstanding bugs are in this
page's sync.
2018-03-04 18:38:14 -08:00
Tim Abbott c672a1c112 settings: Fix real-time sync for display settings.
The conditional we previously had in server_events.js was always
false.
2018-03-04 18:32:05 -08:00
Tim Abbott cec34302be settings_ui: Move main function for new settings system to library code.
This should make it much easier to convert other checkboxes in the
product to use this mechanism.
2018-03-04 18:26:27 -08:00
Tim Abbott 4d8e18e58f settings: Move display_checkmark to settings_ui.js. 2018-03-04 18:26:27 -08:00
Tim Abbott 6a06e453c7 display_settings: Extend de-duplication of unnecessary logic.
We add a new option to the change_display_setting function to support
cases with a custom on-success or on-failure message.
2018-03-04 18:09:46 -08:00
Tim Abbott 7dbd515191 settings: De-duplicate code for managing display settings.
Now that we have a common framework here, there's no need for so many
copies of the channel.post logic.
2018-03-04 17:59:54 -08:00
Balaji2198 5aa7098c81 display_settings: Change success/failure feedback interface.
This replaces the cumbersome system we had for giving users feedback
on settings state changes in the display settings UI.

We expect this new system to be what we will attempt to migrate other
settings widgets to match over the coming weeks and months.  It also
provides the opportunity to significant refactor away a lot of the
code duplication in settings_display.js.

Thanks to Brock Whittaker for redoing the styling and improving the
code simplicity.

Fixes #7622.
2018-03-04 17:47:05 -08:00
Balaji2198 b846ab1000 settings: Change wordings of all alert-status in Display settings. 2018-03-04 16:36:56 -08:00
Tim Abbott a3ca7ee1c7 lint: Add a few strings to capitalization linter.
My hope is that we'll be able to eliminate these strings from the UI
altogether soon, but this is needed to keep CI passing for now.
2018-03-04 16:34:00 -08:00
Yago González bb83486509 i18n: Keep URLs from being translated. 2018-03-04 15:44:12 -08:00
Yago González b475e74c47 i18n: Fix string interpolation. 2018-03-04 15:44:12 -08:00
Yago González c8ad1cf209 settings: Improve warning in signup notifications. 2018-03-04 15:44:12 -08:00
Yago González 48709b4890 i18n: Add new terms to the Spanish translation guide. 2018-03-04 15:44:12 -08:00
Cynthia Lin 777df12744 help: Hide y-scrollbar on collapsed sidebar view.
Closes #8497 and fixes #8495.
2018-03-04 15:42:48 -08:00
Marco Burstein bdb86f1b5e emoji: Add support for translating emoticons.
Add `translate_emoticons` to `prop_types` and `expected_keys`.
Furthermore, create a emoji-translating Markdown inline pattern.

Also use a JavaScript version of `translate_emoticons` and then use
this function during Markdown previews and as a preprocessor. This
is only needed for previews, because usually emoticon translation
happens on the backend after sending.

Add tests for emoticon translation, a settings UI, and a /help/ page
as well.

Tweaked by tabbott to fix various test failurse as well as how this
handles whitespace, requiring emoticons to not have adjacent
characters.

Fixes #1768.
2018-03-04 15:37:24 -08:00
Tim Abbott 038579b840 streams: Fix counts using only one data point.
We had the aggregation query for StreamCount done slightly wrong.
2018-03-04 14:06:29 -08:00
YJDave 8cd3e55fae default stream: Fix default stream suggestion do not include private stream.
Private streams were not included in stream suggestions for default streams
in org settings.
Remove function, which exclude private streams from stream suggestions
for default streams.
2018-03-04 13:42:28 -08:00
Robert Hönig 81ba7a1e40 Mark DigestWorker and PushNotificationsWorker as nocoverage.
These two classes are tricky to test, and nocoverage-ing them
allows us to mark queue_processors.py as fully covered. We
still want to cover these two workers at some point, but for
now, it's nice to enforce full coverage for any future changes
to queue_processors.py.

Fixes (sort of) #6542.
2018-03-04 13:31:33 -08:00
Robert Hönig 93b2f0ea35 Mark MissedMessageSendingWorker as nocoverage.
The MissedMessageSendingWorker queue will be removed
after the 1.8 release, so covering it in tests is
useless.
2018-03-04 13:31:33 -08:00
Robert Hönig e69af3011e Add basic test for FeedbackBot.
This sets up a new test class with a simple
test, mostly for increasing coverage. The class
should in the future be extended to properly
verify the handle_feedback() logic.
2018-03-04 13:31:33 -08:00
Robert Hönig 4381ce74aa EmbeddedBotWorker: Remove @-mention check.
We already check in get_service_bot_events() if a bot is mentioned,
and then only pass on the call to the bot handler if it is. The
commit removes the additional check in the embedded bot queue
processor simply because it is impossible to obtain test coverage
for it (there is no meaningful way to trigger the content of the
if-clause, because there will never be a message reaching the bot
without @-mentioning it.

To alleviate the danger of a potential regression, the check is not
removed completely, but rather replaced by an assert statement.
2018-03-04 13:31:33 -08:00
Archana BS c7650c0d9d streams: send data for recent streams traffic to frontend.
Significantly edited by Tim Abbott and Vishnu Ks.
2018-03-04 13:24:53 -08:00
Vishnu Ks 385ee95038 streams: Show subscriber count icon before count. 2018-03-04 13:20:06 -08:00
Archana BS b5a860b234 analytics: Populate messages_in_stream:is_bot:day in dev. 2018-03-04 13:17:00 -08:00