zulip/static/templates
Steve Howell d52552dcc3 Simplify/unify starring messages from the frontend.
We now do all of the main logic for starring/unstarring
a message in `message_flags.toggle_starred`:

    * mark the message as read (just in case)
    * update the UI (i.e. the green star in the message)
    * update the server

The calling code in both the click handler and the hotkey
handler remains simple--they just handle minor details like
finding the message and clearing popovers.

For updating the server, we now call the new
`send_flag_update` helper.

And we continue to delegate some of the logic to
`ui.update_starred`, but we remove some code there that's
now pushed up to `message_flags.toggle_starred`.

This change should be mostly transparent to users, but it
does remove some inconsistent behaviors between the click
handler and the hotkey handler.  Before this change, the
click handler was more aggressive about updating the UI
and marking the message as read.  For people using the "*"
key to star/unstar, they probably would only have noticed
different behavior on a slow connection or in an edge
case scenario where only half of the message was onscreen.

More importantly, by simplifying how we talk to the server,
this eliminated up to a one-second lag due to the debounce
logic in the batch_updater code.  The complicated debounce
logic is only really needed for batch-updating "read"
messages, and it was overkill and sluggish for starring
messages.

Last but not least, we add defensive code for the local
echo case.  (Users have to wait till the message gets acked
to star it.)
2017-12-26 09:01:21 -05:00
..
settings bot settings: Fetch embedded bots list from page_params. 2017-12-26 08:50:00 -05:00
.gitignore Move zephyr/static to just static. 2013-07-29 12:11:26 -04:00
actions_popover_content.handlebars local echo: Don't show collapse/uncollapse items. 2017-12-26 09:01:21 -05:00
admin_default_streams_list.handlebars components: Make button component styles sensible. 2017-06-08 17:09:31 -07:00
admin_emoji_list.handlebars settings: Fix missing target=_blank on realm emoji images. 2017-11-25 09:43:01 -08:00
admin_filter_list.handlebars components: Make button component styles sensible. 2017-06-08 17:09:31 -07:00
admin_invites_list.handlebars invites: Differentiate users invited as admin by showing bolt icon. 2017-12-13 15:12:21 -06:00
admin_streams_list.handlebars frontend: Add aria-label attributes to textareas/input fields. 2017-07-14 14:45:10 -07:00
admin_tab.handlebars Add UI for viewing and cancelling open Zulip invitations. 2017-10-27 13:07:43 -07:00
admin_user_list.handlebars bots: Add 'Bot type' column to bots list in organization settings. 2017-06-20 23:04:46 -04:00
alert_word_settings_item.handlebars alert_words_ui.js: Move the error message to the top. 2017-06-09 15:23:53 -07:00
announce_stream_docs.handlebars Clean announce_streams_docs handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
bankruptcy_modal.handlebars Clean bankruptcy_modal handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
bookend.handlebars message view: Decode HTML in Stream subscription messages. 2017-10-11 09:59:48 -07:00
bot_avatar_row.handlebars Use realistic filepaths in zuliprc docs and hints. 2017-11-21 07:32:24 -08:00
bot_owner_select.handlebars Clean bot_owner_select.handlebars to use 4 space indents. 2017-03-09 01:17:23 -08:00
compose_all_everyone.handlebars Improve @all warnings user interface significantly. 2016-12-21 11:40:47 -08:00
compose_announce.handlebars compose: Warn users when posting to the #announce stream. 2017-12-20 07:36:50 -05:00
compose_notification.handlebars unicode: Replace "×" with HTML and HEX entities. 2017-08-22 16:31:53 -07:00
compose_private_stream_alert.handlebars composebox: Warn when linked to private streams. 2017-11-27 07:41:59 -08:00
compose-invite-users.handlebars unicode: Replace "×" with HTML and HEX entities. 2017-08-22 16:31:53 -07:00
default_language_modal.handlebars unicode: Replace "×" with HTML and HEX entities. 2017-08-22 16:31:53 -07:00
draft_table_body.handlebars dark-mode: Change drafts container to be dark. 2017-11-29 16:44:43 -08:00
draft.handlebars frontend: Add hotkey information to title/inline text. 2017-08-23 17:12:09 -07:00
email_address_hint.handlebars Clean email_address_hint.handlebars to use 4 space indents. 2017-03-10 11:07:49 -08:00
emoji_popover_content.handlebars emoji_picker: Move the category tabs to just below the emoji filter. 2017-09-29 20:22:09 +00:00
emoji_popover_emoji.handlebars emoji_picker: Don't display title text for emojis in emoji picker. 2017-09-29 21:10:07 +00:00
emoji_popover_search_results.handlebars emoji_picker: Change emoji picker to be category based. 2017-08-14 12:52:35 -07:00
emoji_popover.handlebars emoji_picker: Add emoji showcase. 2017-09-29 21:09:00 +00:00
emoji_showcase.handlebars emoji_picker: Add emoji showcase. 2017-09-29 21:09:00 +00:00
group_pms.handlebars Clean group_pms handlebar to use 4 space indents. 2017-02-17 03:16:46 +05:30
hotspot_overlay.handlebars hotspots: Add friendly whale illustration to popover. 2017-08-05 18:32:37 -07:00
invite_subscription.handlebars invitations: Make stream labels click targets. 2017-12-07 14:37:23 -08:00
loader.handlebars Remove the old spinner, replace with new one. 2017-01-06 10:37:54 -08:00
message_edit_form.handlebars message_edit_form.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:27 -07:00
message_edit_history.handlebars message-editing: Show date lines between edits from different days. 2017-06-06 11:04:30 -07:00
message_group.handlebars date-separator: Make date rows unselectable. 2017-10-19 17:49:57 -07:00
message_reaction.handlebars reactions.js: Migrate webapp to use the new reactions API. 2017-11-20 15:27:20 -08:00
message_reactions.handlebars emoji_picker: Correctly restore the title attribute of base element. 2017-09-16 08:17:41 -07:00
more_topics.handlebars left-sidebar: Remove topics help code. 2017-11-15 11:01:33 -08:00
muted_topic_ui_row.handlebars Clean muted_topic_ui_row.handlebars to use 4 space indents. 2017-03-09 01:17:25 -08:00
new_stream_users.handlebars create stream: Show current user on top of "People to add" list 2017-12-13 14:16:07 -06:00
notification.handlebars notifications: Improve HTML/CSS for desktop notifications. 2017-01-02 16:42:04 -08:00
propagate_notification_change.handlebars settings: Reword notifications settings strings. 2017-12-11 09:17:31 -08:00
recipient_row.handlebars Make recipient bar styling more compact and clean. 2017-09-06 18:49:54 -07:00
settings_tab.handlebars account-settings: Removed 'Updated settings' message from admin. 2017-03-10 10:53:06 -08:00
sidebar_private_message_list.handlebars Clean sidebar_private_message_list handlebar to use 4 space indents. 2017-02-16 14:45:08 -08:00
single_message.handlebars Simplify/unify starring messages from the frontend. 2017-12-26 09:01:21 -05:00
stream_member_list_entry.handlebars streams: Update button styles to new styles. 2017-08-23 12:29:32 -07:00
stream_privacy.handlebars left-sidebar: Restyle to have new look. 2017-04-25 17:47:36 -07:00
stream_sidebar_actions.handlebars stream_sidebar: Clean up use of ambiguously named data-id. 2017-08-16 18:02:29 -07:00
stream_sidebar_row.handlebars stream_sidebar_row: Rename data-name to data-stream-name. 2017-08-16 18:03:44 -07:00
subscription_creation_form.handlebars docs: Update links to ReadTheDocs to always use https. 2017-11-16 10:59:24 -08:00
subscription_invites_warning_modal.handlebars unicode: Replace "×" with HTML and HEX entities. 2017-08-22 16:31:53 -07:00
subscription_setting_icon.handlebars subs: Redesign the rows of the #subscriptions table. 2016-11-03 17:33:33 -07:00
subscription_settings.handlebars streams: Make stream settings inputs responsive to narrow screens. 2017-12-14 17:47:54 -05:00
subscription_stream_privacy_modal.handlebars unicode: Replace "×" with HTML and HEX entities. 2017-08-22 16:31:53 -07:00
subscription_table_body.handlebars settings: Use .modal-bg class to control background color. 2017-11-17 08:44:04 -08:00
subscription_type.handlebars Add translation tags to the templates. 2016-05-19 22:58:26 -07:00
subscription.handlebars stream_data: Linkify URL in stream description. 2017-03-20 22:25:03 -07:00
tab_bar.handlebars left sidebar: Change Home to All messages. 2017-11-28 15:42:58 -08:00
topic_edit_form.handlebars Clean topic_edit_form handlebar to use 4 space indents. 2017-03-09 01:17:23 -08:00
topic_list_item.handlebars stream_list: Use data-topic-name for topic names. 2017-08-16 18:03:44 -07:00
topic_sidebar_actions.handlebars topic_sidebar_actions.handlebars: Upgrade font-awesome icon style. 2017-06-08 14:07:28 -07:00
typeahead_list_item.handlebars emoji: Migrate bugdown emoji to use sprite sheets. 2017-09-29 11:14:34 -07:00
typing_notification.handlebars Add typing notifications front end. 2017-03-17 20:45:07 -07:00
typing_notifications.handlebars Add typing notifications front end. 2017-03-17 20:45:07 -07:00
uploaded_files_list.handlebars user settings: fix uploaded files UI 2017-12-18 10:12:33 -05:00
user_info_popover_content.handlebars user profiles: add tooltip for too long email. 2017-12-13 14:20:18 -06:00
user_info_popover_title.handlebars Make user_popover use user_info_popover template. 2017-03-22 16:04:38 -07:00
user_info_popover.handlebars Remove arrow from message info popover by providing template. 2017-03-22 16:04:38 -07:00
user_presence_row.handlebars Clean user_presence_row.handlebars to use 4 space indents. 2017-03-10 11:07:49 -08:00
user_presence_rows.handlebars Fix performance issues with user presence list in large realms. 2016-02-12 20:04:43 -08:00