Commit Graph

25920 Commits

Author SHA1 Message Date
Vishnu Ks 1eaaecb69a requirements: Upgrade Sphinx to 1.7.4. 2018-05-03 20:39:56 -07:00
Vishnu Ks 27193b0ecc requirements: Upgrade premailer to 3.2.0. 2018-05-03 20:39:56 -07:00
Vishnu Ks a1821fd27d requirements: Upgrade pip-tools to 2.0.2. 2018-05-03 20:39:56 -07:00
Vishnu Ks bf610f6570 requirements: Upgrade Pillow to 5.1.0. 2018-05-03 20:39:56 -07:00
Vishnu Ks 0e9fda033a requirements: Upgrade ndg-httpsclient to 0.5.0. 2018-05-03 20:39:56 -07:00
Vishnu Ks 8182a3bf4c requirements: Upgrade moto to 1.3.3. 2018-05-03 20:39:56 -07:00
Vishnu Ks 440d458313 requirements: Upgrade ipython to 6.3.1. 2018-05-03 20:39:56 -07:00
Vishnu Ks 1b0c647ded requirements: Upgrade google-api-python-client to 1.6.7. 2018-05-03 20:39:56 -07:00
Vishnu Ks 0542af1ec2 requirements: Upgrade gitlint to 0.10.0. 2018-05-03 20:39:56 -07:00
Vishnu Ks bb5dabb33c requirements: Upgrade disposable-email-domains to 0.0.26. 2018-05-03 20:39:56 -07:00
Vishnu Ks 69fe367771 requirements: Upgrade certifi to 2018.1.18. 2018-05-03 20:39:56 -07:00
Armaan Ahluwalia cca10beb78 css/webpack: Moved archive styles to webpack bundle.
This commit moves the stylesheets under the archive bundle in
the Django pipeline to being compiled by webpack instead. It
also removes a remaining call to a portico stylesheet that no
longer exists.
2018-05-03 19:15:49 -07:00
Armaan Ahluwalia 54bf2a6231 css/webpack: Transition landing-page.css to webpack.
This commit transitions landing-page.css from the Django pipeline
to being compiled by webpack as landing-page.scss under the
'landing-page' and 'integration' bundles.
2018-05-03 19:15:23 -07:00
Armaan Ahluwalia 1c016e990d css/webpack: Transition common.css to webpack.
This commit transitions common.css from the Django pipeline
to being compiled by webpack under the common bundle.
2018-05-03 19:15:23 -07:00
Lyla Fischer aee02e2695 user docs: Add styling for keyboard_tip admonition. 2018-05-03 18:33:35 -07:00
Rohitt Vashishtha 7fef91a405 zblueslip: Convert node_tests/settings_user_groups.js to zblueslip. 2018-05-03 16:27:05 -07:00
Rohitt Vashishtha 22ca18f59c zblueslip: Convert node_tests/pm_list.js to zblueslip. 2018-05-03 16:27:05 -07:00
Rohitt Vashishtha c5d9a052c0 zblueslip: Convert node_tests/people.js to zblueslip. 2018-05-03 16:27:05 -07:00
Rohitt Vashishtha 8219d2dcf4 zblueslip: Convert node_tests/messge_store.js to zblueslip. 2018-05-03 16:27:05 -07:00
Rohitt Vashishtha f51e151e62 zblueslip: Convert node_tests/markdown.js to zblueslip.
Also allows comparing in zblueslip using toString() for cases like
comparing an `Error('hello')` object and a `'hello'`.
2018-05-03 16:27:05 -07:00
Rohitt Vashishtha cba2c529f9 zblueslip: Convert node_tests/activity.js to zblueslip. 2018-05-03 16:27:05 -07:00
Steve Howell a68fa980d3 Add starred messages to our new API for unread ids.
Even though starred messages are never unread, it's useful
for us to have helper functions for them.

This change makes it so that clicking on "Starred Messages"
takes you to the last read message immediately, without a
server delay.
2018-05-03 14:36:34 -07:00
Tim Abbott ad0cfb3512 validators: Add check_string_fixed_length.
This will be useful in some upcoming work on zilencer.
2018-05-03 14:30:03 -07:00
Tim Abbott 594451707d check_capped_string: Clean up corner case.
We were rejecting strings of length equal to the max.

