Anders Kaseorg
f0021df3d4
people: Use blueimp-md5 as a module.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-28 10:54:35 -07:00
Vinit Singh
1f54918c8a
message_controls: Use a template instead of passing html as a string.
...
This commit adds a handlebar template for the View source/Edit message
button in message controls in the message view.
This change also fixes the broken html titles that were added in
commit fdbab54614
, and adds proper
internationalization for the title text.
2020-07-27 11:05:44 -07:00
Ryan Rehman
15c5dadb73
message view: Move live update logic of stream name to `message_store`.
2020-07-27 11:00:31 -07:00
Ryan Rehman
131a1dd54f
message view: Move live update logic of avatar url to `message_store`.
2020-07-27 11:00:31 -07:00
Ryan Rehman
06d0dc1ffa
message view: Move live update logic of full name to `message_store`.
...
This is done to decouple our message view related update events
from MessageListData as there are plans to create multiple
MessageListData objects. Instead we update the `stored_messages`
which tracks the complete data for all messages.
2020-07-27 11:00:31 -07:00
Ryan Rehman
e85bc853d6
message list: Refactor and update API to include `rerender_view`.
...
This is a necessary prep commit as our message live update
functions will call this function, outside the MessageList class.
2020-07-27 11:00:31 -07:00
Anders Kaseorg
0b4483c8d2
settings_panel_menu: Convert make_menu to an ES6 class SettingsPanelMenu.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Anders Kaseorg
025f49dbc4
poll_widget: Convert poll_data_holder to an ES6 class PollData.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Anders Kaseorg
2e94914be4
list_cursor: Convert list_cursor to an ES6 class ListCursor.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Anders Kaseorg
9d90ae0e69
fetch_status: Convert FetchStatus to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Anders Kaseorg
a1796325de
buddy_list: Convert buddy_list_create to an ES6 class BuddyList.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Anders Kaseorg
a1295936a4
message_list_view: Convert MessageListView to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Anders Kaseorg
8e5574fbe6
message_list_data: Convert MessageListData to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Anders Kaseorg
7249103ab4
message_list: Convert MessageList to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 17:00:05 -07:00
Steve Howell
49db62c240
refactor: Have markdown depend directly on emoji.
...
Now that emoji is in our shared library, we can
require it directly from markdown without
re-introducing any `window` dependencies.
2020-07-26 16:50:14 -07:00
Anders Kaseorg
d2520cd7e0
js: Replace underscore with lodash and remove it from globals.
...
Tweaked by tabbott to bump PROVISION_VERSION.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 16:12:06 -07:00
Anders Kaseorg
9c7a3cc0f4
compose: Replace accidental usage of underscore for “translation”.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-26 16:08:52 -07:00
Steve Howell
0eb206f97e
mobile sharing: Make emoji.js a shared ES6 module.
...
This is a pretty straightforward conversion.
The bulk of the diff is just changing emoji.js
to ES6 syntax.
There is one little todo that can be deferred
to the next commit--we are now set up to have
markdown.js require emoji.js directly, since
it is no longer on `window`.
2020-07-26 16:07:17 -07:00
Steve Howell
a028aa5f8a
emoji refactor: Avoid util dep with minor hack.
...
We copy in a one-line function from util that
will soon be replaced with lodash.
2020-07-26 16:07:17 -07:00
Steve Howell
92ed76e3c1
emoji refactor: Pass in emoji_codes from ui_init.
...
We don't want emoji.js to depend on a JSON file
(and specifically the location of said JSON file)
when we start sharing our code with mobile.
2020-07-26 16:07:17 -07:00
Steve Howell
3e30a7f66e
emoji refactor: Move function higher in file.
...
This preps for ES6 linting rules. (And it's
nicer for now, too.)
2020-07-26 16:07:17 -07:00
Steve Howell
979c126b07
emoji refactor: Avoid unnecessary exports.
...
`default_emoji_aliases` was around for a while, and
the `server_realm_emoji_data` was added really
recently by me (oops).
2020-07-26 16:07:17 -07:00
Steve Howell
aedf1660f8
dispatch tests: Make realm_emoji test more robust.
...
The main thing here is that we check that the
actual data got put into our data structures.
(In general we want to move away from stubbing
data modules; any place where we stub data modules
is a relic of earlier days, where we were just
trying to set the bar for 100% line coverage,
even though some of the original coverage was
quite shallow.)
I also use real stubs instead of noops for
the calls out to UI-oriented modules.
In passing I tweak some comments in the actual
dispatch code.
2020-07-26 16:07:17 -07:00
Steve Howell
69c082e2f6
refactor: Have emoji_picker pull from emoji.
...
This makes it so that the authoritative holder
of all emoji data is emoji.js, and all our
UI components that need emoji data consistently
pull data from emoji.js as needed.
Or to put it another way, we no longer need the
dispatch module to know that emoji_picker is
coupled to emoji precisely by the active_realm_emojis
data; it can now make fewer assumptions.
2020-07-26 16:07:17 -07:00
Steve Howell
6e9d9b42ca
refactor: Rename func to emoji_picker.rebuild_catalog.
2020-07-26 16:07:17 -07:00
Steve Howell
ef40767edf
emoji: Promote blueslip.error to caller.
...
The only function that called blueslip had only
one caller, and we are trying to get emoji.js
ready for ES6.
2020-07-26 16:07:17 -07:00
Anders Kaseorg
b900e38dc6
topic_list: Convert widget to an ES6 class TopicListWidget.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:58:22 -07:00
Anders Kaseorg
4517c48de2
todo_widget: Convert task_data_holder to an ES6 class TaskData.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:58:22 -07:00
Anders Kaseorg
c5e397d469
tictactoe_widget: Convert tictactoe_data_holder to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:58:22 -07:00
Anders Kaseorg
cd913b7ebc
sent_messages: Convert message_state to an ES6 class MessageState.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:56:28 -07:00
Anders Kaseorg
daf5a78e98
search_suggestion: Convert make_attacher to an ES6 class Attacher.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:56:28 -07:00
Anders Kaseorg
f96bd3839c
user_search: Convert user_search to an ES6 class UserSearch.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
41778d81d2
unread: Convert unread_topic_counter to an ES6 class UnreadTopicCounter.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
e5ff78e893
unread: Convert unread_pm_counter to an ES6 class UnreadPMCounter.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
44053eba3f
unread: Convert make_bucketer to an ES6 class Bucketer.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
557e88df77
pm_conversations: Convert recent to an ES6 class RecentPrivateMessages.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
2bf6731f5a
stream_topic_history: Convert per_stream_history to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
e47fd521e3
stream_list: Convert build_stream_sidebar_row to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
2aae92b6e3
stream_list: Convert stream_sidebar to an ES6 class StreamSidebar.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
0ad8da139e
stream_data: Convert BinaryDict to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
30e4b51731
stream_create: Convert stream_name_error to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
3319848768
stream_create: Convert stream_subscription_error to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:50:23 -07:00
Anders Kaseorg
ba4ef5bf90
blueslip: Convert Logger to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:40:42 -07:00
Anders Kaseorg
58c84940f4
blueslip: Convert BlueslipError to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:40:42 -07:00
Anders Kaseorg
abe52e2191
filter: Convert Filter to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:40:42 -07:00
Anders Kaseorg
aee95ecf7e
util: Convert CachedValue to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:40:42 -07:00
Anders Kaseorg
4ad00c1aea
lightbox_canvas: Remove old-style window.onload handler.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:32:53 -07:00
Anders Kaseorg
fc21417d67
lightbox_canvas: Convert LightboxCanvas to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:32:53 -07:00
Anders Kaseorg
d5a0ee612f
lightbox_canvas: Make parameter type error fatal.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:32:53 -07:00
Anders Kaseorg
c4024e30c2
debug: Convert IterationProfiler to an ES6 class.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 16:32:53 -07:00