Commit Graph

27041 Commits

Author SHA1 Message Date
Aditya Bansal b10822efcf subscriptions.scss: Remove dead CSS.
We remove css which has been dead since convertion of subscriptions
page to an overlay. This should ideally have been dealt with in
commit 1886f0a which actually did the converstion but we forgot to
handle it at that time.
2018-07-04 23:51:45 +05:30
Aditya Bansal 69904e04d8 help: Remove dead css and js left over from the time of redesign.
This removes some left over dead code from the redesign which was
introduced in commit 1cf7ee.
2018-07-04 23:51:45 +05:30
Aditya Bansal e3aa479cc3 zulip.scss: Remove dead CSS from 2013.
We remove the dead CSS which was introduced in commit 963a93367
back in 2013 and doesn't seem to have any use now. Its probably
the case that we removed the actual html structure which used this
CSS since 2013 and forgot to clean up the css part.
2018-07-04 23:51:45 +05:30
Aditya Bansal 4f090861e7 admin_streams_list.handlebars: Remove since its dead.
This was killed when the "Deleted Streams" feature was dropped
in commit 7bbe44d7 but we forgot to deal with it at the time.

squash to admin_streams_list
2018-07-04 23:51:45 +05:30
Aditya Bansal db7448c4e3 subs: Remove dead css and js left over from a redesign.
This cleans up some leftover js and css from the effort of
redesign the rows of the #subscriptions table. Redesign happened
in commit 368b5859 and but we forgot to clean up these js and css
pieces.

squash to subs.js.
2018-07-04 23:51:45 +05:30
Raymond Akornor 5ef6689a69 minified_js: Clean up unused imports. 2018-07-04 17:38:55 +02:00
Yago González fa2daf0044 api docs: Migrate POST /users/me/subscriptions to OpenAPI. 2018-07-03 20:15:34 +02:00
Yago González f3277500de api docs: Add missing space in exception's message. 2018-07-03 20:11:05 +02:00
Yago González 2d1adc8d99 api docs: Allow validation against schemas for any response. 2018-07-03 20:11:05 +02:00
Tim Abbott 5a99118b3e auth: Restore a minimal SocialAuthMixin.
We need to do a small monkey-patching of python-social-auth to ensure
that it doesn't 500 the request when a user does something funny in
their browser (e.g. using the back button in the auth flow) that is
fundamentally a user error, not a server error.

This was present in the pre-rewrite version of our Social auth
codebase, without clear documentation; I've fixed the explanation
part here.

It's perhaps worth investigating with the core social auth team
whether there's a better way to do this.
2018-07-03 18:53:59 +02:00
Tim Abbott c9b0c0add4 github: Refactor email extraction to use the full emails data set.
It's possible to make GitHub social authentication support letting the
user pick which of their verified email addresses to pick, using the
python-social-auth pipeline feature.  We need to add an additional
screen to let the user pick, so we're not adding support for that now,
but this at least migrates this to use the data set of all emails that
have been verified as associated with the user's GitHub account (and
we just assume the user wants their primary email).

This also fixes the inability for very old GitHub accounts (where the
`email` field in the details might be a string the user wanted on
their GitHub profile page) to using GitHub auth to login.

Fixes #9127.
2018-07-03 18:35:29 +02:00
Anders Kaseorg d8ba378050 test_slack_importer: Remove backslashes wrongly copied from JSON data
https://github.com/houstondatavis/slack-export/blob/master/users.json

JSON or JavaScript decodes "\/" to / (and some encoders always write
"\/" to avoid accidentally creating a </script> tag), while Python
assumes "\/" is a typo for "\\/" and decodes it to \/.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-03 16:54:46 +02:00
Anders Kaseorg 037f696d26 Enable pycodestyle W605 (invalid escape sequence).
The only changes visible at the AST level, checked using
https://github.com/asottile/astpretty, are