While we're at it, fix the unnecessary period in the error message,
which doesn't align with similar validators.
2018-05-03 14:30:03 -07:00
Rishi Gupta d18102d1c6 zilencer: Remove uniqueness constraint on RemoteZulipServer.hostname.
Enforcing the unique constraint adds an unnecessary support burden for
figuring out who actually controls a given hostname, and in particular, for
verifying updates to the org id/key on a re-install of the Zulip server.
2018-05-03 12:50:29 -07:00
Rishi Gupta 42a99e8c1d zilencer: Rename remote_server_unregister_push. 2018-05-03 12:50:29 -07:00
Rishi Gupta 76650f5930 zilencer: Rename remote_server_register_push to register_remote_push_device. 2018-05-03 12:50:29 -07:00
Steve Howell 3e19efca36 Change narrow.get_first_read_id -> get_first_read_info.
This function, which is only used in tests so far, needs
to return something more meaningful than undefined when
we don't find an id.
2018-05-03 12:44:30 -07:00
Steve Howell 4eb033964e Add fetch_status.has_found_newest(). 2018-05-03 12:44:30 -07:00
Tim Abbott bd110ccb3c test-migrations: Add django_two_factor migrations to exclude list.
We don't control the names for these migrations.
2018-05-03 12:23:25 -07:00
Tim Abbott 42fe331093 echo: Fix exception when topic-editing locally echoed messages.
Previously, if you topic-edited locally echoed messages, it would
throw this exception:

