zulip/static/js
Steve Howell 264dcb6f40 refactor: Extract MessageListData class.
Most of this was straightforward.

Most functions that were grabbed verbatim and whole from
the original class still have one-line wrappers.

Many functions are just-the-data versions of functions that
remain in MessageList:  see add, append, prepend, remove as
examples.  In a typical pattern the MessageList code becomes
super simple:

    prepend: function MessageList_prepend(messages) {
        var viewable_messages = this.data.prepend(messages);
        this.view.prepend(viewable_messages);
    },

Two large functions had some minor surgery:

    triage_messages =
            top half of add_messages +
            API to pass three lists back

    change_message_id =
            original version +
            two simple callbacks to list

For the function update_muting_and_rerender(), we continue
to early-exit if this.muting_enabled is false, and we copied
that same defensive check to the new function
named update_items_for_muting(), even though it's technically
hidden from that codepath by the caller.
2018-05-05 06:31:51 -07:00
..
portico hello.html: Add testimonial carousel. 2018-05-01 16:45:52 -07:00
stats analytics: Make stats of all realms accessible to server admins. 2018-04-18 11:06:50 -07:00
.eslintrc.json
activity.js right-sidebar: Fix group PMs online indicator. 2018-05-02 12:41:01 -07:00
admin.js org settings: Clean up the context for admin pages. 2018-05-02 11:42:28 -07:00
admin_sections.js org settings: Remove "Delete streams" administrative tab from settings. 2018-04-30 17:47:34 +05:30
alert_words.js Highlight alert words in mentions you send to yourself. 2017-10-12 14:03:36 -07:00
alert_words_ui.js urls: Change the method for adding alert words from PUT to POST. 2017-09-26 14:00:51 -07:00
archive.js public_archives: Add floating recipient bar. 2018-05-02 15:23:33 -07:00
attachments_ui.js attachments: Implement frontend for real-time sync. 2018-05-04 16:22:27 -07:00
avatar.js user settings: Display avatar source. 2018-03-05 09:12:59 -08:00
blueslip.js lint: Replace 'return undefined;' with 'return;'. 2018-03-13 08:22:42 -04:00
bot_data.js bots: Delete bot from bot_data set on realm_bot delete event. 2018-03-08 07:54:19 -08:00
buddy_data.js buddy list: Populate user-fade via templates. 2018-04-28 11:15:14 -07:00
buddy_list.js compose_fade: Extract user_fade_config. 2018-04-28 11:15:14 -07:00
channel.js
click_handlers.js narrow: Remove unnecessary select_first_unread option. 2018-04-22 21:33:33 -07:00
colorspace.js
common.js lint: Replace 'return undefined;' with 'return;'. 2018-03-13 08:22:42 -04:00
components.js refactor: Remove factory code for toggle component. 2018-04-20 13:45:58 -07:00
compose.js refactor: Rename method to compose_fade.update_all(). 2018-04-28 11:15:14 -07:00
compose_actions.js compose: Don't auto-scroll very tall messages on click. 2018-04-27 14:19:58 -07:00
compose_fade.js refactor: Simplify return values for would_receive_message(). 2018-04-28 11:15:14 -07:00
compose_pm_pill.js compose: Add pills for typing in PM recipients. 2018-03-07 15:53:11 -08:00
compose_state.js compose: Add pills for typing in PM recipients. 2018-03-07 15:53:11 -08:00
compose_ui.js message edit: Allow uploading files. 2018-03-05 10:42:38 -08:00
composebox_typeahead.js markdown: Add @stream as an alias for @all. 2018-04-09 16:35:14 -07:00
condense.js frontend: Simplify saving collapsed/uncollapsed flags. 2017-12-26 09:01:21 -05:00
copy_and_paste.js copy_and_paste.js: Remove excess newlines while pasting markdown html. 2018-04-24 08:27:43 -07:00
debug.js
dict.js lint: Replace 'return undefined;' with 'return;'. 2018-03-13 08:22:42 -04:00
drafts.js narrow: Remove unnecessary select_first_unread option. 2018-04-22 21:33:33 -07:00
dynamic_text.js
echo.js echo: Fix exception when topic-editing locally echoed messages. 2018-05-03 12:14:43 -07:00
emoji.js emoji: Do selective local echo of emoticon conversions. 2018-03-27 17:16:55 -07:00
emoji_picker.js emoji: Export popular emojis list. 2018-04-21 22:24:07 -07:00
favicon.js lint: Ban two spaces after comma in JS code. 2017-10-18 10:22:18 -07:00
feature_flags.js cleanup: Remove the legacy Dropbox file upload integration. 2018-04-11 11:39:48 -07:00
fenced_code.js bugdown: Fix handling of nested fenced math blocks. 2017-11-22 12:19:43 -08:00
fetch_status.js Add fetch_status.has_found_newest(). 2018-05-03 12:44:30 -07:00
filter.js Add filter.is_for_only(operand). 2018-05-02 11:23:58 -07:00
floating_recipient_bar.js
gear_menu.js
hash_util.js Add stream ids to urls for stream-related narrows. 2018-02-19 09:03:11 -08:00
hashchange.js narrow: Remove now-unnecessary use_initial_narrow_pointer option. 2018-04-22 21:33:34 -07:00
hotkey.js hotkeys: Remove call to activity.blur_search(). 2018-04-28 11:15:14 -07:00
hotspots.js hotspots: Fix real-time sync for dismissing hotspots. 2018-03-18 10:22:09 -07:00
info_overlay.js refactor: Remove factory code for toggle component. 2018-04-20 13:45:58 -07:00
input_pill.js pills: Add exportable function for creating non-editable pills. 2018-04-05 17:40:12 -07:00
integration_bot_widget.js template context: Give better names to the URLs for the API. 2017-10-30 18:29:29 -07:00
invite.js invite: Clarify variable names for rendered_email_msg. 2018-04-12 09:48:02 -07:00
keydown_util.js buddy list: Fix and simplify up/down navigation. 2018-04-28 11:15:14 -07:00
lightbox.js lightbox: Add debugging code for unknown message IDs. 2018-03-23 15:17:21 -07:00
lightbox_canvas.js hotkeys: Add shortcuts for pan and zoom in lightbox view 2018-04-03 09:20:55 -07:00
list_cursor.js refactor: Extract scroll_util.js. 2018-04-28 11:15:14 -07:00
list_render.js list_render: Add sorting reversal. 2017-11-01 13:26:40 -07:00
list_util.js
loading.js display_settings: Change success/failure feedback interface. 2018-03-04 17:47:05 -08:00
localstorage.js lint: Replace 'return undefined;' with 'return;'. 2018-03-13 08:22:42 -04:00
markdown.js lint: Prevent accidental use of const. 2018-04-22 20:11:38 -07:00
message_edit.js message: Extract function for editability of topic. 2018-04-28 13:00:29 -07:00
message_events.js search: Remove buggy double-call of set_message_booleans. 2018-04-28 14:39:24 -07:00
message_fetch.js unread: Fix messages that cannot be marked as read in narrows. 2018-04-23 11:46:46 -07:00
message_flags.js refactor: Rename mark_message(s)_as_read to notify_server_message(s)_read. 2018-04-05 09:54:48 -07:00
message_list.js refactor: Extract MessageListData class. 2018-05-05 06:31:51 -07:00
message_list_data.js refactor: Extract MessageListData class. 2018-05-05 06:31:51 -07:00
message_list_view.js Add MessageList.is_search(). 2018-05-04 10:59:56 -07:00
message_live_update.js message_live_update: Fix double re-rendering of home_msg_list. 2018-04-02 18:58:51 -07:00
message_scroll.js Fetch new messages when you scroll forward in narrows. 2018-03-28 09:12:59 -07:00
message_store.js refactor: Extract pm_conversations.recent. 2018-02-12 09:34:59 -08:00
message_util.js
message_viewport.js viewport: Hide right-sidebar buddy list below 1024px. 2018-04-26 14:33:28 -07:00
muting.js
muting_ui.js message_list: Clean up API for rerender_after_muting_changes. 2018-04-27 08:52:24 -07:00
narrow.js Fix corner case with recent narrowing optimization. 2018-05-04 17:34:34 -07:00
narrow_state.js Add starred messages to our new API for unread ids. 2018-05-03 14:36:34 -07:00
navigate.js Have home key go to actual first message in the list. 2017-10-03 11:28:28 -07:00
night_mode.js styles: Rename dark-mode to night-mode. 2018-03-28 10:41:26 -07:00
notifications.js narrow: Remove unnecessary select_first_unread option. 2018-04-22 21:33:33 -07:00
overlays.js settings: When overlay modal opens, remove previous alert messages. 2018-01-23 14:38:59 -05:00
panels.js notifications: Check if localstorage is enabled. 2018-03-18 12:54:11 -07:00
people.js popover: Add an option to show user profile. 2018-04-23 16:56:24 -07:00
pm_conversations.js Add pm_conversations.recent.get_strings(). 2018-02-12 09:34:59 -08:00
pm_list.js refactor: Extract pm_conversations.recent. 2018-02-12 09:34:59 -08:00
pointer.js refactor: Rename mark_message(s)_as_read to notify_server_message(s)_read. 2018-04-05 09:54:48 -07:00
popovers.js org setting: Add time limits for message deleting. 2018-04-27 19:22:28 -07:00
presence.js right-sidebar: Fix group PMs online indicator. 2018-05-02 12:41:01 -07:00
reactions.js linter: Add checks for sloppy use of .html(). 2018-04-12 09:50:14 -07:00
realm_icon.js
recent_senders.js recent senders: Use message ids instead of timestamps for sorting. 2018-02-08 18:39:10 -08:00
reload.js reload: Handle errors with compose_actions.start(). 2018-03-07 15:53:11 -08:00
resize.js condense: Re-condense all messages on window resize. 2018-03-27 09:53:45 -07:00
rows.js
rtl.js eslint: Add and enforce space-in-parens lint rule. 2017-10-06 12:36:59 -07:00
scroll_bar.js viewport: Hide right-sidebar buddy list below 1024px. 2018-04-26 14:33:28 -07:00
scroll_util.js refactor: Extract scroll_util.js. 2018-04-28 11:15:14 -07:00
search.js narrow: Remove unnecessary select_first_unread option. 2018-04-22 21:33:33 -07:00
search_suggestion.js search_suggestion: Add escaping for email addresses. 2018-04-12 09:47:01 -07:00
sent_messages.js urls: Move the report endpoints to be API-style routes. 2017-10-17 22:05:56 -07:00
server_events.js local echo: Bypass message.flags array. 2017-12-26 09:01:21 -05:00
server_events_dispatch.js attachments: Implement frontend for real-time sync. 2018-05-04 16:22:27 -07:00
settings.js org settings: Remove "Delete streams" administrative tab from settings. 2018-04-30 17:47:34 +05:30
settings_account.js custom fields: Add support for custom URL field type. 2018-04-30 10:53:23 -07:00
settings_bots.js bot settings: Fix spelling of data-user-id. 2018-04-28 10:23:46 -07:00
settings_display.js settings: Change save and discard button look and feel. 2018-04-05 21:49:12 -07:00
settings_emoji.js emoji: Clean up variable names for rendered template content. 2018-04-12 09:48:02 -07:00
settings_filters.js settings: Clean up repeating code in error callbacks. 2018-03-25 10:40:40 -07:00
settings_invites.js invites ui: fixed rerendering of invites list 2018-04-13 12:07:42 -07:00
settings_muting.js
settings_notifications.js settings: Refactor to use pluck to extract `setting` attribute. 2018-03-27 18:01:03 -07:00
settings_org.js org settings: Make save-discard widget look better. 2018-05-03 10:32:34 -07:00
settings_profile_fields.js custom_profile_fields: Support changing the sort order of the fields. 2018-04-30 18:17:41 -07:00
settings_sections.js settings: Remove obsolete default_desktop_notifications setting. 2018-04-28 13:46:07 -07:00
settings_streams.js static/js/settings_streams.js: Move delete_stream func to `stream_edit.js`. 2018-04-30 17:48:16 +05:30
settings_toggle.js refactor: Remove factory code for toggle component. 2018-04-20 13:45:58 -07:00
settings_ui.js org setting: Add time limits for message deleting. 2018-04-27 19:22:28 -07:00
settings_user_groups.js settings: Avoid duplicate form handlers. 2018-03-25 08:28:04 -07:00
settings_users.js settings_users: Fix sending queries to /json/bots endpoint. 2018-04-02 18:48:55 -07:00
setup.js
socket.js
stream_color.js Revert "Make recipient bar styling more compact and clean." 2018-02-16 11:55:00 -08:00
stream_create.js stream_create: Finish handler cleanup. 2018-03-26 06:44:19 -04:00
stream_data.js stream_data: Fix exception when notifications_stream is private. 2018-05-03 08:33:07 -07:00
stream_edit.js stream-edit: Fix typo in comment. 2018-05-05 06:25:06 -07:00
stream_events.js stream-settings: Remove redundant actually_filter_streams function call. 2018-04-30 11:38:47 -07:00
stream_list.js Remove hack for stream cog. 2018-04-28 11:15:14 -07:00
stream_muting.js message_list: Move set_message_offset into message_list_view. 2018-04-13 16:31:18 -07:00
stream_popover.js narrow: Remove unnecessary select_first_unread option. 2018-04-22 21:33:33 -07:00
stream_sort.js stream list: Use newer code for the list cursor. 2018-04-28 11:15:14 -07:00
subs.js create stream: Fix preview btn not showing on private stream creation. 2018-04-30 11:15:07 -07:00
tab_bar.js left sidebar: Change Home to All messages. 2017-11-28 15:42:58 -08:00
templates.js
timerender.js drafts: Add timestamps showing when last modified. 2018-02-19 09:55:50 -08:00
top_left_corner.js
topic_data.js
topic_generator.js Add topic_generator.get_next_unread_pm_string(). 2018-02-12 09:34:59 -08:00
topic_list.js narrow: Remove unnecessary select_first_unread option. 2018-04-22 21:33:33 -07:00
translations.js i18n: Flag emojiset type name string for translation. 2018-02-22 05:36:03 -08:00
transmit.js websockets: Fix race condition in CSRF token initialization. 2018-03-31 09:29:56 -07:00
tutorial.js narrow: Remove unnecessary select_first_unread option. 2018-04-22 21:33:33 -07:00
typeahead_helper.js emoji: Prefix sort for emojis. 2018-04-21 22:28:45 -07:00
typing.js Add typing.initialize() to prevent tracebacks. 2018-03-16 09:23:23 -07:00
typing_data.js refactor: Add util.sorted_ids(). 2018-05-02 09:16:24 -07:00
typing_events.js docs: Reorganize developer docs to improve navigation. 2017-11-16 09:45:08 -08:00
typing_status.js docs: Reorganize developer docs to improve navigation. 2017-11-16 09:45:08 -08:00
ui.js ui.js: Add minimum scrollbar length. 2018-04-02 10:48:28 -07:00
ui_init.js message_edit: Don't offer UI to edit topics after time limit. 2018-04-28 13:14:27 -07:00
ui_report.js ui: Add ability to hide ui feedback messages. 2018-04-05 17:17:08 -07:00
ui_util.js ui_util: Move `place_caret_at_end` to ui_util module. 2018-01-23 15:00:11 -08:00
unread.js Add starred messages to our new API for unread ids. 2018-05-03 14:36:34 -07:00
unread_ops.js refactor: Rename mark_message(s)_as_read to notify_server_message(s)_read. 2018-04-05 09:54:48 -07:00
unread_ui.js unread: Clean up variable names around bankruptcy modal. 2018-04-12 09:48:02 -07:00
upload.js upload: Improve logic for hiding progress bar for fast upload. 2018-05-02 12:32:13 -07:00
upload_widget.js settings ui: Restrict file type for image file pickers. 2017-10-27 10:21:36 -07:00
user_events.js custom profile data: Send event to active user on update. 2018-03-21 16:08:12 -07:00
user_groups.js user-groups: Update user_group_name_dict, when name/description is edited. 2018-03-15 10:09:28 -07:00
user_pill.js pills: Add exportable function for creating non-editable pills. 2018-04-05 17:40:12 -07:00
user_search.js buddy list: Fix and simplify up/down navigation. 2018-04-28 11:15:14 -07:00
util.js refactor: Add util.sorted_ids(). 2018-05-02 09:16:24 -07:00
zulip.js night-mode: Add custom CSS through JS. 2017-11-29 23:06:11 -08:00