Commit Graph

25861 Commits

Author SHA1 Message Date
Aditya Bansal a62efd55df linter: Make duplicate html tag id detection work with archives.
We modify check-templates to check for duplicate id's in archive
templates and app templates separately. This means we are allowing
app and archive templates to potentially use same id's. This is
needed because we intend to re use some js from the main app and
having same id's help achieve that.
Note: We haven't up until this point actually added archive
templates. This commit is more of a preparatory commit for merging
the basic archive infra.
2018-05-02 15:23:33 -07:00
Aditya Bansal 9629be689b populate_db: Add a web public stream to dev database.
We flip the Stream "Rome" to be a web public stream. Also we add
attribute is_web_public in various stream dicts and in the
bulk_create_streams function of bulk_create.py responsible for
default stream creation in dev environment.
2018-05-02 15:23:33 -07:00
Aditya Bansal 1f358954be web_public_streams: Add is_web_public to Stream table.
Also add function do_change_stream_web_public in lib/actions.py
to help in changing a streams web public status.
2018-05-02 15:23:33 -07:00
Umair Khan 29e3a1d576 two_factor: Add templates for 2-factor-auth setup.
Note from Tim: We'll likely need to do some work on the strings in
these before translating, so I removed some translation tags.
2018-05-02 15:20:49 -07:00
Umair Khan b778259547 login-page: Return early if resp is a redirect.
Redirect response does not need a context.
2018-05-02 15:15:37 -07:00
Umair Khan e8b0ae821b two_factor: Fix namespace error.
If you specify namespace, Django throws an error.
2018-05-02 14:59:14 -07:00
Umair Khan aef2234e97 login_page: Create update_login_page_context().
This will also be used from two factor login.
2018-05-02 14:30:02 -07:00
Steve Howell 1941a0eb51 refactor: Swap conditions for pre-filling narrows.
This mostly sets up the next commit.  The two conditions here
are both inexpensive to check, but we want to bypass an upcoming
expensive operation if can_apply_locally() returns false.
2018-05-02 13:34:54 -07:00
Steve Howell 66cd2edee4 Add narrow_state.get_first_unread_id(). 2018-05-02 13:34:54 -07:00
LuisFSilva a072b2a153 right-sidebar: Fix group PMs online indicator.
People found it confusing that it would show up at light-green when
the users in the thread were idle.

Fixes #8242.
2018-05-02 12:41:01 -07:00
Shubham Dhama 02c3223985 upload: Improve logic for hiding progress bar for fast upload.
With past logic, on fast upload progress bar don't appears because
uploadFinished is called as soon as upload is finished so
progress bar get disappeared. To make these hiding of progress bar
smooth we set setTimeout for every hiding of progress bar as well
as complete status element.
2018-05-02 12:32:13 -07:00
Shubham Dhama c67897ba5b upload: Make progress bar for each file independent.
Here `file.lastModified` is unique for each upload so it is used
to track each upload individually.
Also, we have used `uploadStarted` function because it is
called for each file during an upload.

Fixes: #9068.
2018-05-02 12:32:13 -07:00
Shubham Dhama 6d33e73b5f upload: Remove progress bar only when upload is finished.
Previous logic was little buggy, as many time there can be considerable
difference between uploadFinished and progressUpdated as progressUpdated
can finish much earlier(on a slow connection) and the "uploaded file"
markdown text is inserted with some delay.
It is also a preliminary commit for making each progress bar independent
as currently progressUpdated may close upload_bar even after only
one file out of many files is uploaded.
2018-05-02 12:32:13 -07:00
Shubham Dhama 9d575ffd1c upload: Add/enable `uploadStarted` option in jquery-filedrop plugin.
We were missing it but it is added in the upstream, so just added it
at the appropriate place in plugin code(in the upstream there is some
code refactoring but this seems to be the most appropriate place).
2018-05-02 12:32:13 -07:00
novokrest 0fb13eed2f outgoing_webhook: Extract success response handling to separate method.
Extract success response handling in do_rest_call() method to
separate method process_success_response()
2018-05-02 11:57:26 -07:00
novokrest 036bc120c3 outgoing_webhook: Extend process_success() return value to tuple.
Change return value type of OutgoingWebhookServiceInterface.process_success
to 2-elements tuple as (success_message, failure_message)
2018-05-02 11:57:08 -07:00
Shubham Dhama 093c212b0c org settings: Change realm_org_join_restrictions label text.
This change with label text is done to make things similar the one for
realm_user_invite_restriction.
2018-05-02 11:42:28 -07:00
Shubham Dhama 4c28a79815 org settings: Clean up the context for admin pages.
This is a minor clean up of some contexts for admin pages
which we don't need anymore.
2018-05-02 11:42:28 -07:00
Shubham Dhama c293bb82c4 org settings: Change user joining invitation setting to dropdown. 2018-05-02 11:42:26 -07:00
Steve Howell 230ecb24ed Add narrow_state.get_unread_ids(). 2018-05-02 11:23:58 -07:00
Steve Howell ceee49c075 Add filter.is_for_only(operand). 2018-05-02 11:23:58 -07:00
Steve Howell 7bc95efb41 Add unread.get_msg_ids_for_mentions(). 2018-05-02 11:23:58 -07:00
Steve Howell 9987ea525f Add unread.get_msg_ids_for_private(). 2018-05-02 11:23:58 -07:00
Tim Abbott 4e8487c886 nagios: Bump maximum processes limits.
These seemed to be flapping for no good reason.
2018-05-02 11:12:47 -07:00
Rishi Gupta 0e702a15eb portico: Add Slack import to /features.
As a followup project it might make sense to link things on our /features
pages to things in /help.
2018-05-02 10:12:30 -07:00
Tim Abbott 3702131b6d hello.html: Add additional media-query for carousel. 2018-05-02 09:56:46 -07:00
gooca c81b103a5b hello.html: Better handling of carousel's mobile display. 2018-05-02 09:53:54 -07:00
Armaan Ahluwalia 9f80418d12 webpack: Add support for png file imports in file-loader.
Adds support for importing png files using file-loader in webpack.
Changes the name of the output directory to be files instead of
fonts for better readability.
2018-05-02 09:45:04 -07:00
Armaan Ahluwalia fce6882eb9 webpack: Move the styles consumed by 5xx.html to webpack.
This commit removes the need for portico.css to be generated
by the Django pipeline and makes the error page use the css
file compiled by webpack instead.
2018-05-02 09:45:01 -07:00
Steve Howell 7222dbd99b refactor: Simplify narrow_state.is_for_stream_id().
This takes advantage of the new function narrow_state.stream_id().