TypeError: Cannot read property 'indexOf' of undefined
    at Object.h.is_status_message (https://chat.zulip.org/static/min/app.274582375298.js:1742:154)
           = static/js/markdown.js line 125 column 13

    at Object.h.apply_markdown (https://chat.zulip.org/static/min/app.274582375298.js:1741:291)
           = static/js/markdown.js line 93 column 29

    at Object.a.edit_locally (https://chat.zulip.org/static/min/app.274582375298.js:1750:195)
           = static/js/echo.js line 176 column 5

    at Object.d.save (https://chat.zulip.org/static/min/app.274582375298.js:1921:376)
           = static/js/message_edit.js line 132 column 13

The behavior with this patch is still not ideal, in that we don't ever
send the edit to the server (if the issue was lag, not an actual error
on sending), but this at least makes the on-error case correct.
2018-05-03 12:14:43 -07:00
Umair Khan 9a3b310db9 2FA: Enable apps and middlewares unconditionally. 2018-05-03 11:59:32 -07:00
Shubham Dhama 9f78540bd0 org settings: Make save-discard widget look better.
This fixes some minor glitches with buttons:
* Movement of the organization-settings-parent block on the
  appearance of widgets.
* Large and odd look of save button.
* Use of fadeIn and fadeOut rather than changing opacity as
  opacity don't actually remove them.
2018-05-03 10:32:34 -07:00
Eeshan Garg d28d08e7da streams: Add get_default_value_for_history_public_to_subscribers().
This commit adds a function that makes it easier to get a default
value for Stream.history_public_to_subscribers when one isn't
explicitly provided.
2018-05-03 10:24:27 -07:00
Eeshan Garg 7e379bbb76 writing-bots: Recommend using Python 3 to run tools/provision. 2018-05-03 10:11:49 -07:00
Tim Abbott 0ada5fa9d8 stream_data: Fix exception when notifications_stream is private.
If notifications_stream is private and the current user has never been
subscribed, then we would throw an exception when trying to look up
notifications_stream.  In this situation, we should just treat it like
the stream doesn't exist for the purposes of this user.
2018-05-03 08:33:07 -07:00
Priyank Patel 1e1b72f6c8 webpack: Transition stats.css to use webpack.
The stats.scss file is added to activity bundle.
2018-05-03 08:08:23 -07:00
Priyank Patel c780bc33ba webpack: Transition activity.css to use webpack.
The activity.scss file is added to activity bundle.
2018-05-03 07:53:24 -07:00
Steve Howell c00a054893 minor: Update comment in narrow.activate(). 2018-05-03 07:52:15 -07:00
Steve Howell 93ce1fa95c refactor: Extract save_pre_narrow_offset_for_reload().
This is purely to make it easier to read narrow.activate()
without having to page past lots of unnecessary detail when
you're trying to understand things like how we set the
selection.
2018-05-03 07:52:15 -07:00
Steve Howell e0557046f3 refactor: Extract narrow.update_selection().
The maybe_select_closest helper, when first introduced, was
tiny and close to its callers.

As it's grown, it's become kind of a big hurdle to reading
narrow.activate(), because it's out of chronological order
and it's hard to tell at a glance which variables it's closing
on.

Now we just move it out to module scope.

It's mostly moving code, with these minor changes:

        * we pass in opts for the old closure vars
        * we rename then_select_offset -> select_offset
        * we early-exit on empty lists
2018-05-03 07:52:15 -07:00
Steve Howell d359c89b0c refactor: Introduce select_strategy in narrow.activate.
We replace these variables in narrow.activate:

        then_select_id (int w/-1 as a sentinel)
        select_first_unread (boolean)

The main goal here is to get away from the boolean, since
we are about to introduce a third select strategy.

The new var is select_strategy and it has a union
type with these flavors:

        "exact" (was select_first_unread === false)
        "first_unread" (was select_first_unread === true)

The new flavor will be something like "last_id".

Eliminating then_select_id is also nice, since the -1
sentinel value could be a pitfall, and it's semantically
cleaner to encapsulate behind a check for
select_strategy.flavor.
2018-05-03 07:52:15 -07:00
Steve Howell b046b158d9 refactor: Add a fetch_message IIFE in narrow.activate.
We use an IIFE (immediately invoked function expression)
to fetch messages.  This will allow us to introduce some
local vars in a subsequent commit without creating an ugly
diff and without cluttering an already crowded namespace.
2018-05-03 07:52:15 -07:00
Steve Howell 0bbbdb65b4 minor: Introduce msg_id in maybe_select_closest().
This cleans up a subsequent diff.  Within the context of
`maybe_select_closest`, there's only one `msg_id` we care about,
so the more convoluted name `then_select_id` makes much less
sense than it does in the enclosing scope, and it will make
even less sense after some future changes.

There's also some cosmetic cleanup here.
2018-05-03 07:52:15 -07:00
Steve Howell df0e4a73fa refactor: Remove brittle check for !select_first_unread.
When we are deciding whether to preserve scroll position, we
mainly care that then_select_offset is set to a value.  If
we had no intention of preserving scroll offset, we would have
never bothered to set it.  The check for !select_first_unread
is always redundant, as verified by lots of clicking around
with some print debugging.  And it's a brittle check,
because it couples the decision of scrolling destination to
the mechanism by which we decide our selection.  While those
things are closely related, it's possible in the future that
we'll decide to advance to an unread message and still want
to set then_select_offset, but we might forget to mutate
select_first_unread.

Long story short, the code is simpler and safer now.
2018-05-03 07:52:15 -07:00
Steve Howell 3e08270d48 refactor: Simplify then_select_offset calculation.
We move the var declaration of then_select_offset closer to
where it gets calculated, and we avoid code duplication in
calling current_msg_list.get_row().
2018-05-03 07:52:15 -07:00
Steve Howell d021a51047 Avoid brittle attempt to get messages with id === -1.
Even when then_select_id has the sentinel value of -1, we were
trying to look it up in our message_list.all object.  This would
have returned undefined, which is fine, but it's more explicit
to just bypass the check.
2018-05-03 07:52:15 -07:00
Steve Howell 6bab68ff6a node tests: Fix flaws with narrow_activate tests.
The original version of this function was simulating kind
of an illogical code path, where -1 was sort of pointing to
a real message, which doesn't make sense.

Now we pass in an explicit then_select_id.
2018-05-03 07:52:15 -07:00
Akash Nimare 954a04c52a stream-settings: Improve selection behavior around the stream-settings.
Fixes: #9276.
2018-05-02 21:05:41 -07:00
Puneeth Chaganti e6ac98cc9b vagrant: Get vagrant up and running with lxc 3.0.0 2018-05-02 21:04:27 -07:00