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
7727dae441
shared: Add missing katex dependency to shared package.json.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-25 12:22:25 -07:00
Vishnu KS
5b0b1efb15
support: Add functionality to approve sponsorship requests.
...
This should make it much easier to process these requests.
2020-07-24 17:55:38 -07:00
Vishnu KS
1a1396d07e
support: Show customer plan details in support page.
2020-07-24 17:37:41 -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
Gittenburg
8f99820120
composebox_typeahead: Remove deprecated workaround.
...
The Chromium bug[1] was fixed in 2015.
[1]: https://bugs.chromium.org/p/chromium/issues/detail?id=32865
2020-07-24 15:31:26 -07:00
Anders Kaseorg
5f0bd44d58
notifications: Fix incorrectly converted focus method call.
...
Commit a9ca5f603b
(#15863 ) incorrectly
converted this; window is quite obviously a DOM element, not a jQuery
element.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 14:48:47 -07:00
Anders Kaseorg
f0c4cc9e46
js: Fix new import/order errors.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 13:04:07 -07:00
Steve Howell
f5bc454b3a
emoji: Remove dependence on page_params.
...
This sets us up to make emoji a leaf module.
2020-07-24 12:57:52 -07:00
Steve Howell
5280b87f19
emoji refactor: Let emoji.js own the data.
...
We now only use page_params.realm_emoji at
intialization time, and then settings_emoji
gets the data from emoji.js.
2020-07-24 12:57:52 -07:00
Steve Howell
d11c6686a1
minor: Remove parameter to populate_emoji.
...
This is an easy prep step to help out phase
out page_params.realm_emoji.
All callers pass in what's effectively
page_params.realm_emoji. (The dispatch
code does it indirectly.)
2020-07-24 12:57:52 -07:00
Steve Howell
cc31403112
mobile sharing: Move fenced_code.js to shared/js.
...
We also take fenced_code out of the global namespace,
since it only requires katex and underscore.
And we fix the exports to be ES6 style.
2020-07-24 12:57:52 -07:00
Anders Kaseorg
ea7effbe8a
recent_topics: Skip non-stream messages in update_topics_of_message_ids.
...
Fixes an exception when deleting a private message, introduced by
commit 5d5434ec2f
(#15803 ).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 10:58:21 -07:00
Vinit Singh
fdbab54614
i18n: Translate Edit/View Source button's hmtl tooltip text.
...
This commit tags the html tooltip text for internationalization.
2020-07-24 10:54:34 -07:00
Vishnu KS
3ec64b6092
team: Include users without an associated GitHub profile.
...
Including anon=1 in API requests will retrieve all contributors
of the repo. If there is no asscoiated GitHub account present for
the commits then the email and name of the author mentioned in
commit messages is returned.
2020-07-24 10:51:47 -07:00
Anders Kaseorg
e3b3df328d
eslint: Replace sort-imports with import/order.
...
import/order sorts require() calls as well as import statements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 09:42:56 -07:00
Anders Kaseorg
a83c2c6296
eslint: Make subdirectory configurations more consistent.
...
Enable ES2020 everywhere except Casper. Disable Node-specific globals
in static. Disable browser-specific and CommonJS globals in shared.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 09:42:56 -07:00