zerver/lib/test_fixtures.py:
'\x1b\\[(1|0)m' ↦ '\\x1b\\[(1|0)m'
'\\[[X| ]\\] (\\d+_.+)\n' ↦ '\\[[X| ]\\] (\\d+_.+)\\n'

which is fine because re treats '\\x1b' and '\\n' the same way as
'\x1b' and '\n'.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-03 16:54:46 +02:00
Steve Howell 7b8d3023f5 Fix saving of collapsed flags.
This was broken in 7a362861.  It was a refactoring
related to cleaning up unread flags.
2018-07-03 06:05:22 -07:00
Steve Howell 41b6999428 node tests: Test message_flags.toggle_starred. 2018-07-03 06:05:22 -07:00
Shubham Padia 17cbafe0e0 bot settings: Scroll to bottom after showing bot_error.
Fixes #9868.
The error went unnoticed as the error remains hidden below due to
the scrollable div.
2018-07-03 06:02:49 -07:00
Shubham Padia d07f5eef22 bot settings: Change top and bottom margins of bot_error. 2018-07-03 06:02:49 -07:00
Steve Howell d90d1a04bb bot settings: Clean up error handling.
The error handling for delete/reactivate was broken.
The old code related to appending id_suffix to the ids of
the per-bot error divs did not have corresponding
selectors in the actual error handling.

Things still aren't great, but there's a bit more
encapsulation now, and you'll see errors for the
delete/reactivate cases.
2018-07-03 06:02:49 -07:00
Steve Howell fef98c932b bot settings: Fix reactivation feature.
The reactivation feature was broken, because the
template was still using email when we were looking
for user_id.
2018-07-03 06:02:49 -07:00
Steve Howell 26b48b95dc refactor: Export settings_bots.render_bots().
We also now call this explicitly when we need to
re-render (instead of triggering a custom event).
2018-07-03 06:02:49 -07:00
Shubham Dhama b938523592 widgets: Increase node tests coverage to 100%. 2018-07-03 08:48:49 -04:00
Shubham Dhama 98e6b287b5 zjquery: Implement empty function for when there is no argument. 2018-07-03 08:48:49 -04:00
Shubham Dhama 617c79545a widgets: Extract function for current list update on narrow deactivation. 2018-07-03 08:48:49 -04:00
Steve Howell 1fdfe11e8b node tests: Add tests for voting_widget.js.
This first commit starts by testing handling of
inbound data.
2018-07-02 13:46:30 -04:00
Jack Zhang 456c8fed83 user-docs: Remove save-changes macro from configure-mobile-notifications.md.
The instruction to click a 'Save changes' button is incorrect, the
account settings UI automatically saves changes.
2018-07-02 10:40:11 -07:00
Jack Zhang 69fd8f2896 user-docs: Remove save-changes macro from configure-email-notifications.md.
The instruction to click a 'Save changes' button is incorrect, the
account settings UI automatically saves changes.
2018-07-02 10:40:11 -07:00
Jack Zhang 66a37558d4 user-docs: Remove save-changes macro from configure-email-digest-notifications.md.
The instruction to click a 'Save changes' button is incorrect, the
notifications settings UI automatically saves changes.
2018-07-02 10:40:11 -07:00
Jack Zhang 22cc3f9d74 user-docs: Remove save-changes macro from change-a-users-name.md.
The instruction to click a 'Save changes' button is incorrect, the
account settings UI automatically saves changes.
2018-07-02 10:40:11 -07:00
Rhea Parekh 7c7e3dcd3f slash commands: Add /settings command. 2018-07-01 20:32:36 -04:00
Rhea Parekh fdef1d8d91 zcommand: Raise error when command doesn't begin with a slash. 2018-07-01 20:32:36 -04:00
Rhea Parekh b22d266667 widgets: Add question for poll widget in the message itself.
Use the command '/poll question?', to start a question.
2018-07-01 19:56:19 -04:00
Rhea Parekh 784e7249a5 widgets: Add question in the poll widget itself.
The user can also edit the question after adding it.

