zulip/static/js
Steve Howell 9dd78c803c Make auto-scrolling less aggressive.
We have code that can automatically scroll an element into "view"
in its container.  We use this for stream sidebar rows inside the
stream list.

Generally the stream sidebar rows are small enough to fit into
the container, and the prior algorithm worked correctly for that
scenario.

If you have lots of topics, however, and a short screen, the
algorithm was being too aggressive.  For example, if the top
wasn't showing, it would scroll the top into view, but at the
cost of scrolling the bottom out of view.

This fix makes the general scrolling algorithm more tame.

Part of the user-facing problem is that the element we pass
into the scrolling code for the stream sidebar rows is bigger
than the part of the row that actually should be shown on
screen.  Nevertheless, it makes sense here to make the general
algorithm more robust.
2017-08-11 13:01:39 -07:00
..
portico integration.js: Invoke adjust_font_sizing on all re-renders. 2017-08-10 10:21:53 -07:00
stats Change from deprecated $.parseJSON to JSON.parse. 2017-07-27 14:16:57 -07:00
.eslintrc.json Change name of eslintrc file to .eslintrc.json 2016-11-29 08:58:39 -08:00
activity.js jQuery: Remove broken use of "removeAttr". 2017-07-24 10:54:47 -07:00
admin_sections.js Split out Organization Permissions page. 2017-05-18 12:37:03 -07:00
admin.js settings: Remove intermediate hash change. 2017-08-01 15:38:17 -07:00
alert_words_ui.js alert_words: Fix the UI to not allow users to create duplicate alert words. 2017-06-13 16:37:49 -07:00
alert_words.js alert_words: Don't muck up rendered HTML content while munging. 2017-07-31 21:20:21 -07:00
attachments_ui.js attachment: Add file icon to the green box when file has no extension. 2017-03-09 00:56:37 -08:00
avatar.js Add size limit for uploading user avatars and realm icons. 2017-03-07 22:13:01 -08:00
blueslip.js Move preview_node() to blueslip.js. 2017-06-07 19:45:46 -05:00
bot_data.js bots: Add UI to view bot types of existing bots in "Your bots". 2017-06-15 10:08:31 -07:00
channel.js middleware: Use a proper error code on CSRF failure. 2017-07-25 14:02:12 -07:00
click_handlers.js settings: Wait for i18n setup before rendering settings nav. 2017-08-07 18:22:51 -07:00
colorspace.js Migrate JS modules to CommonJS style. 2016-12-07 16:11:52 -08:00
common.js Enable Hot Module Replacement in webpack. 2017-07-18 11:02:05 -07:00
components.js settings: Remove intermediate hash change. 2017-08-01 15:38:17 -07:00
compose_actions.js compose_actions.js: Allow compose to empty narrow. 2017-06-27 14:06:59 -04:00
compose_fade.js Introduce compose_fade.initialize(). 2017-05-24 17:41:40 -07:00
compose_state.js compose: Distinguish get_message_type() from composing(). 2017-04-24 12:42:06 -07:00
compose_ui.js Break compose.js and drafts.js dependency. 2017-05-08 14:43:49 -07:00
compose.js sending messages: Extract sent_messages.js. 2017-08-01 08:58:56 -07:00
composebox_typeahead.js recent_senders: Fix exception in certain typeahead flows. 2017-07-28 11:04:11 -07:00
condense.js hotkeys: Add collapse/show message hotkey. 2017-06-21 15:54:09 -04:00
copy_and_paste.js Remove instances of deprecated jQuery "bind". 2017-07-24 10:47:16 -07:00
custom_markdown.js Remove deprecated jQuery "delegate" function. 2017-07-24 10:47:16 -07:00
debug.js webpack: Move app_debug.js to webpack bundle. 2017-06-13 12:45:40 -07:00
dict.js Add Dict.is_empty(). 2017-04-21 21:59:22 -07:00
drafts.js drafts: Re-narrow on restoring draft. 2017-06-25 12:26:42 -04:00
dynamic_text.js js: Implement DynamicText class. 2017-05-11 17:23:53 -07:00
echo.js Just use message.unread when rendering. 2017-08-04 13:31:26 -07:00
emoji_picker.js popovers: Reimplement compute_placement. 2017-08-05 18:32:37 -07:00
emoji.js emoji: Rename emoji.realm_emojis to emoji.all_realm_emojis. 2017-07-05 13:02:41 -07:00
favicon.js Switch from deprecated $.browser to userAgent test. 2016-08-25 14:12:58 -07:00
feature_flags.js Add topic server history, but behind a feature flag. 2017-08-08 17:07:09 -04:00
fenced_code.js Support special characters for code block languages. 2017-06-19 06:53:25 -04:00
filter.js filter.js: Allow quotes to handle spaces in operand. 2017-07-14 17:33:09 -07:00
floating_recipient_bar.js Fix outerHeight to OR with 0 to not produce NaN. 2017-07-27 14:16:57 -07:00
gear_menu.js gear_menu: Fix traceback accessing i18n before it is initialized. 2017-06-02 14:03:56 -07:00
hash_util.js js dependencies: Split hash_util.js from hashchange.js. 2017-03-18 20:40:34 -07:00
hashchange.js narrow: Remove redundant from_reload option. 2017-06-15 12:16:27 -07:00
hotkey.js hotkey: Add support for hotspots on enter. 2017-08-05 18:32:37 -07:00
hotspots.js hotkey: Add support for hotspots on enter. 2017-08-05 18:32:37 -07:00
integration_bot_widget.js bots: Add a widget file to directly create bot from integration pages. 2017-06-22 11:07:30 -04:00
invite.js ui-refactor: Rename modals.js to overlays.js. 2017-05-29 11:24:46 -07:00
lightbox_canvas.js lightbox_canvas: Fix use of unsupported const. 2017-08-05 16:47:11 -07:00
lightbox.js lightbox: Fix incorrectly displayed avatar image. 2017-08-09 14:33:00 -07:00
list_rendering.js Move preview_node() to blueslip.js. 2017-06-07 19:45:46 -05:00
list_util.js Extract list_util.js for navigating lists. 2017-04-05 11:53:52 -07:00
loading.js loading-spinner: Fix improper display in upload avatar setting. 2017-04-06 09:06:14 +05:30
localstorage.js localstorage: Allow regex based delete. 2017-04-26 09:11:44 -07:00
markdown.js Replace String.prototype.startsWith with indexOf. 2017-08-08 12:06:32 -07:00
message_edit.js eslint: Remove no-new rule. 2017-07-27 11:31:33 -07:00
message_events.js Call message.set_message_booleans() in update_messages(). 2017-08-04 13:31:26 -07:00
message_fetch.js tutorial: Remove is_running and defer logic. 2017-08-01 22:38:22 -07:00
message_flags.js Remove dead code: messages.flags.send_force_collapse. 2017-08-04 13:31:26 -07:00
message_list_view.js Just use message.unread when rendering. 2017-08-04 13:31:26 -07:00
message_list.js Extract message_list.first_unread_message_id(). 2017-08-03 11:32:54 -07:00
message_live_update.js avatar live updates: Do full re-render. 2017-02-22 22:46:44 -08:00
message_store.js Set message.unread in set_message_booleans(). 2017-08-04 13:31:26 -07:00
message_util.js sending messages: Extract sent_messages.js. 2017-08-01 08:58:56 -07:00
message_viewport.js Fix outerHeight to OR with 0 to not produce NaN. 2017-07-27 14:16:57 -07:00
muting_ui.js muting_ui.js: Remove any popups when unmuting. 2017-03-25 12:49:14 -07:00
muting.js Revert "muting.js: Track muted streams using stream id." 2017-05-17 07:06:32 -07:00
narrow_state.js narrow.js: Create narrowed_by_stream_reply(). 2017-06-27 14:06:59 -04:00
narrow.js Extract message_list.first_unread_message_id(). 2017-08-03 11:32:54 -07:00
navigate.js Fix outerHeight to OR with 0 to not produce NaN. 2017-07-27 14:16:57 -07:00
notifications.js tutorial: Remove is_running and defer logic. 2017-08-01 22:38:22 -07:00
overlays.js frontend: Toggle aria-hidden for main app visibility. 2017-07-28 16:49:53 -07:00
people.js Add people.pm_lookup_key 2017-08-02 09:40:47 -07:00
pm_conversations.js typeahead: Add pm_conversations module. 2017-06-01 08:05:37 +00:00
pm_list.js pm list: Avoid unnecessary id -> email conversion. 2017-08-02 09:40:47 -07:00
pointer.js Add explicit message field for locally_echoed. 2017-07-21 11:38:25 -07:00
popovers.js popovers: Reimplement compute_placement. 2017-08-05 18:32:37 -07:00
presence.js user_popover: Handle the case when user presence is unknown. 2017-06-19 17:25:06 -04:00
reactions.js reactions: Simplify markup related to message ids. 2017-07-21 11:38:25 -07:00
realm_icon.js Add size limit for uploading user avatars and realm icons. 2017-03-07 22:13:01 -08:00
recent_senders.js recent_senders: Fix exception in certain typeahead flows. 2017-07-28 11:04:11 -07:00
reload.js alerts: Restyle alert banners. 2017-05-16 23:34:45 -07:00
resize.js Fix outerHeight to OR with 0 to not produce NaN. 2017-07-27 14:16:57 -07:00
rows.js rows.js: Add get_message_id() helper. 2017-07-21 11:38:25 -07:00
rtl.js Add rtl.js library for detecting direction of text. 2017-04-22 11:25:54 -07:00
scroll_bar.js Fix outerHeight to OR with 0 to not produce NaN. 2017-07-27 14:16:57 -07:00
search_suggestion.js Extract topic_data.js. 2017-07-27 14:26:22 -07:00
search.js jQuery: Remove broken use of "removeAttr". 2017-07-24 10:54:47 -07:00
sent_messages.js sending messages: Extract sent_messages.js. 2017-08-01 08:58:56 -07:00
server_events_dispatch.js Extract unread_ops.process_read_messages_event(). 2017-08-04 13:31:26 -07:00
server_events.js tutorial: Remove is_running and defer logic. 2017-08-01 22:38:22 -07:00
settings_account.js your-account: Change "no changes made" error to success. 2017-08-09 19:46:43 -07:00
settings_bots.js bots: Add UI to select Slack compatible interface for webhooks. 2017-07-28 16:22:55 -07:00
settings_display.js frontend: Fix default_language_modal aria-hidden assignment. 2017-08-05 18:11:27 -07:00
settings_emoji.js emoji: Merge the two semantically same tips on the Custom emoji page. 2017-07-21 13:29:27 -07:00
settings_filters.js Change from deprecated $.parseJSON to JSON.parse. 2017-07-27 14:16:57 -07:00
settings_lab.js Extract settings_lab.js. 2017-04-06 11:28:36 -07:00
settings_muting.js Extract settings_muting.js. 2017-04-06 11:28:36 -07:00
settings_notifications.js jQuery: Remove broken use of "removeAttr". 2017-07-24 10:54:47 -07:00
settings_org.js Move maybe_get_stream_name to stream_data.js. 2017-08-01 16:19:41 -07:00
settings_sections.js admin/settings: Lazy-load Organization sections. 2017-04-17 20:55:42 -07:00
settings_streams.js typeahead: Remove highlighting and add common template. 2017-06-13 16:16:17 -04:00
settings_users.js bots: Add 'Bot type' column to bots list in organization settings. 2017-06-20 23:04:46 -04:00
settings.js settings: Remove intermediate hash change. 2017-08-01 15:38:17 -07:00
setup.js Fix outerHeight to OR with 0 to not produce NaN. 2017-07-27 14:16:57 -07:00
socket.js local echo: Remove buggy restart-related code. 2017-07-18 12:03:16 -07:00
stream_color.js refactor: Remove stream_name param in update_stream_color(). 2017-03-05 15:44:43 -08:00
stream_create.js stream_create: Use stream_name as local variable for stream names. 2017-07-07 19:31:47 -07:00
stream_data.js Move maybe_get_stream_name to stream_data.js. 2017-08-01 16:19:41 -07:00
stream_edit.js jQuery: Remove broken use of "removeAttr". 2017-07-24 10:54:47 -07:00
stream_events.js Extract narrow_state.js. 2017-04-25 09:57:32 -07:00
stream_list.js Make auto-scrolling less aggressive. 2017-08-11 13:01:39 -07:00
stream_muting.js ui-refactor: Rename modals.js to overlays.js. 2017-05-29 11:24:46 -07:00
stream_popover.js Extract stream_popover.topic_ops to muting_ui.js. 2017-03-25 09:42:49 -07:00
stream_sort.js Change argument type for stream_data.is_active(). 2017-04-28 07:39:52 -07:00
subs.js subs: Make "All streams" link to appropriate hash. 2017-08-03 10:59:13 -07:00
tab_bar.js Fix how we find if streams are muted. 2017-05-15 14:47:41 -07:00
templates.js templates: Fix typo in error message. 2017-06-26 19:33:25 -04:00
timerender.js uploads: Only display year uploaded if previous year. 2017-07-25 23:06:58 -07:00
topic_data.js Add topic_data.get_server_history(). 2017-08-08 17:07:09 -04:00
topic_generator.js Extract topic_data.js. 2017-07-27 14:26:22 -07:00
topic_list.js Add topic server history, but behind a feature flag. 2017-08-08 17:07:09 -04:00
translations.js i18n: Import localstorage module into translations. 2017-08-10 10:21:53 -07:00
tutorial.js tutorial: Remove exports.start. 2017-08-01 22:38:22 -07:00
typeahead_helper.js typeahead: Use recent_senders/pm_conversations to sort suggestions. 2017-07-09 10:51:19 -04:00
typing_data.js Extract typing indicator inbound timing logic. 2017-03-22 08:20:21 -07:00
typing_events.js Add error checking to get_users_typing_for_narrow(). 2017-06-15 11:32:13 -04:00
typing_status.js Extract typing_events.js. 2017-03-22 07:29:42 -07:00
typing.js compose: Distinguish get_message_type() from composing(). 2017-04-24 12:42:06 -07:00
ui_init.js ui: Wait for i18n setup before rendering hotkeys help. 2017-08-07 18:22:51 -07:00
ui_report.js common.js: Migrate common.js module to use IIFE module style. 2017-06-22 19:06:32 -04:00
ui_util.js Extract js/ui_util.js. 2017-03-19 11:05:45 -07:00
ui.js ui: Wait for i18n setup before rendering hotkeys help. 2017-08-07 18:22:51 -07:00
unread_ops.js Add /mark_all_as_read endpoint. 2017-08-04 14:10:46 -07:00
unread_ui.js unread_ui: Wait for i18n setup before rendering. 2017-07-07 16:59:23 -07:00
unread.js Fix bug with topic edits on read messages. 2017-08-10 14:36:18 -04:00
upload_widget.js upload-widget: Correct file input clearing. 2017-03-21 00:59:17 -07:00
user_events.js account-settings: Always display the medium-size avatar. 2017-04-28 23:09:32 -07:00
util.js util: Remove execute_early. 2017-07-04 13:54:33 -07:00
zulip.js Migrate JS modules to CommonJS style. 2016-12-07 16:11:52 -08:00