Completely replace perfect-scrollbar with SimpleBar.

perfect-scrollbar replaces both the appearance and the behavior of the
scrollbar, and its emulated behavior will never feel native on most
platforms.  SimpleBar customizes the appearance while preserving the
native behavior.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
Anders Kaseorg
2019-02-28 16:40:05 -08:00
committed by Tim Abbott
parent 491589579a
commit 141088586b
35 changed files with 111 additions and 134 deletions

View File

@@ -17,6 +17,7 @@ zrequire('scroll_util');
zrequire('list_cursor');
zrequire('stream_list');
zrequire('topic_zoom');
zrequire('ui');
stream_color.initialize();
@@ -326,14 +327,9 @@ run_test('narrowing', () => {
stream_list.zoom_out_topics = noop;
scroll_util.scroll_element_into_container = noop;
var scrollbar_updated = false;
set_global('ui', {
update_scrollbar: function () {scrollbar_updated = true;},
get_scroll_element: element => element,
});
ui.update_scrollbar(
$.stub_selector("#stream-filters-container")
);
assert(!$('<devel sidebar row html>').hasClass('active-filter'));
@@ -346,9 +342,7 @@ run_test('narrowing', () => {
]);
stream_list.handle_narrow_activated(filter);
assert($('<devel sidebar row html>').hasClass('active-filter'));
assert(scrollbar_updated); // Make sure we are updating perfectScrollbar.
scrollbar_updated = false;
filter = new Filter([
{operator: 'stream', operand: 'cars'},
{operator: 'topic', operand: 'sedans'},
@@ -356,7 +350,6 @@ run_test('narrowing', () => {
stream_list.handle_narrow_activated(filter);
assert(!$("ul.filters li").hasClass('active-filter'));
assert(!$('<cars sidebar row html>').hasClass('active-filter')); // false because of topic
assert(scrollbar_updated); // Make sure we are updating perfectScrollbar.
filter = new Filter([
{operator: 'stream', operand: 'cars'},