The question in the poll can only be added/edited
by the user who started the poll.

The input bar will be disabled for the other users
if the question is not yet added. If the question is
added, the input bar will not be visible to the other
users.
2018-07-01 19:56:19 -04:00
Rhea Parekh 3d5cecdad5 widgets: Avoid voting while adding a new option in poll widget. 2018-07-01 19:56:19 -04:00
Rhea Parekh 19725b74d5 widgets: Add basic styling for poll widget. 2018-07-01 19:56:19 -04:00
Lenny Jagielski b9393387e1 integrations: Fix heroku integration logging.
Now, every line in the commit log is properly quoted, but using a
Zulip markdown block quote (rather than just a single `>`).

Fixes: #9792
2018-07-01 12:43:31 -07:00
Eeshan Garg bf175f6331 webhooks/github: Add support for PR review requests.
Fixes: #9732.
2018-07-01 12:40:45 -07:00
Eeshan Garg 04ed123214 webhooks/github: Be more explicit about unsupported PR events.
This was technically a bug. For events that aren't unsupported
intentionally, the control should fall to the line that raises
UnknownWebhookEventType, and shouldn't be handled by anything else.

The events that are intentionally unsupported should be handled
more explicitly.
2018-07-01 12:40:45 -07:00
Rhea Parekh 2673a7f71f widgets: Add basic styling for tictactoe widget. 2018-07-01 15:09:18 -04:00
Yago González bba8b88707 api docs: Explain clearly how to create new streams.
Tweaked significantly by tabbott to cover this more clearly.
2018-07-01 08:41:37 -07:00
Eeshan Garg 3f40240017 pypi_packages: Upgrade to release 0.5.1. 2018-07-01 08:17:17 -07:00
Yago González d151f4a234 messages: Allow fetching unedited messages' history.
When GETting an unedited message's edit history, the server wasn't able
to reply properly and produced a 500 error.

Now when that happens, we return a message history that only contains
the original message.
2018-07-01 08:16:59 -07:00
Rhea Parekh 838ab2fce5 export: Add variable MESSAGE_BATCH_CHUNK_SIZE in export.py.
Also use this variable in slack_data_to_zulip_data.
2018-07-01 07:08:13 -07:00
Rhea Parekh 6b7b6b38ad slack import: Write messages batch-wise.
Messages can be bulky, and storing them in a single
data structure can cause a memory error.

In this commit, the messages are written to a file
batch-wise, thus avoiding the memory error.
2018-07-01 07:08:13 -07:00
Rhea Parekh 7f6c174099 slack import: Add 'id_list' field in channel_message_to_zerver_message.
The id_list would help to store the associated max ID
state between subsequent calls, which will help
in batch-wise processing of the messages.
2018-07-01 07:08:13 -07:00
Rhea Parekh af20ef4789 slack import: Save messages within convert_slack_workspace_messages.
Previously, the messages where being stored in a output file from
outside the function 'convert_slack_workspace_messages', but
now we store it from the inside the mentioned function.
This will help in processing and saving the messages batch-wise
so as to avoid a memory error.

Reactions are returned separately from 'convert_slack_workspace_messages'
rather than 'message_json'.

Also updated test for 'convert_slack_workspace_messages' and an additional
test for reactions is added.
2018-07-01 07:08:13 -07:00
Rhea Parekh 2f88ca7446 slack import: Import skype and phone data of users. 2018-07-01 07:05:40 -07:00
Tim Abbott ddc2ef2ce8 docs: Point Docker users to the Docker upgrade docs.
The normal instructions don't make sense for the Docker image.
2018-07-01 06:58:44 -07:00
Aditya Bansal 3cf8ba33d8 integrations: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-01 06:02:10 -07:00
Yago González 9a2036b52a api docs: Make the Home page more straightforward.
Fixes #9854.
2018-07-01 04:33:04 -07:00
Eeshan Garg 061e760d1e webhooks: Add Clubhouse integration. 2018-07-01 04:01:17 -07:00