Commit Graph

4068 Commits

Author SHA1 Message Date
Cory Lynch d5bcfc415d emoji_picker.js: Fix popover icon that persists after exit.
Another manifestation of #4329, as this bug
also applied to the emoji popover.
2017-06-20 06:28:25 -04:00
Cory Lynch 801e4f6f6e popovers.js: Fix chevron that persists when exiting.
Fixes #4329.
2017-06-20 06:28:25 -04:00
Cory Lynch 55917b6761 message_store.js: Remove obsolete clear() function. 2017-06-20 06:24:27 -04:00
Vishnu Ks 9b16835c99 user_popover: Handle the case when user presence is unknown.
For bots and users who have not logged in for a long time the presence information is not known. For the these users make the presence indicator hidden.
2017-06-19 17:25:06 -04:00
vaibhav 33c0c00cd6 Outgoing webhook System: first Iteration of outgoing webhook UI. 2017-06-19 16:05:54 -04:00
Cory Lynch 6255636923 Support special characters for code block languages.
Fixes #5412
2017-06-19 06:53:25 -04:00
Cory Lynch 58a2ffbe1d Add search suggestion support for is:unread. 2017-06-19 06:51:13 -04:00
Cory Lynch 86d3e00bd0 Add search support for is:unread.
Fixes #1423.
2017-06-19 06:51:13 -04:00
Steve Howell d7c0a7e1cb Clean up settings_org.render_notifications_stream_ui.
The code now handles undefined stream_ids for realms that
don't have a notifications stream.  It also removes unneeded
translation code on the stream name.
2017-06-16 08:47:42 -04:00
Steve Howell 081e0405dc Avoid error in closest_id().
If we get a potential_idx that is not in items, we now just
warn about it instead of letting a type error happen.
2017-06-15 18:33:26 -04:00
Steve Howell a9622b0e4f Fix lint error from recent commit (error_data). 2017-06-15 17:47:44 -04:00
Steve Howell 1f34077fa1 minor: Add closest_id to blueslip error data. 2017-06-15 16:33:38 -04:00
Steve Howell fe9020972a Avoid type errors for bad PM narrows.
If somebody narrows to pm-with:bad_email@example.com, we no longer
generate a type error by trying to call addClass on undefined.
2017-06-15 15:52:42 -04:00
Yago González 1d0b7e07cc css: Make avatar corners round.
Set a border radius of 4 pixels for user avatars displayed in the message
list view.
2017-06-15 12:36:59 -07:00
Akhil b6b22fbb47 message-edit: Trigger mouseleave on row when hiding message_edit div.
For the pencil icon to appear, message_unhover has to be called before
message_hover (both in ui_init.js). This happens when the mouseleave
event is triggered on a row. But, when clicking the save button and
the edit box is hidden, the mouseleave event is not triggered and
hence message_unhover not called.

Fix this with a manual mouseleave event.

Fixes: #4287.
2017-06-15 12:24:40 -07:00
Steve Howell 34f26f14aa narrow: Remove redundant from_reload option.
The narrowing option from_reload was only used in
conjunction with use_initial_narrow_pointer, but the
latter option already takes into account whether a
reload happened.
2017-06-15 12:16:27 -07:00
Steve Howell 961d54692e narrow: Rename var to use_initial_narrow_pointer. 2017-06-15 12:16:25 -07:00
Rohitt Vashishtha 1fe58eb325 webhooks/slack: Migrate docs to markdown. 2017-06-15 11:10:44 -07:00
Abhijeet Kaur af7e08acb0 bots: Add UI to view bot types of existing bots in "Your bots".
Tweaked by tabbott for more standard internationalization.
2017-06-15 10:08:31 -07:00
Steve Howell 8aad3ecb5c Add error checking to get_users_typing_for_narrow(). 2017-06-15 11:32:13 -04:00
Steve Howell fd62edde39 Add debugging code for overlays. 2017-06-15 11:03:29 -04:00
Steve Howell d2b710b307 Add maybe_show_keyboard_shortcuts().
This prevents some strange UI experiences and some blueslip
errors by not opening keyboard help when other overlays or
popovers are open.
2017-06-15 10:15:29 -04:00
Akhil 1bcc0dbd81 org-settings: Add UI for changing the notifications stream.
Added a dropdown in the organization settings page with a search-box and
required styles. Also added an element to disable it. Added a method to
populate the dropdown using list_rendering.js. Also altered response to
the event of deletion of the notifications stream on the frontend. On
selection of a new stream or on clicking 'Disable', a patch request is
made with stream-id to /json/realm.

Fixes: #3708.
2017-06-15 04:08:29 -07:00
Shubham Dhama 9c5353cc3d lightbox: Remove the unwanted scrollbar from the image list.
Fixes: #5277.
2017-06-15 03:39:40 -07:00
Harshit Bansal 7950f82f27 realm_emoji: Make sure that a deactivated realm emoji can't be used.
A deactivated realm emoji should neither be accepted further as a
reaction nor its further occurences in a message be rendered as an
emoji. However, all the old occurences should continue to render
normally.
2017-06-15 02:59:57 -07:00
Cory Lynch 11a7a476d7 search_suggestion: Add negation support for 'has' operator. 2017-06-15 02:32:00 -07:00
Cory Lynch da4e2954fe search_suggestion: Remove is:private as default suggestion. 2017-06-15 02:20:50 -07:00
Cory Lynch 89b8d07420 Make search suggestion messages more concise.
This involves updating filter.js, mostly. The
tests were updated appropriately for this change,
which also involved changing a caspar test for
narrowing.
2017-06-14 22:34:46 -07:00
Cory Lynch ab5b0e938d Add support for "has" operator in search_suggestions.
This was never a feature in the old search_suggestions
version, so a new helper function for it was added.

Relevant tests were also added, maintaining 100% coverage.
2017-06-14 22:34:46 -07:00
Cory Lynch a7ec8cd1f3 Improve topic in search_suggestion.js.
Also added some additional testing to handle
some edge cases that I'd like to make sure
don't break down.
2017-06-14 22:34:46 -07:00
Cory Lynch 7cda7c4782 Improve stream in search_suggestions.js. 2017-06-14 22:34:46 -07:00
Cory Lynch 69e8074d14 Improve person/group in search_suggestions.js.
The get_person_suggestions and get_group_suggestions functions
were updated to the new system. Support for negation is also
added in the new system.

Relevant tests were also updated. Also, note that the function
get_private_suggestions was removed, as it was rendered
obsolete by these updates.
2017-06-14 22:34:46 -07:00
Cory Lynch c8d4eff8aa Improve sent_by_me in search_suggestions.js.
Added appropriate tests.
2017-06-14 22:34:46 -07:00
Cory Lynch 79d56c94dc Improve default and special_filter in search_suggestion.js.
Special filter was updated to work even when it is not the first
token in a search query. Furthermore, the default query was
moved around to work with the changes to come for the new
suggestion system.

