umkay
5e5a0d4db9
analytics: Add user-level count query for messages sent to {PMs, streams}.
...
Adds a count_X_by_Y_query to counts.py, similar in spirit to a
count_recipient_by_user query, where we would join on the Message,
Recipient, and UserProfile table. Here, we also join on the Stream table in
order to distinguish private and public streams, and we merge the counts for
PM and Huddle type messages into a single subgroup.
2016-11-01 17:00:43 -07:00
umkay
a94599fca7
analytics/models.py: Add subgroup column to unique_together constraints.
2016-11-01 16:53:56 -07:00
Steve Howell
148e1e6add
subs: Avoid duplicate prepend_subscriber() call.
...
We don't want to prepend new subscribers to our list of
subscribers in the settings page when they hit enter; we
want to wait till we get the event from the server.
This is a fairly new regression that was added when we
live-updated peer subscriber changes.
2016-11-01 14:01:29 -07:00
Steve Howell
a126be3db6
Call add_in_realm() when loading people from page_params.
2016-11-01 13:55:48 -07:00
Steve Howell
d70ac2fc0d
Remove obsolete code for page_params.people_list.
...
The only module that uses people_list now is people.js, and that's
only during the page load process.
2016-11-01 13:55:48 -07:00
Steve Howell
758c040558
Make stream-invite typeahead more dynamic and accurate.
...
The typeahead for inviting users to an existing stream now
uses a function, not a static list, and it now only shows
users from your realm.
2016-11-01 13:55:48 -07:00
Steve Howell
aadc198510
Make PM typeaheads more dynamic.
...
We now set source as a function, not a static list, and we grab
persons from people.get_all_persons() instead of page_params.
2016-11-01 13:55:48 -07:00
Steve Howell
40ec0189e4
Use people.get_all_persons() in at-mention typeaheads.
...
This is more robust than using page_params.people_list.
2016-11-01 13:55:48 -07:00
Steve Howell
06d7012113
Use people.get_all_persons() for search_suggestion.js.
...
This is better than using page_params.people_list, which may
go out of sync when live updates happen.
2016-11-01 13:55:48 -07:00
Steve Howell
2d945d7296
Add people.get_realm_persons().
2016-11-01 13:55:48 -07:00
Steve Howell
aa07b32d58
Add people.get_all_persons().
2016-11-01 13:55:48 -07:00
Steve Howell
a9e851b646
Load people.js earlier during startup.
...
Lots of things depend on people.js, whereas people.js basically only
depends on page_params and core modules like dict.js.
2016-11-01 13:55:48 -07:00
Tim Abbott
d22a06ee90
docs: Fix a missing close paren.
2016-11-01 12:32:36 -07:00
Tim Abbott
1bae9d10e3
docs: Improve wording details in the new realm document.
2016-11-01 10:50:06 -07:00
hackerkid
1e409032bd
docs: Add subsystem section discussing realms and subdomains.
2016-11-01 10:49:47 -07:00
Brock Whittaker
25b28bf82c
Fix inline code lines that are too long in .message_content.
...
The issue is that if you post a very long line of code it will overflow
the .message_content div and force the width of the main message page
to be as long as the line of code.
Fixes : #2156
2016-10-31 17:17:17 -07:00
Brock Whittaker
9ad27b3e69
Reorder CSS Files to fix compose box issues.
...
The media queries should always be last in the pipeline to be delivered
so that other styles don’t override them.
2016-10-31 17:17:17 -07:00
Brock Whittaker
d49076d0d4
Add @media query for mobile muting UI.
...
This adds a media query so that the muting UI on mobile displays
correctly.
Fixes : #2149 .
2016-10-31 17:17:17 -07:00
Tim Abbott
1bc9be7aed
subs: Fix stream privacy changes not working after renaming.
...
This fixes and issue where the change_stream_privacy template had its
own duplicate copy of the data-stream-name attribute, which wasn't
updated when streams were renamed.
Fixes #2016 .
2016-10-28 16:42:32 -07:00
Tim Abbott
6927a9bdc4
subs: Update subscription settings data when renaming streams.
2016-10-28 16:41:54 -07:00
Tim Abbott
0185764be7
subs: Fetch stream name from data-stream-name.
2016-10-28 16:12:50 -07:00
Tim Abbott
9507ed8a05
subs: Move show_settings_for earlier in file.
2016-10-28 16:10:59 -07:00
Tim Abbott
c10fd243f1
subs: Rename subscriber_count class to subscriber-count.
...
Also remove the unused subscriber-count-row class.
2016-10-28 16:07:28 -07:00
Tim Abbott
c0a774ef8c
subs: Remove use of $-based variable names.
2016-10-28 16:07:02 -07:00
Tim Abbott
56c9be75ee
subs: Add data-stream-name for stream settings.
2016-10-28 16:07:02 -07:00
Tim Abbott
76cd40eb9d
subs: Remove now-unused subscription_{{stream_id}}.
2016-10-28 16:07:02 -07:00
Tim Abbott
b8304c3359
subs: Find elements using the new data-stream-id value.
...
This is preparation for no longer having the subscription inside the
subscription_row object.
2016-10-28 16:06:40 -07:00
Tim Abbott
3727ea6fb0
subs: rename .subscription_description to .description.
2016-10-28 14:47:23 -07:00
Tim Abbott
dd2fab9374
subs: Rename data-subscription-id to data-stream-id.
2016-10-28 14:47:23 -07:00
Tim Abbott
66e2632809
subs: Rename .subscription_name to .stream-name.
2016-10-28 14:47:22 -07:00
Tim Abbott
f18d53d46a
subs: Rename .subscription_row to .stream_row.
...
The new name is clearer, since we show these rows for streams whether
or not you're subscribed.
2016-10-28 14:25:00 -07:00
Brock Whittaker
2bf2468ffe
css: Namespace buttons in components.css.
...
This namespaces components.css to not conflict with the existing CSS of
the rest of the site.
2016-10-28 14:14:52 -07:00
Brock Whittaker
38f7349771
components: Add .tab-switcher component.
...
This adds the .tab-switcher component to components.css.
2016-10-28 14:04:38 -07:00
Brock Whittaker
1562f9fe76
lightbox: Fix Z-Index for Proper Ordering.
...
This fixes the z-index of the lightbox overlay, which previously
appeared behind the header, and the muting notification to be above
everything else on the page.
2016-10-28 13:57:37 -07:00
Steve Howell
eb64b32bc8
Fix "subjects" in JS comments. Say "topics" instead.
2016-10-28 13:52:25 -07:00
Steve Howell
5fd71a6381
Rename var in sidebar_subject_list.handlebars.
...
s/subjects/topics/
2016-10-28 13:52:25 -07:00
Steve Howell
dba3ed3d90
Rename variables in topic_list.build_list().
...
(s/subjects/topics/ in a couple places)
2016-10-28 13:52:25 -07:00
Steve Howell
78861d4e01
Rename recent_subjects to recent_topics.
2016-10-28 13:52:25 -07:00
Steve Howell
0a4579711d
Add stream_data.get_recent_topics().
...
This removes the last remaining references to
stream_data.recent_subjects() outside of stream_data.js.
2016-10-28 13:52:25 -07:00
Steve Howell
6a54dfc127
Remove recent_subjects from node tests.
...
We now use stream_data.populate_stream_topics_for_tests(),
which hides some of the implementation details of initializing
the data structure.
2016-10-28 13:52:25 -07:00
Steve Howell
8acdf718bc
Move process_message_for_recent_topics() to stream_data.js.
2016-10-28 13:52:25 -07:00
Steve Howell
c799ac3126
Extract stream_data.is_active().
2016-10-28 13:51:21 -07:00
Steve Howell
ecbd77d8a5
Flip conditional in stream_list.add_sidebar_li().
2016-10-28 13:51:21 -07:00
Steve Howell
403490a95b
annotations: Fix to_non_negative_int().
2016-10-28 13:48:44 -07:00
Steve Howell
7111bb1744
Deprecate /json/streams.
...
Note that we still need the equivalent function in our
user-facing API, so there is not much code removal yet.
(Also, we will probably always keep this in our API,
as bot authors will usually just want a simple endpoint
here, whereas our client code gets page_params and events.)
2016-10-28 13:44:46 -07:00
Steve Howell
15602ee6bb
Stop using /json/streams on the client.
...
We no longer need to fetch streams from the server when
we render the settings page.
The name populate_and_fill() may not be a great name any
more.
2016-10-28 13:44:46 -07:00
Steve Howell
10bc093375
Stop using server data to draw "Manage Streams".
...
We have all the data we need on the client side.
2016-10-28 13:44:46 -07:00
Steve Howell
9d4debd1eb
Live-update added/removed subscribers.
2016-10-28 13:43:09 -07:00
Steve Howell
768a04d2fa
Send user_ids for update events.
...
Here we handle a few flavors of realm_bot/update
and realm_user/update. (Different events send different
attributes.)
2016-10-28 13:40:14 -07:00
Steve Howell
3fd7ab950a
Send user_id to the client when removing bots/users.
...
This touches these events:
realm_bot/remove
realm_user/remove
2016-10-28 13:40:14 -07:00