Commit Graph

17536 Commits

Author SHA1 Message Date
Steve Howell 1a11042fdf refactor: Use stream id more in topic_list.js. 2017-05-15 14:47:41 -07:00
Steve Howell 2e39d48626 Add stream_data.get_recent_topics_for_id(). 2017-05-15 14:47:41 -07:00
Steve Howell 762194f98d Add stream_data.id_is_subscribed().
We use this function in stream_list.js.
2017-05-15 14:47:41 -07:00
Steve Howell efb35afeb7 Track recent topics (and active streams) using stream id.
This commit changes the key for recent_topics to be a
stream id.  For streams that have been renamed, we will now
get accurate data on recent topics and active streams as
long as stream_data.get_stream_id(stream_name) returns a
valid value.
2017-05-15 14:47:41 -07:00
Steve Howell 5d33d02235 Track unread counts using stream_id. 2017-05-15 14:47:41 -07:00
Steve Howell c125ba1d08 Fix how we find if streams are muted.
This commit changes stream_data.in_home_view() to
take a stream_id parameter, which will make it more
robust to stream name changes.

This fixes a bug.  Now when an admin renames a stream
you are looking at, it will correctly show itself to
be un-muted. (Even with this fix, though, the stream
appears to be inactive.)

Some callers still do lookups by name, and they will
call name_in_home_view() for now, which we can
hopefully deprecate over time.
2017-05-15 14:47:41 -07:00
Steve Howell d3a7aa3a37 Have get_stream_li() take a stream_id.
Rather than having get_stream_li() look up stream id using
stream name, we force the callers to pass in the stream id.

This adds an extra line to most of the callers for now, but
this will eventually change as we fix some of the callers to
have their callers pass in stream_id.

In places where we now call stream_data.get_stream_id() to
get the stream id, we will be more resilient toward stream
renamings, at least until the next reload, since
stream_data.get_stream_id() can resolve old names that
are stored when we process stream-rename events.
2017-05-15 14:47:41 -07:00
Steve Howell a48419310e Simplify get_filter_li() and get_stream_li().
We no longer have get_stream_li() delegate to get_filter_li(),
which simplifies the logic in get_filter_li() and makes
get_stream_li() more direct.

We also move the two functions closer to each other in the file.
2017-05-15 14:47:41 -07:00
Steve Howell 292b0ac64d Extract set_stream_unread_count. 2017-05-15 14:47:41 -07:00
Steve Howell cfdf256c62 refactor: Call get_stream_li() in a few places.
This is a step toward simplifying get_filter_li().
2017-05-15 14:47:41 -07:00
Tim Abbott 400845d1d5 docs: Remove shortcuts list documentation of drafts navigation.
These are fairly intuitive given how navigation works elsewhere, and
not having them here helps avoid things feeling intimidating.
2017-05-15 13:42:30 -07:00
Tim Abbott feeb648e00 hotkeys: Swap Drafts with Menus.
It seems good to have "Show keyboard shortcuts" be last.
2017-05-15 13:42:11 -07:00
Cynthia Lin 36b66cda74 user docs: Update keyboard shortcuts docs with Drafts modal shortcuts. 2017-05-15 13:32:21 -07:00
Cynthia Lin 934bae5232 user docs: Add user guide for *View and edit your message drafts*.
Fixes #4335.
2017-05-15 13:32:18 -07:00
Aditya Bansal 1769a444de Remove unnecessary ignore files.
In this commit we remove user_sidebar_actions.handlebars from
IGNORE_FILES as well remove the check for files to be in a
IGNORE list thus reaching 100% 4 space indent checking for
handlebar templates.