A test also had to be modified to work with the new system.
2017-06-14 22:34:46 -07:00
Tim Abbott 2555227cc5 errors: Update 404/5xx nginx pages.
We remove zulip-devel@ from the 404 page, and improve the comments
explaining why these pages don't use variables.
2017-06-14 21:18:45 -07:00
Cory Lynch cb4dadfdcd tools: Create /devtools page for useful dev URLs.
Fixes #5179.
2017-06-14 20:17:56 -07:00
Jack Zhang d3e69c5460 Remove style to show text in portico-page-container.
Fixes #5368, #5371.
2017-06-14 18:37:24 -07:00
Steve Howell 29416c4b39 Move pm_list.set_click_handlers() call.
Instead of calling it from stream_list.initialize(), we
call it from the new pm_list.initialize().
2017-06-14 13:58:54 -04:00
Steve Howell 499962bb6b Change arg for stream_list.redraw_stream_privacy().
We now pass in a sub, not a stream name.
2017-06-14 11:24:42 -04:00
Steve Howell fb5d10af14 Extract stream_list.get_global_filter_li().
Now we use a consistent approach to find the list items for
Home/Starred messages/Mentioned in the upper corner.

In particular, we get rid of the complicated
iterate_to_find() function.
2017-06-14 09:27:50 -04:00
Harshit Bansal 0e8f1f4e5d alert_words: Fix the UI to not allow users to create duplicate alert words. 2017-06-13 16:37:49 -07:00
Harshit Bansal 94fc7dfe20 alert_words_ui: Fix the data flow while removing an alert word.
Add `remove_alert_word()` function which uses the correct data flow
while removing an alert word.

`alert_words_ui.js` was structured differently from most of the other
settings. It was not using the triggers from the server for running
the success/failure handlers.
2017-06-13 16:36:11 -07:00
Harshit Bansal 049bc02778 alert_words_ui.js: Fix the data flow while adding alert word.
Modify the `add_alert_word()` function to follow the correct data
flow for error handling and propagation.
2017-06-13 16:36:11 -07:00
Harshit Bansal d5ab8ac1e1 alert_words: Remove the `page_params.alert_words` after initialization.
We remove the `page_params.alert_words` since `alert_words.words`
is the sole source of alert words. Use of `page_params.alert_words`
could lead to bugs when alert words are updated since it is not updated.
2017-06-13 16:36:11 -07:00
Steve Howell 7c2683d765 minor: Export stream_list.update_count_in_dom() for testing. 2017-06-13 18:37:02 -04:00
Eeshan Garg 571130e2fe webhooks/homeassistant: Migrate docs to Markdown. 2017-06-13 15:33:21 -07:00
Akhil ff9a929d7a typeahead: Remove highlighting and add common template. 2017-06-13 16:16:17 -04:00
Rishi Gupta dbac262509 hotspots: Change hotspots to have a name and a description. 2017-06-13 12:59:33 -07:00
Mehanig 1e5ce918e3 webpack: Move app_debug.js to webpack bundle. 2017-06-13 12:45:40 -07:00
Tejas Kasetty dd7e27815f hotkeys: Disable navigation in background when overlays are active.
Fixes #5326.
2017-06-13 09:17:56 -07:00
Aditya Bansal ea6a04781b streams-modal: Fix styling around stream accessibility option.
This fixes the faulty spacing around the various icons in
stream accessibility option under the create new stream modal. This
regression was introduced in 7e71bf.
2017-06-12 22:44:42 -07:00
Brock Whittaker 244c4dc7fa landing-pages: Add working "×" for mobile navigation.
This adds a working "×" icon that you can click to close the nav
on the mobile product pages.

Fixes #5260.
2017-06-12 21:32:18 -07:00
Brock Whittaker c1599a1463 streams-modal: Fix back arrow on streams modal.
This fixes the back arrow to work again properly after a regression
in which a change in the class name disrupted the click events and
styling for it.
2017-06-12 18:31:04 -04:00
Tejas Kasetty cabcdabfbc emoji-picker: Update scrollbar after each search filter.
Fixes #4825.
2017-06-11 10:15:48 -07:00
Rafid Aslam 4f482834b4 deps: Upgrade and move `perfect-scrollbar` from `static/third` to `npm`.
- Remove `perfect-scrollbar` from `static/third` and fetch it from npm.
- Upgrade `perfect-scrollbar` to 0.7.1.
- Bump up the `PROVISION_VERSION` to 5.6.

Changed `wheelSpeed` in "static/js/scroll_bar.js" to 0.5, because when it
20, the scrollbar scrolls very fast.