We now assume the incoming stream_id is a valid stream_id, so we
no longer need to test some of the error checking.  (It's possible that
the incoming stream_id may no longer be for a stream you subscribe
to, but the nice benefit of working more in "id space" is that if
it doesn't match the narrow's stream id, we know false is a safe
return value.)
2018-05-02 09:16:24 -07:00
Steve Howell a62c85c015 Add narrow_state.stream_sub() and narrow_state.stream_id(). 2018-05-02 09:16:24 -07:00
Steve Howell 0232e92038 Add filter.is_pm_with_only(). 2018-05-02 09:16:24 -07:00
Steve Howell 2a70f0dba4 Add filter.is_stream_topic_only(). 2018-05-02 09:16:24 -07:00
Steve Howell 08307c0e87 Add filter.is_stream_only(). 2018-05-02 09:16:24 -07:00
Steve Howell 861cb16c3e minor: Remove redundant function names in Filter class.
We no longer use the style of giving a function name to a
function that already has a name from the object it gets
attached to.
2018-05-02 09:16:24 -07:00
Steve Howell 0150c01027 Add unread.get_msg_ids_for_person(). 2018-05-02 09:16:24 -07:00
Steve Howell 2b35f26b88 Add unread.get_msg_ids_for_stream(). 2018-05-02 09:16:24 -07:00
Steve Howell c432acb436 Add unread.get_msg_ids_for_topic().
This will be useful for some narrowing related changes.
2018-05-02 09:16:24 -07:00
Steve Howell 76b97d8b54 refactor: Add util.sorted_ids().
We borrowed this from typing_data.js and gave it a slightly
different name (sorted -> sorted_ids).
2018-05-02 09:16:24 -07:00
Tim Abbott a0e8a37e7f topics: Fix get_topics_backend logic for zephyr realms.
This removes a check on invite_only, that should have been a check on
history_public_to_subscribers.  In addition to fixing a bug for zephyr
realms, it also makes "more topics" work correctly for realms using
the new settings for stream history being public to subscribers.
2018-05-02 09:02:57 -07:00
Tim Abbott 4df886f36f populate_db: Fix initialization of history_public_to_subscribers.
This was being incorrectly not initialized properly in the test suite,
because we neglected to update the bulk_create code path for creating
streams.
2018-05-02 09:02:57 -07:00
Tim Abbott 866cb38270 test_classes: Compute history_public_to_subscribers correctly.
We apparently missed updating this when we split out this database field.
2018-05-02 09:02:57 -07:00
Rohitt Vashishtha 2f6da2661f push_notifications: Format blockquotes properly in text_output.
New output is of the format:

Hamlet said:
> Polonius said:
> > This is the.
> > Second layer of nesting.
> First layer of nesting.

Fixes #9251.
2018-05-02 08:57:17 -07:00
gooca a8830ec8da hello.html: Add testimonial carousel.
Replaces single testimonial and replaces it with multi-testimonial
slider.

Quote added by Tim Abbott with permission from Jacinda.
2018-05-01 16:45:52 -07:00
Vishnu Ks 8705ac1091 portico: Add noindex tags for non root realms.
There may be further work required for the /integrations pages.
2018-05-01 15:28:30 -07:00
Tim Abbott 77e57dd033 index.html: Clean up indentation and whitespace in HEAD.
This is mostly to make our linter happy after removing the conditional
in the previous commit.
2018-05-01 09:49:28 -07:00
Tim Abbott d92edb8ea5 css: Remove support for legacy desktop app.
We haven't seen significant traffic from the legacy desktop app in
over a year, and users using it get a warning to upgrade since last
summer, so it's probably OK to stop providing special fonts for it.
2018-05-01 09:49:28 -07:00
Rohitt Vashishtha 19b228bca4 sidebars: Disable autocomplete for user and stream search inputs.
Fixes #9269.
2018-05-01 09:24:40 -07:00
Rohitt Vashishtha 6c96ba79e0 test_bugdown: Fix ignore-testcase feature for markdown_test_cases.
We accidentally were 'return'ing on encountering an ignored case, and thus
exiting the loop, not running further testcases.
2018-05-01 09:24:15 -07:00
Tim Abbott c1432d9dfc slack import: Reformat UserProfile to one-line-per-field.
This should be more readable and convenient for future editing.
2018-05-01 09:16:12 -07:00