Fixes: #1661.
2017-05-15 11:51:21 -07:00
Aditya Bansal debcf507bd Clean organization-settings-admin to use 4 space indents. 2017-05-15 11:51:21 -07:00
Aditya Bansal 8530997542 Clean default-streams-list-admin to use 4 space indents. 2017-05-15 11:51:21 -07:00
Cynthia Lin 1bea4da0f4 org settings: Fix minor styling inconsistencies.
Fixes #4789.
2017-05-15 11:35:58 -07:00
Tim Abbott 44113d6436 docs: Update link to python-social-auth. 2017-05-13 23:00:50 -07:00
Tim Abbott 97abaae9af home: Remove now-unnecessary page_params_core_fields duplication.
Also, we update the documentation to make the overall system a bit
clearer.

Fixes #4628.
2017-05-13 22:58:18 -07:00
Tim Abbott 157e0623f8 5xx: Remove hardcoded twitter/email contacts from nginx 500 page.
There's no correct contact that we can list here unconditionally;
previously, we had people emailing zulip-devel@ because their server
was misconfigured.

Addresses #696 enough that it's no longer a priority issue.
2017-05-13 22:44:34 -07:00
Tim Abbott 3fd1943eb6 requirements: Move api dependency out of common.txt.
This is preparation for using `pip compile` to help automate our
requirements files; `pip compile` does not support relative paths.
2017-05-13 22:13:00 -07:00
Tim Abbott 864bc99aeb requirements: Move common includes to py2/py3, not dev/prod.
This is a nonfunctional refactor of how the common.txt requirements
are included.  It is preparation for a new model for freezing our
recursive dependencies based on `pip compile`.
2017-05-13 22:09:42 -07:00
Steve Howell 252d0a6e15 Use stream_data.get_name() in narrow_state.stream().
Using get_name() is more robust for stream name changes.  This
fixes, for example, the situation where you narrow to a stream,
edit it via the sidebar, and then close the modal, and the message
redraw logic thinks you have unsubscribed.

Fixes #4686.
2017-05-13 21:59:08 -07:00
Steve Howell 8b78f3f133 Look up old stream names in stream_data.get_name().
This change fixes a few small things related to stream
renames, such as what happens if you hit the back button
to go to a narrow where the stream had been renamed.  You
will now get the correct behavior in terms of filtering
and searching.  Unfortunately, this will only last until
you reload.
2017-05-13 21:59:08 -07:00
Steve Howell 191741a382 Use stream ids to filter messages in client-side narrows.
We now use stream ids to filter messages in narrowing
situations, instead of doing stream name comparisons.

This partially fixes certain stream-renaming scenarios, since
we will be able to match the stream id for an out-of-date
stream operand, but it doesn't fix some other stuff, such
as the query that the server gets.
2017-05-13 21:59:07 -07:00
Steve Howell 8ecfda9344 stream_data: Remember old stream names.
This is not a user-facing change, but it starts us down the
path to having the JS client be able to look up old stream
names for situations like people clicking old external links
or for live-update scenarios.
2017-05-13 21:58:37 -07:00
Tim Abbott f36000d670 docs: Fix last reference to old fixtures directory structure. 2017-05-13 21:39:12 -07:00
Eeshan Garg 762850876b integration-guide: Replace references to old style fixture names.
The integration-guide has now been updated to reflect the recent
decision to rename webhook fixtures from
<webhook_name>/fixtures/<webhook_name>_<event_type>.json to
<webhook_name>/fixtures/<event_type>.json.
2017-05-13 20:22:40 -02:30
Eeshan Garg eb229dd40e webhook-walkthrough: Replace references to old style fixture names.
The webhook-walkthrough has now been updated to reflect the recent
decision to rename webhook fixtures from
<webhook_name>/fixtures/<webhook_name>_<event_type>.json to
<webhook_name>/fixtures/<event_type>.json.
2017-05-13 20:13:35 -02:30
Eeshan Garg 597db11a98 webhooks: Rename webhook fixtures to only include event type.
All webhook fixtures have now been renamed from
<webhook_name>/fixtures/<webhook_name>_<event_type>.json to
<webhook_name>/fixtures/<event_type>.json.
2017-05-13 20:07:40 -02:30
Tim Abbott acb3c1e7ff test_templates: Fix errors from compare.html template. 2017-05-13 14:57:06 -07:00
Eeshan Garg 10dcc99983 zerver/decorators: Log all exceptions raised in api_key_only_webhook_view.
Fixes #4742.
2017-05-13 14:53:47 -07:00
Tim Abbott 286bbff800 left-sidebar: Change color of STREAMS label on hover. 2017-05-13 14:41:58 -07:00
derAnfaenger 45a9b657c7 Refactor left sidebar topic cursor css.
This commit addresses to issues with the left sidebar:
The cursor flickering when hovering over topics, and
the cursor not becoming a pointer when resting just right
of a topic's name (in a clickable area).