Changed 'wheelSpeed' in "static/js/emoji_picker.js" from 25 to 0.68
(based on tabbott's testing of scrolling through the emoji list).

Part of #1709.
2017-06-11 10:15:48 -07:00
hackerkid 648b2823bb Show user presence and last seen status in user popover. 2017-06-11 07:09:21 -05:00
hackerkid a158676fb0 Add function to get last seen status from last active date. 2017-06-11 07:09:21 -05:00
Harshit Bansal 614817e5fc alert_words_ui: Add `render_alert_words_ui()` function.
This function will be used for rendering the alert words list.
2017-06-09 15:23:53 -07:00
Harshit Bansal 643936454e alert_words_ui: Convert error message alert to status message alert.
Convert the error message alert to a status message alert which can be
used to display the status of any operation performed.
2017-06-09 15:23:53 -07:00
Harshit Bansal b0d7d05ef6 alert_words_ui.js: Move the error message to the top. 2017-06-09 15:23:53 -07:00
Tejas Kasetty 4487899099 file-attach: Reset file_input after each trigger.
The file input used for attaching files and images was not being reset
after each use. This resulted in irregular behaviour (sometimes failure)
in attaching the same file consecutively.
This fixes the bug in the reset method.

Fixes #5074.
2017-06-08 19:53:31 -07:00
Jack Zhang ec673c739c product-pages: Add integrations section to hello (landing) page. 2017-06-08 19:41:50 -07:00
Brock Whittaker 5606435a90 components: Make button component styles sensible.
This removes the old base button style which was a blue button and
kills the unnecessary .white class which was essentially just acting as
the new button base.

This then removes all references throughout the settings/subscriptions
pages to those button styles.

This also fixes the strange button styles that changed the :hover and
:active opacity to 0.05 which led to unpredictable results on various
backgrounds.
2017-06-08 17:09:31 -07:00
Aditya Bansal b5d5e6f9b5 topic_sidebar_actions.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:28 -07:00
Aditya Bansal 2d6101bf8c topic_list_item.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:28 -07:00
Aditya Bansal 293abb275c subscription_table_body.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:28 -07:00
Aditya Bansal 8d9cb3aa71 subscription_stream_privacy_modal.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 7e71bf6f2f subscription_creation_form.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal b24e3ce0f0 attachment-item.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal a02937e3b4 new_stream_users.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal a204407983 message_reactions.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 88c68073fa message_edit_form.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 82e8b4a5ae invite_subscription.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Aditya Bansal 226b41c62e actions_popover_content.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
Akhil bd85963cd9 typeahead: Alter CSS to make secondary items more readable. 2017-06-08 12:01:03 -07:00
Akhil 3955821af5 typeahead: Extract out render_secondary and alter style for emails.
Added a function to add styling to secondary item of typeahead. Also,
used this function to alter the style for emails in the @-mention
typeahead to match the style used for stream description in #**stream**.
This also affects typeaheads for PM recipients and adding new users in
stream settings.
2017-06-08 12:01:03 -07:00
Akhil cc0dbef5a4 typeahead: Move highlight_with_escaping into render_person. 2017-06-08 12:01:03 -07:00
wizsid11 d309cd29f3 webhooks/zapier: Add weather update example.
Add documentation for weather update through Zapier.
Contains tests and fixtures for weather example.

With minor fixes, docs migration to Markdown, and
rebasing by Eeshan Garg.
2017-06-08 09:14:18 -07:00
Feorlen 7124098a8e Explain how to add Swagger REST API doc coverage in zulip.yaml.
Introduce Swagger UI and the Swagger/OpenAPI specification. Explain
the structure of zulip.yaml and show examples of different sections
of the file.

This is a new file in /docs not yet included in the Read the Docs
table of contents. Where it should go should be determined as we iterate
on the Swagger UI integration and expand REST API doc coverage using it.

For more on Swagger UI and how Zulip uses it, see:
https://github.com/zulip/zulip/issues/3474
https://github.com/zulip/zulip/pull/3397

With some minor tweaks to advertise this by tabbott.
2017-06-07 22:46:20 -07:00
Tejas Kasetty 1415efea55 emoji-picker: Order emoji filter list after each search.
* change emoji-container to 'flex' display inorder to support ordering
  of the contents (emojis).
* order emojis after each filter. The ordering is based on search string
  and is similar to the ordering in emoji typeahead.

Fixes #4806.
2017-06-07 21:54:07 -07:00
Tejas Kasetty 27009e9708 util.js: Fix prefix_sort logic to not mutate input.
In prefix sort, shifting of objs list to iterate through the elements
caused the 'emoji_show_list' to be emptied each time it was passed as
argument for sorting.

This modifies prefix sort to prevent it from modifying the objs list passed
as argument - changed it to normal iteration rather than popping
the elements from objs list.
2017-06-07 21:54:07 -07:00
Joshua Pan ccd880094e util.js: Refactor util.strcmp into util.make_strcmp. 2017-06-07 19:45:46 -05:00
Joshua Pan 73ea9079b9 Move preview_node() to blueslip.js. 2017-06-07 19:45:46 -05:00
Sarah 9ebb503340 settings_notifications.js: Save notification settings on change.
Refactor settings_notifications to save each setting on change.

Fixes #3264.
2017-06-07 13:39:27 -07:00
Sarah baf92b98f2 settings_notifications.js: Refactor using notification_settings variable.
Create an array of all user notification settings and loop through it
to update notification settings and display results.
2017-06-07 13:33:08 -07:00
Harshit Bansal 0aaf434176 settings/bots: Fix broken tooltip. 2017-06-07 13:24:07 -07:00
Jack Zhang 98a785bb25 message_edit: Replace highlighting replaced text with delete / insert.
Rationale: For the more off-to-the-side edit history view, changes
are easier to digest by highlighting deleted content in red followed
immediately by added and changed content in green.

TODO: Toggle for showing the edited messages without highlighting;
deleted content would not be shown in this view.
2017-06-07 11:06:15 -07:00
Jack Zhang a3557b8d2c message_edit: Style text & highlights for inserted/deleted text.
Changed to: red and line-through for deleted text, green for inserted
text. This should increase contrast.
2017-06-07 11:06:15 -07:00
Steve Howell ce1dd9f50b presence: Do not show bots in the buddy list.
(Before this fix, we were showing empty circles for bots
in small realms.)
2017-06-07 10:36:26 -06:00
Joshua Pan bbc0103183 drafts.js: Create initialize() function. 2017-06-07 00:01:55 -07:00
Tejas Kasetty ba91d7f59f zulip.css: Remove dead realm emoji CSS.
Removes .emoji.realm-emoji; it hasn't been used in months.
2017-06-06 22:54:45 -07:00
Akhil 6adf241d7e message_edit: Avoid always fetching raw content.
Altered message_edit.start to check for message.raw_content before
retrieving the same from the backend.

With tweaks by tabbott to update, rather than delete, on repeated
edits.

Fixes: #4404.
2017-06-06 22:41:27 -07:00
Aditya Bansal 1143aec53b Clean 404.html to use 4 space indentation. 2017-06-06 22:00:36 -07:00
Cory Lynch 4056ae9cc9 composebox_typeahead: Fix stream typeahead highlighting.
Changed the highlighting method used by the stream input field.
The one now in use supports spaces in the input.
Fixes #5211
2017-06-06 21:19:28 -07:00
Abhijeet Kaur 60ff82ed7c bots: Add UI for creating different types of bot.
Add 'Type of bot' option for bots by adding dropdown option in
settings->"Your bots".  For now, this allows creating incoming webhook
bots in addition to default bots.

This will enable users to add a bot as an incoming webhook
(in addition to add full-featured bots).

With various minor tweaks and cleanups by tabbott.

Fixes #2186.
2017-06-06 21:11:22 -07:00
Sarah 381ec1f5d4 settings_notifications.js: Refactor using notification_settings variable.
Create an array of all user notification settings and loop through it
to update notification settings and display results.

Formatting tweaked by tabbott.
2017-06-06 20:35:56 -07:00
David Coleman 0be5178759 refactoring: timerender maintains list of objects instead of arrays.
The function maybe_add_update_list_entry() will push objects instead
of arrays onto the list of timestamps that need updating. This
should improve readability.
2017-06-06 20:01:21 -07:00
David Coleman 13915740bb refactoring: use class attr to identify timerender date <span>.
The floating_recipient_bar is cloned from recipient_bar elements.
The cloning created elements in the DOM with duplicate id
attributes, specifically <span id="timerender{id}">, which
contains the date of the message stream. The timerender span
will now use class="timerender{id}" instead.

Fixes #4997.
Fixes #5128.
2017-06-06 20:01:21 -07:00
David Coleman 01d303da3e message view: show recipient_row_date when floating bar is hidden.
Force display of the top-most recipient_bar's recipient_row_date
when the floating_recipient_bar is just about to overlap and
becomes hidden while user is scrolling.

Fixes #4844.
2017-06-06 20:01:20 -07:00
Tim Abbott acc83a3fcc locale: Update a few last translation strings. 2017-06-06 13:57:08 -07:00
Tim Abbott 16a54ad837 locale: Update German and Spanish strings. 2017-06-06 12:56:53 -07:00
Tim Abbott 968f65686f locale: Update strings for Zulip 1.6 release. 2017-06-06 11:54:28 -07:00
Tim Abbott ec6abddc38 portico: Remove obsolete code for Zulip open sourcing announcement.
This was only ever used on the old zulip.com.
2017-06-06 11:36:03 -07:00
Jack Zhang 84e5fe733c message-editing: Show date lines between edits from different days.
Added show_date_row field to each item of content_edit_history.
We use date lines to separate events that happened on different days.

Fixes #4638.
2017-06-06 11:04:30 -07:00
Jack Zhang 0534a4c42d message-editing: Optimize timestamp format to display only hours & minutes 2017-06-06 11:03:37 -07:00
Cynthia Lin 8e0b1bec9d bookend: Remove .sea-green class for Unsubscribe state. 2017-06-06 08:31:09 -07:00
rht 486e4e30da Update 'OS X' reference to macOS. 2017-06-05 22:11:34 -07:00
Tim Abbott bbbd924bdf bookend: Add i18n tags for bookend notices. 2017-06-05 16:55:56 -07:00
Cynthia Lin 11e68606b4 design: Improve design of Subscribe/Unsubscribe buttons in message view.
Tweaked by tabbott to use an existing button style.

Fixes #5196.
2017-06-05 16:55:56 -07:00
Tim Abbott b89be3f54b bookend: Make ordering of subscribe bookends consistent.
Previously, if we had both a date and a subscribe bookend, they would
appear in one order after new messages were sent (bookend_bottom of
the top group), and another after a reload (bookend_top of the bottom
group).  This makes the experience consistently a bookend_top.
2017-06-05 16:43:26 -07:00
Tim Abbott 70d414b62c bookend: Switch whitespace from padding to margin.
This creates more consistent spacing for bookends in relation to
actual message groups.
2017-06-05 16:27:57 -07:00
Tim Abbott 235bf65668 bookend: Only show bookend buttons in trailing bookends.
Apparently, this template was just always missing this check.

Fixes #5237.
2017-06-05 16:27:57 -07:00
Tim Abbott 113b64ad4b bookend: Add missing i18n tags on bookends. 2017-06-05 16:27:57 -07:00
Cynthia Lin b561b19d24 settings: Add notice for non-admin users about read-only access.
With contributions from Brock Whittaker and Tim Abbott.

Fixes #5165.
2017-06-05 15:41:36 -07:00
Tim Abbott f724c0fbd3 hotkey: Fix 'P' hotkey narrowing to use first unread message.
Previously, this hotkey was not correctly using the use_first_unread
option, and thus would take you to the close to your pointer, not your
first unread private message.

Fixes #5238.
2017-06-05 15:21:47 -07:00
Cynthia Lin dd1f3cfcb6 hotkeys: Include .editable-section in processing_text().
Prevents accidental hotkey triggering while span.editable-section is
focused.  Fixes #5232.
2017-06-05 13:46:37 -07:00
Vaida Plankyte 5fe7ed8afa settings: Make notification settings header consistent.
Fixes #5172.
2017-06-05 10:37:05 -07:00
Tim Abbott 47465ea51a message_list: Fix missing date boundaries for newly sent messages.
When receiving the first new message of a new day, we were previously
not showing a date separator line before the message.

Fixes a regression introduced
in 00c7f7d42f.
2017-06-05 09:13:02 -07:00
Harshit Bansal edfe595bf2 notifications: Fix incorrect narrowing behavior on Firefox.
On clicking a notification, the web app was not being narrowed to the
message topic on firefox. We now narrow to the message topic if a user
clicks on a notification. It was working correctly on Google Chrome.

Fixes: #5220.
2017-06-04 14:04:45 -07:00
Tim Abbott bd81f66e01 settings: Fix ugly exclamation on default streams errors. 2017-06-04 10:42:41 -07:00
Tim Abbott eb25c6be87 user_info_popover: Fix incorrect icon for sending a private message.
Thanks to Nash Vail for noticing this issue.
2017-06-04 09:57:55 -07:00
Tim Abbott cbce98edd6 Support informational overlays in hashchange system.
This helps the !modal_link links in our tutorial messages.

Fixes #5206.
2017-06-03 18:39:47 -07:00
Yago González 7225b7bdf8 docs: Move Swagger file to static/swagger. 2017-06-03 15:45:15 -07:00
Steve Howell 73afce23a0 Check for errors in process_read_message().
Report an error and early-exit if a stream message does
not have a stream_id for some reason.
2017-06-03 06:30:01 -06:00
Steve Howell 79acbcd1bf Refine error handling for stream_list.get_stream_li calls.
We avoid false warnings in get_stream_li and for updating
unread counts.  We also early-exit for A/D keys if there is
no current stream.
2017-06-03 06:16:45 -06:00
Cory Lynch 76a497650b docs: Update feature tutorial for server_events_dispatch.js. 2017-06-02 16:51:46 -07:00
Cory Lynch 5d7828096e Split out server_events_dispatch.js from server_events.js. 2017-06-02 16:49:18 -07:00
Steve Howell 24d443a061 Have stream_list.get_stream_li() use stream_sidebar.get_row().
Given a stream id, we now find list items using the internal
data structures we created when we built the sidebar, rather than
using a jQuery selector.
2017-06-02 16:32:39 -07:00
Steve Howell dc2be44daf refactor: Clean up timerender.render_date_span(). 2017-06-02 14:18:51 -07:00
Steve Howell ed49673555 stream_list: Use append() instead of appendTo().
Using append() is easier to unit test, and we avoid
creating a temporary jQuery object from the array
of sidebar rows.
2017-06-02 14:11:11 -07:00
Steve Howell fdea8f9334 Create stream_list.initialize(). 2017-06-02 14:11:11 -07:00
Yago González f878de8bd9 docs: Generalize the use of single quotes. 2017-06-02 14:08:57 -07:00
Yago González 08292f17a1 docs: Remove unnecesary quotes. 2017-06-02 14:08:57 -07:00
Yago González 6121a7ebd4 docs: Fix validation in the Swagger YAML file. 2017-06-02 14:08:57 -07:00
Tim Abbott c250c8647d gear_menu: Fix traceback accessing i18n before it is initialized. 2017-06-02 14:03:56 -07:00
Joshua Pan 7be1576513 people.js: Refactor get_user_time function. 2017-06-02 06:30:40 -06:00
Jeremy Bowman 2137aadda0 portico: Make the realm icon an img element.
The realm avatar icon on the login and registration pages was
being set as a background image, which could vanish in high
contrast mode in many browsers.  Converted it to an img tag and
verified that it is still styled correctly.  I think the empty
alt attribute (to remove it from the audio description) is
appropriate in this context, since the realm name and description
are already provided immediately afterwards in the page content.

Fixes #4889.
2017-06-01 22:07:43 -07:00
Steve Howell d36e528fdd minor: Fix comment in unread.get_counts(). 2017-06-01 13:28:44 -06:00
Akhil 64f2b51496 typeahead: Add pm_conversations module.
In pm_conversations.js, added function to make a user a PM partner and
another function to check if a user is a PM partner. A PM partner is
someone with whom the user has been in a PM with.
2017-06-01 08:05:37 +00:00
Akhil f04da3d52e typeahead: Add recent_senders module.
In recent_senders module, added a data structure to hold timestamps of
users' latest message in a topic. Also added a function to compare 2
users based on above timestamp. Added a function to process messages for
the data structure and a call in add_message_metadata. Also added node
tests for insertion of data into recent_senders.senders.
2017-06-01 08:05:37 +00:00
Harshit Bansal 8aa2949b4d settings: Fix traceback on opening emoji settings tab.
Realm emojis uploaded before the migration to store the emoji author
information was done don't have any author information. Such emojis
if listed on the settings page caused a traceback.

Fixes: #5133.
2017-05-31 17:17:51 -07:00
Cynthia Lin 09419aa027 hotkeys: Allow `n` key to work on PMs.
Fixes #4885
2017-05-31 18:00:57 -06:00
Steve Howell cc81b7892d Add process_visible() call to maybe_select_closest().
This fixes a regression where we removed a call to
unread_ops.process_visible() inside of stream_list.js.  Now
we call it from within narrow.activate() in the the
maybe_select_closest() callback.
2017-05-31 12:40:57 -06:00
Harshit Bansal fc0fb66d28 emoji: Fix realm emoji not appearing in settings page when reopened.
When the emoji settings page was reopened after uploading a realm
emoji without doing a page refresh, the uploaded emoji disappeared
from the emoji list. This was so because the emoji settings page uses
`page_params.realm_emoji` to render the emojis which was not updated
when a emoji was added.

Fixes: #5130.
2017-05-31 09:12:45 -07:00
Cynthia Lin b81e7ad51f hotkeys: Fix arrow key navigation in Streams modal.
Previously, one could not move past unsubscribed streams in the
Subscribed tab.

Fixes #5066.
2017-05-30 22:51:35 -07:00
Steve Howell 4ec1260b41 reactions.js: Have an initialize() function. 2017-05-30 21:43:18 -07:00
Steve Howell e7345bdd7f Improve error reporting in maybe_activate_stream_item.
This change should lead to clearer tracebacks when our
assumption about the stream list's list items get
violated, and we also short circuit some code in the
caller that tries to scroll to the active stream.
2017-05-30 21:26:55 -07:00
Steve Howell 561fba65d2 Remove spurious call to unread_ops.process_visible().
In stream_list.js we have some code to handle narrow activations,
and we were calling unread_ops.process_visible() only for
stream activations, not for PM-related activations, etc., so
our approach was inconsistent.

It also turns out that the call is redundant, since we call
unread_ops.process_visible() when the message pane scrolls as
part of updating the content.

Ideally, we want a more rigorous approach where we make this
call precisely when the new messages become visible to the user,
but the purpose of this fix is to de-clutter the stream_list
logic.
2017-05-30 21:26:55 -07:00
Cynthia Lin 76537665b9 integrations: Optimize SVG graphics. 2017-05-30 11:15:56 -07:00
Cynthia Lin 26afd4c162 integrations: Modify styling to emphasize label text. 2017-05-30 11:15:56 -07:00
K.Kanakhin 2434f2d96c messages: Add support for admins deleting messages.
This makes it possible for Zulip administrators to delete messages.
This is primarily intended for use in deleting early test messages,
but it can solve other problems as well.

Later we'll want to play with the permissions model for this, but for
now, the goal is just to integrate the feature.

Note that it saves the deleted messages for some time using the same
approach as Zulip's message retention policy feature.

Fixes #135.
2017-05-29 21:59:38 -07:00
Harshit Bansal 7126f6f30c settings: Allow either admin or realm emoji author to delete it.
If a realm is configured to allow any user to upload a realm emoji
then that user should also be allowed to delete the emoji in case
he feels it doesn't look good or if he uploaded a wrong emoji file.
This commit tweaks the realm emoji settings UI to allow an user who
uploaded an emoji to delete it.

Fixes: #4761.
2017-05-29 20:21:26 -07:00
Steve Howell ecbbc8788a Move code from reactions -> emoji_picker.
This moves all the code dealing with emoji_picker
navigation and click/enter events to emoji_picker.js.

Some of the code still delegates back to reactions.js
in some way.

The navigate() code really does nothing reaction-specific,
nor does filter_emojis(), nor do some of their helpers.

This was mostly moving code, but I also did some
s/reaction// or s/reaction/emoji/ in names.
2017-05-29 17:10:05 -06:00
Steve Howell 3654406f17 Simplify/rename code to choose reaction in emoji picker.
We now call the function toggle_selected_emoji(), and it
is simpler in these ways:

    * We get the selected emoji more directly.
    * We reuse code in toggle_emoji_reaction().
2017-05-29 17:10:05 -06:00
Steve Howell ed2ceb49cb Use toggle_emoji_reaction for "+" hotkey.
This is a more direct codepath when we know which emoji
we want to toggle.
2017-05-29 17:10:05 -06:00
Steve Howell 1ee757a237 Use toggle_emoji_reaction() in the emoji picker.
If we know the name of the emoji you need to toggle,
we can toggle_emoji_reaction(), which is less complex
than toggle_reaction().
2017-05-29 17:10:04 -06:00
Steve Howell 805c99ae27 Add hide_emoji_popover() to toggle_emoji_reaction().
This change sets us up to de-duplicate some code.  It
changes behavior for the edge case situation where
you had the reaction menu open but then decide to
click on one of the existing reactions.  This change
closes the emoji popover, which is probably the
correct behavior.
2017-05-29 17:10:04 -06:00
Steve Howell 63d0711c4b Rename message_reaction_on_click() to toggle_emoji_reaction().
This prepares us to de-duplicate some code.
2017-05-29 17:10:04 -06:00
Steve Howell affff8ac82 Extract reactions.set_reaction_count. 2017-05-29 14:59:52 -07:00
Steve Howell 1747223c35 reactions: Refactor remove_reaction().
* Add whitespace/comments.
    * Use find_reaction() helper.
    * Handle full-removal earlier in block.
    * Sequence operations in a more organized way.
2017-05-29 14:59:52 -07:00
Steve Howell 5c405f7048 reactions: Refactor add_reaction().
This commit splits out some helper methods to make it easier
to test:

    get_reaction_section
    find_reaction
    get_add_reaction_button
    update_existing_reaction
    insert_new_reaction
2017-05-29 14:59:52 -07:00
Rohitt Vashishtha 2d73e03e37 ui-refactor: Rename modals.js to overlays.js.
Fixed #4702.
2017-05-29 11:24:46 -07:00
David 43e76816ff message view: Recipient bar date stamp shows older years.
timerender.js render_now() will always include older
years when rendering the date stamp on the recipient bar
and the date rows above messages.

Fixes #4843.
2017-05-29 08:54:06 -07:00
David fcf97660db testing-coverage: add node tests for timerender.js.
Initial set of tests for the timerender.js module.

Fixes #4819.
2017-05-29 08:51:28 -07:00
David ea3c994186 refactoring: timerender.js render_now() returns an object.
The render_now() function in timerender.js will now return
an object instead of an array, which is then passed to the
functions render_date_span() and update_timestamps().
This should increase readability and extensibility.

Fixes #4820.
2017-05-29 08:51:24 -07:00
Rohitt Vashishtha 442537ebb8 overlays: Rename hashchange.exit_modal() to exit_overlay. 2017-05-28 18:40:54 -07:00
Pweaver (Paul Weaver) bbb3aad611 Add typescript support to asset compilation. 2017-05-28 17:28:28 -07:00
Tejas Kasetty f48df30c20 typeahead: Move prefix_sort helper to util.js.
This will allow us to call this function from the reactions code as
well.
2017-05-27 09:37:57 -07:00
Sarah e304c47970 settings_org: Split out separate forms for orgs settings/permissions/auth.
Steve Howell also contributed to this PR.
2017-05-25 14:18:04 -07:00
Reid Barton 96dff66743 katek: Make tex errors gray.
Red is too visually loud for a medium where tex errors are not fatal
(readers will be still able to understand the tex source).
2017-05-25 10:57:10 -07:00
Reid Barton f1eb8545b8 katex: Fix line height of inline math.
24cbd6113 changed the line height of katex HTML to avoid overlapping
lines in wrapped math displays. But the change also applied to inline
math, resulting in large vertical gaps in a multi-line paragraph
containing inline math elements.
2017-05-25 10:49:56 -07:00
Mehanig 3f5d0e69fb Build and handle jsfiles using webpack instead of django-pipeline.
Also renames bundle.js to translations.js.
2017-05-24 18:38:03 -07:00
Elliott Jin 573e06260a Don't initialize bot_data until after people.initialize()
bot_data initialization depends on the results of people.initialize(); for
example, to determine whether a bot is owned by the current user.
2017-05-24 17:58:57 -07:00
Steve Howell ee17f8fc8d Move mousemove function into initialize(). 2017-05-24 17:41:41 -07:00
Steve Howell 4d6ca1ab70 Introduce compose_fade.initialize(). 2017-05-24 17:41:40 -07:00
Steve Howell 884d9d1a2d Simplify unread count display logic in buddy list.
This commit de-couples the PM code from Group code.  It also
simplified some code related to finding parent elements by
both introducing local variables and removing unnecessary
selectors.
2017-05-24 13:07:33 -07:00
root e809faa37d docs: Document /users/me/subscriptions API endpoint. 2017-05-24 12:49:08 -07:00
Cynthia Lin 2045426ab9 hotkeys: Change subscribe stream hotkey to `S`. 2017-05-24 12:19:15 -07:00
Cynthia Lin 6993f8900a subs: Focus in Filter streams input when menu is first opened. 2017-05-24 12:19:15 -07:00
Yago González 40fa0f64f6 docs: Fix indentation. 2017-05-24 11:41:49 -07:00
Yago González bd5fba4a64 docs: Fix inheritance in /messages/{message_id}. 2017-05-24 11:41:49 -07:00
Yago González 55664b1a93 docs: Fix JsonResponse definition. 2017-05-24 11:41:49 -07:00
Nick Dickey 6ac13a0f0d docs: Document /messages API endpoint. 2017-05-24 11:41:49 -07:00
Steve Howell d5d6d47287 Fix unread counts for Group PMs.
The variable name "name" was completely wrong, and I guess
this never generated a traceback or lint error.
2017-05-24 09:18:24 -07:00
Brian Tenazas 9d485a0415 docs: Document /streams API endpoint. 2017-05-23 20:37:51 -07:00
Yago González 9f329f6597 docs: Fix JsonSuccess and JsonError models. 2017-05-23 20:37:51 -07:00
Yago González b668b869c1 docs: Improve /messages/{message_id} PATCH. 2017-05-23 20:32:46 -07:00
Yago González 90301a4d93 docs: Fix indentation in lines started with a hyphen. 2017-05-23 20:30:21 -07:00
Yago González 1fc1cafd6f docs: Make Swagger "require" fields uniform.
As the Swagger specification indicates, whether the properties inside a
model are required or not must be defined inside a separate "required"
field at the root of the model.

For fields like "parameters", that has to be specified inside each
parameter's key.
2017-05-23 20:30:21 -07:00
Yago González fa081146d1 docs: Remove unnecessary "produces" keys. 2017-05-23 20:30:21 -07:00
Yago González 735fc5e0cd docs: Remove unnecessary ErrorModel definition. 2017-05-23 20:30:21 -07:00
Yago González 4bb1c566a9 docs: Remove "optional" notes in descriptions. 2017-05-23 20:30:21 -07:00
Yago González d56ec79dd9 docs: Create JsonSuccess and JsonError definitions. 2017-05-23 20:30:21 -07:00
Steve Howell c02f4b4756 Add people.initialize().
This makes us not have to stub jquery in many of our node
tests!
2017-05-23 19:35:08 -07:00
Tim Abbott 207c30fc9c Revert "settings: Fix missing status report when waiting period disabled."
This reverts commit a25e7451f6.

This changed the wrong if statement in this file.
2017-05-23 17:02:35 -07:00
Sarah 01cb480b2c settings-org.js: Create property_types object and refactor set_up.
Create property_types object for realm settings. In set_up function,
iterate over property_types to find settings that were updated, send those
new values to the server, and report that the changes were made.
2017-05-23 16:32:36 -07:00
Tim Abbott a25e7451f6 settings: Fix missing status report when waiting period disabled.
Previously, if one set the waiting period threshhold to 0, no
notification would be produced, even though the actual state of the
world was changed.
2017-05-23 16:31:41 -07:00
Ryan Backman 973b18bf2f docs: Document messages/{message_id}. 2017-05-23 15:01:26 -07:00
Yago González 15da8d19e7 docs: Update API authentication definitions. 2017-05-23 12:35:41 -07:00
Joshua Pan 25b61f2af6 message_edit: Close edit with ESC.
Fixes #3797.
2017-05-23 12:34:08 -07:00
Joshua Pan c955028350 gear_menu.js: Fix typo. 2017-05-23 10:34:07 -07:00
Joshua Pan c78b310381 hotkeys: Close clicked gear menu with ESC.
Fixes #4200.
2017-05-23 10:34:07 -07:00
Tim Abbott 835f0c9961 HTML: Fix duplicate useless IDs in message_edit_form.
These ID elements in the message edit forms were never used, and were
they used, would have been broken anyway.  We fix this by just
removing them.

Fixes #4913.
2017-05-22 18:40:21 -07:00
Cynthia Lin b1f94cb173 user docs: Update message UI screenshots.
Fixes #4763
2017-05-22 18:35:22 -07:00
Cynthia Lin bef256ebbb user docs: Update login button screenshots. 2017-05-22 18:35:22 -07:00
Cynthia Lin d21264d4b0 user docs: Update search bar UI screenshots. 2017-05-22 18:35:22 -07:00
Cynthia Lin 7175d79e21 user docs: Update settings/organization modal screenshots. 2017-05-22 18:35:22 -07:00
Cynthia Lin eba2ee9cba user docs: Update Invite users screenshots. 2017-05-22 18:35:22 -07:00
Cynthia Lin e4543a98ff user docs: Update Streams modal UI screenshots. 2017-05-22 18:35:22 -07:00
Cynthia Lin a88c5091bd user docs: Update custom link filter screenshots. 2017-05-22 18:35:22 -07:00
Cynthia Lin 6b9dfcec4e user docs: Delete *View information about a message* doc.
Deprecated feature; replaced by message sender info.
2017-05-22 18:35:22 -07:00
Cynthia Lin 561cb64f33 user docs: Update docs with compose box UI changes. 2017-05-22 18:35:22 -07:00
Cynthia Lin 314a506890 user docs: Update *The Zulip browser window* doc. 2017-05-22 18:35:22 -07:00
Cynthia Lin 226e30d9ea user docs: Update *Add custom emoji* doc. 2017-05-22 18:35:22 -07:00
Cynthia Lin 58bec1aa37 user docs: Update right sidebar images. 2017-05-22 18:35:22 -07:00
Cynthia Lin bfcb0552e8 user docs: Merge *The announce stream* and *Make an announcement* docs. 2017-05-22 18:35:22 -07:00
Cynthia Lin 6977232dcc user docs: Update *Zulip on Android* doc. 2017-05-22 18:35:22 -07:00
Cynthia Lin 8211e19074 user docs: Update *Format your messages using Markdown* with UI changes. 2017-05-22 18:35:22 -07:00
Cynthia Lin bafa976376 user docs: Update *Add a bot or integration* with UI changes. 2017-05-22 18:35:22 -07:00
Ryan Backman 3d54607788 docs: Document user_upload. 2017-05-22 18:24:26 -07:00
Josiah Philipsen df7eaa8868 docs: Document user presence endpoint. 2017-05-22 18:18:20 -07:00
Brendan Kiu 361ba50a54 lightbox: select nearest image on 'v' hotkey.
Loop through previous messages to find first instance of a valid image.

Fix: #4217.
2017-05-22 15:02:38 -07:00
Josiah Philipsen d72c961ab2 zulip.yaml: Change unexpected error with proper results.
The error message under "Unexpected errors" was not the format we
received for any errors. We changed it to be msg and result to fit
with the results we got when for standard Zulip JSON errors.
2017-05-22 14:42:48 -07:00
Yago González f9f00374d6 api: Add Swagger YAML file.
Authored-By: Andrea Longo
2017-05-22 10:29:24 -07:00
Steve Howell e00f9f3dcb Split out Organization Permissions page. 2017-05-18 12:37:03 -07:00
Brock Whittaker a88ca9fafc emoji-reactions: Fix reactions to not break inline-block display.
This fixes the reactions to not break a new line by changing them from
a weird combination of “float: left” and “display: block” (inlined), to
just “display: inline-block”.

With fixes from Harshit Bansal for an issue with using the hotkeys in
a filtered popover.

Fixes: #4818.
2017-05-17 12:49:40 -07:00
Tim Abbott e12d3100db settings: Fix whitespace leak in organization description.
Previously, the way the organization description textarea was
generated, there'd be a newline and ~12 spaces added each time on
reloaded the page and hit "save changes".

This change makes it so that the organization description only changes
when the user actually changes it.
2017-05-17 12:11:10 -07:00
Brock Whittaker ed767481f5 settings: Clean up organization and user settings pieces.
This cleans up the styling of the organization and the user settings
components to be more responsive and have more consistent styling with
the rest of the overlays.
2017-05-17 12:08:31 -07:00
Tim Abbott 6e66495c38 auth: Fix authentication methods checkboxes disabling.
Apparently, there were not correctly disabled if you clicked on
"authentication methods" after opening the settings UI another way.
Everything worked fine if you just clicked them, already.
2017-05-17 11:54:55 -07:00
Brock Whittaker b00f7f09bc components: Darken checkbox default color.
This darkens the default checkbox color to be more contrasty as to not
look like they are disabled.
2017-05-17 11:54:55 -07:00
Steve Howell 3ca10dd6f5 Select first unread message when using the "n" key. 2017-05-17 11:28:33 -07:00
Steve Howell d0ea11f355 Have "n" key skip muted streams. 2017-05-17 11:28:33 -07:00
Steve Howell 6f73b7953f Have "n" key skip muted topics. 2017-05-17 11:28:33 -07:00
Harshit Bansal d827cc878b emoji.js: Remove unnecessary indirection.
Remove unnecessary function `emoji_name_to_css_class()` called while
populating `emojis_name_to_css_class` dict.
2017-05-17 08:09:50 -07:00
Harshit Bansal bf97734c57 reactions: Fix broken rendering of flag emojis in reactions.
Use the patched css classes for rendering flag emojis in reactions.
2017-05-17 08:09:50 -07:00
Harshit Bansal a549013c50 emoji_pickers: Fix broken flag emojis.
Due to differences between the codepoints of flag emojis in
`emoji_map.json` and iamcal's dataset, we need to patch the
css classes for the flag emojis temporarily until the migration
to iamcal's dataset is complete inorder to render them properly.
There is a difference between the images of flag emojis in our
old emoji farm and iamcal's spritesheets and since we have not
yet switched to using spritesheets for displaying emojis in
messages, there is a difference between the flag emojis as
rendered in messages and in emoji pickers.
2017-05-17 08:09:50 -07:00
Steve Howell 7d153c9f8a Revert "muting.js: Track muted streams using stream id."
This reverts commit c7f710b8d4.

Because the back end still stores muted topics fundamentally using
stream name as a key, trying to cut over the client to use stream
id was just making things more brittle.  Mutes would work after
renaming the stream, which was progress in the change that we
revert here, but only until page load.  The other problem, which
is more severe, is that the order of page loading functions would
cause no mutes to happen at page load time.  This could be fixed
to some degree, but we should do a deeper fix on the back end.
2017-05-17 07:06:32 -07:00
Tim Abbott a6af57e90d css: Fix floating recipient bar border appearing when bar hidden.
It's the .recipient_row, not the .floating_recipient element, that
gets `display: none` added when the floating recipient bar is hidden.
2017-05-16 23:50:38 -07:00
Rishi Gupta 8b9929e771 alerts: Restyle alert banners.
Changes the background to be white, among other things.
2017-05-16 23:34:45 -07:00
Cory Lynch 24cbd61131 css: Fix KaTeX summation alignment and line wrapping.
Previously, the sum (capital sigma) operator would become
misaligned so that the lower and upper bounds are placed in
the wrong location. Changing the line height fixes this alignment.

Also, previously, wrapping long lines of TeX did not work, as often,
the different lines of math would overlap with each other.

Fixes #4657.
2017-05-16 23:29:36 -07:00
Tim Abbott 34a8e6c3a2 gear_menu: Eliminate scrollTop for non-home tabs.
We should be able to eventually further clean this up to do nothing,
since we now don't have tabs over than the home tab.  But I'm leaving
that for a future issue.
2017-05-16 20:37:00 -07:00
Tim Abbott 72720fcf2e settings: Remove obsolete message_viewport.scrollTop() calls.
These date from long before the settings UI was restructured as an
overlay.  Now, instead of ensuring that error messages are visible,
they just scroll the message feed incorrectly.

Fixes #4810.
2017-05-16 20:33:52 -07:00
Tim Abbott cab908b664 api: Move notifications_stream into the register_ret API.
While we're at it, we at least fix the API to use a stream ID, not a
stream name, to refer to the notifications stream.
2017-05-16 18:57:14 -07:00
Tim Abbott 8c172063e0 message_fetch: Increase batch size for message backfill to 1000.
There's no advantage to doing a small batch size towards current here,
since latency isn't an issue at this point, and performance on the
server side generally favors larger batch sizes.

This also will make it significantly harder to start getting 429 rate
limiting errors when loading when far behind current.
2017-05-16 18:32:48 -07:00
David 942520123c message view: Render formal date string as tooltip on recipient row
A formal date string will be assigned to the title attribute of the
recipient_row_date and date_row elements.
e.g. Wednesday, April 5, 2017.

Fixes #4663.
2017-05-16 16:58:22 -07:00
Tim Abbott feda8cd012 css: Fix missing top border in PM recipient bars.
Technically, they were also missing on stream message recipient bars,
but the difference was invisible.
2017-05-16 14:48:37 -07:00
Tim Abbott d1fb4aa130 css: Fix missing right border in PM recipient bars. 2017-05-16 14:48:37 -07:00
Tim Abbott 5048edc25c css: Decrease vertical space at top of feed.
This is system unfortunately has a rather complicated calculation to
compute the offsets correctly, but the net effect here is that the top
section of the Zulip window is much more space-efficient.

Shrinking the tab bar underpadding, part of this change, fixes #4444.

We only need the underpadding to be as tall as the space above the
floating recipient bar, which is definitely less than 10px, so I don't
anticipate regressions caused by this.
2017-05-16 14:48:34 -07:00
Tim Abbott 00c7f7d42f Remove date separators from the top of the message feed.
Now that we have the date visible in the recipient rows, we no longer
need a top-of-feed date separator.

Fixes #4581.
2017-05-16 14:47:04 -07:00
Steve Howell b9cc3a16a4 minor css: Add margin above "Announce stream".
The margin makes it slightly more clear that "Anyone can join"
vs. "People must be invited" is the main decision to make here.
2017-05-16 10:43:27 -07:00
Steve Howell 22c1231222 Hide "Announce stream" if realm has no "announce" stream.
When you create a stream, there was always an "Announce stream"
option that would be enabled for public streams.

We are about to make it so that we never send PMs to announce
new streams to folks, so the only mechanism will be sending a message
to the realm's notification stream.  If a realm has no notifications
stream, the decision is moot, so we hide the option.
2017-05-16 10:43:27 -07:00
Harshit Bansal c549dea9ac bugdown: Fix the regex used for unicode emoji matching.
The regex we were using didn't cover all the unicode blocks
to which our emojis belong. This commit fixes the regex to
include all the unicode blocks and also updates the
corresponding JS regex in marked.js.

Fixes: #3460.
2017-05-16 09:05:42 -07:00
Tim Abbott 8f488eb4d6 compare: Lower font weight for Xs. 2017-05-15 23:23:26 -07:00
Tim Abbott 5c745bf72a landing: Fixup styling of /compare/ page. 2017-05-15 22:21:04 -07:00
Tim Abbott f4a049110f navigate: Fix incorrect reference to narrow.stream().
This was renamed to narrow_state.stream() recently.
2017-05-15 21:07:00 -07:00
Tim Abbott 2007144c23 css: Fix arrangement of streams in new user invitations.
Previously, they were line-wrapped in an ugly fashion.
2017-05-15 20:43:24 -07:00
digi0ps 729bd6af12 settings: Enter now submits the data in Default stream settings.
Fixes #4232.
2017-05-15 20:36:18 -07:00
digi0ps 6f7b973d3b settings: Fix error handler for Default Streams.
Updates the error handler code to be consistent with how errors
are displayed everywhere else.
2017-05-15 20:34:45 -07:00
digi0ps 63587d6b70 settings: Add submit button for Default Stream form. 2017-05-15 20:34:17 -07:00
Tim Abbott df5a0e7c92 hotkeys: Simplify logic for checking for subscriptions page. 2017-05-15 20:28:56 -07:00
Cynthia Lin 4cc33b6173 hotkeys: Disable enter hotkey while Streams menu is open.
Prevents compose box from opening and potentially sending a message.
Fixes #2412
2017-05-15 20:28:56 -07:00
Steve Howell c7f710b8d4 muting.js: Track muted streams using stream id.
This should prevent some glitches with stream rename events.
2017-05-15 14:47:41 -07:00
Steve Howell 8eb9723283 stream_list: Call update_streams_sidebar() on renames.
If you rename a stream, call update_streams_sidebar() to
make sure we redraw the active stream correctly.
2017-05-15 14:47:41 -07:00
Steve Howell 76f68e9836 Fix buggy update_streams_sidebar().
If you were narrowed to an unpinned stream, and then pinned it,
we were mostly redrawing the sidebar correctly, but we weren't
setting the active-filter class.  Now we accomplish this by
calling maybe_activate_stream_item(), which also reduces some
code duplication.  (The new code introduces a bit of extra logic
to do `stream_li.addClass('active-filter')`.
2017-05-15 14:47:41 -07:00
Steve Howell 5b6bd6767b refactor: Extract stream_list.maybe_activate_stream_item(). 2017-05-15 14:47:41 -07:00
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
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 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 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
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 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 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
hackerkid cf15a7b561 presence.js: Make get_status return active for logged in user. 2017-05-12 14:28:23 -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 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
Steve Howell f0b30b57ca modals: Make error reports more specific.
We now give a more specific error message when something goes
wrong in closing a modal.
2017-05-12 08:27:25 -07:00
Cory Lynch 08f1c86041 Make reaction picker case-insensitive.
The search bar for picking message reactions now is case-insensitive,
since that's a better user experience, and there isn't a clear use
case for capital letters in emoji names.

Fixes #4666.
2017-05-11 19:10:21 -07:00
Tejas Kasetty 9b9c323314 emoji picker: Move cursor to end of filter string when focusing.
This is a much less annoying behavior than the Chrome browser default.

Explanatory comment added by tabbott, thanks to Steve Howell for the
research.

Fixes #4604.
2017-05-11 18:54:44 -07:00
Brock Whittaker f1a7db2503 Add placeholders to all empty lists.
This adds placeholders that state that the lists are empty.
2017-05-11 17:49:27 -07:00
Brock Whittaker e294035c93 Fix table display.
This fixes the way that tables display across the settings page,
so that the buttons shouldn't collapse to the second line anymore.
2017-05-11 17:49:26 -07:00
Brock Whittaker 8559acec1d Clean up settings overlay "Your Account" tab display.
This enforces a max-width of 1024px on the #settings overlay.

This commit also cleans up the "Your Account" tab to display
correctly without the avatar bleeding over to the next line.
2017-05-11 17:49:26 -07:00