This is a follow-up to #4675.
2017-05-13 14:41:48 -07:00
Tim Abbott d6059d0d9a landing: Add template containing comparison checkmarks.
Can be added to the landing pages via:
+    {% include 'zerver/compare.html' %}
+

I'm avoiding adding that include into the landing pages until we have
time to do a bit of tweaking of the styling to integrate better into
/hello/ (primarily color-wise).

Most of the work for this was done by Brock, huge thanks to him!
2017-05-13 14:32:24 -07:00
Tim Abbott 51978d0f89 tests: Fix failing login tests.
Apparently I missed these when updating
4d2bb0dec8.
2017-05-13 13:05:15 -07:00
Tim Abbott 4d2bb0dec8 templates: Clean up visuals for account-not-found SSO flow.
Also, clarify that the account that isn't found is your Zulip account,
not a GitHub/Google Oauth account.
2017-05-13 12:46:05 -07:00
Tim Abbott 0b5954feee Increase initial messages on user creation from 100 to 1000.
This makes the new user experience in an active community like
chat.zulip.org substantially nicer, since the new user will have the
same level of initial messages to populate topics (etc.) as an
existing user who is caught up.

Without this, there was an undue level of fading-for-inactivity in the
default streams.
2017-05-13 12:16:05 -07:00
rht 34ffda9a1e docs: Fix a bunch of documentation build warnings.
This helps clean unnecessary warnings out of Zulip's Travis CI output.
2017-05-13 10:09:20 -07:00
hackerkid cf15a7b561 presence.js: Make get_status return active for logged in user. 2017-05-12 14:28:23 -07:00
Tim Abbott ab3f55408d settings: Document how to set EXTERNAL_HOST to include a port number.
Also, make sure that ALLOWED_HOSTS is correct in the case that a port
number is included.
2017-05-12 14:27:29 -07:00
Abhijeet Kaur 0b7d138871 settings: Make description textarea readonly for non-admin users.
Fixes #4754.
2017-05-12 14:16:43 -07:00
Tim Abbott 25516c6949 models: Update comment explaining order of display recipients. 2017-05-12 13:53:06 -07:00
Tim Abbott 72abd4f12d mentions: Fix subject line and sender for missed-message mentions.
This fixes 2 issues:
* The term "@-mentioned" is simplified to "mentioned".
* We would incorrectly list other people who sent context messages as
  among the people who mentioned you.
2017-05-12 13:50:25 -07:00
James Rowan 0facaa0797 Changes sender and subject lines for missed message emails.
Now, in the event of messages between two other members of a huddle,
the missed message emails are threaded in "Group PMs with name1 and
name2" and not in separate threads by sender.

Also, now the order of recipients in get_display_recipient consistent
with the order of names that appears in the list of personal messages
on the left sidebar.

Fixes most of #4553.
2017-05-12 13:29:43 -07:00
Tim Abbott f25d7dd721 settings: Fix spelled of muted topics message. 2017-05-12 12:38:29 -07:00
Steve Howell a0fab6842c Improve error handling in get_action_menu_menu_items(). 2017-05-12 12:25:03 -07:00
Aditya Bansal 33f3d773b0 Clean user-list-admin to use 4 space indents. 2017-05-12 12:23:01 -07:00
Aditya Bansal 0c39a45d72 Clean bot-list-admin to use 4 space indents. 2017-05-12 12:23:01 -07:00