diff --git a/docs/overview/changelog.md b/docs/overview/changelog.md
index f250247de4..4d1c8c653f 100644
--- a/docs/overview/changelog.md
+++ b/docs/overview/changelog.md
@@ -66,6 +66,9 @@ Zulip 1.9; it is generally updated in bursts.
thousands of users and hundreds of bot users.
- Optimized production release tarballs to save about 40MB of size.
- Upgraded to the latest version of the Google emoji set.
+- Dropped, at least for now, support for user-configured alternative
+ emoji sets. This was largely motivated by
+ [EmojiOne requesting removal from the emoji-data project](https://github.com/iamcal/emoji-data/pull/142)
- Removed the "Delete streams" administration page; one can delete
streams directly on "Manage streams".
- Removed support code for the (long-deprecated) legacy desktop app.
diff --git a/static/js/settings.js b/static/js/settings.js
index e654a7af31..60168262c4 100644
--- a/static/js/settings.js
+++ b/static/js/settings.js
@@ -111,6 +111,7 @@ function setup_settings_label() {
left_side_userlist: i18n.t("User list on left sidebar in narrow windows"),
night_mode: i18n.t("Night mode"),
twenty_four_hour_time: i18n.t("24-hour time (17:00 instead of 5:00 PM)"),
+ translate_emoji_to_text: i18n.t("Translate emoji to text (Convert 😃 to :smile:)"),
translate_emoticons: i18n.t("Translate emoticons (convert :) to 😃 in messages)"),
};
}
diff --git a/static/js/settings_display.js b/static/js/settings_display.js
index 98212959ec..55a24e9362 100644
--- a/static/js/settings_display.js
+++ b/static/js/settings_display.js
@@ -33,7 +33,9 @@ exports.set_up = function () {
$("#display-settings-status").hide();
$("#user_timezone").val(page_params.timezone);
- $(".emojiset_choice[value=" + page_params.emojiset + "]").prop("checked", true);
+
+ // $(".emojiset_choice[value=" + page_params.emojiset + "]").prop("checked", true);
+ $("#translate_emoji_to_text").prop('checked', page_params.emojiset === "text");
$("#default_language_modal [data-dismiss]").click(function () {
overlays.close_modal('default_language_modal');
@@ -107,22 +109,15 @@ exports.set_up = function () {
change_display_setting(data, '#time-settings-status');
});
- $(".emojiset_choice").click(function () {
- var emojiset = $(this).val();
+ $("#translate_emoji_to_text").change(function () {
var data = {};
- data.emojiset = JSON.stringify(emojiset);
- var spinner = $("#emoji-settings-status").expectOne();
- loading.make_indicator(spinner, {text: settings_ui.strings.saving });
-
- channel.patch({
- url: '/json/settings/display',
- data: data,
- success: function () {
- },
- error: function (xhr) {
- ui_report.error(settings_ui.strings.failure, xhr, $('#emoji-settings-status').expectOne());
- },
- });
+ var is_checked = $("#translate_emoji_to_text").is(":checked");
+ if (is_checked) {
+ data.emojiset = JSON.stringify("text");
+ } else {
+ data.emojiset = JSON.stringify("google");
+ }
+ change_display_setting(data, '#emoji-settings-status');
});
$("#translate_emoticons").change(function () {
@@ -134,25 +129,8 @@ exports.set_up = function () {
};
exports.report_emojiset_change = function () {
- // TODO: Clean up how this works so we can use
- // change_display_setting. The challenge is that we don't want to
- // report success before the server_events request returns that
- // causes the actual sprite sheet to change. The current
- // implementation is wrong, though, in that it displays the UI
- // update in all active browser windows.
- function emoji_success() {
- if ($("#emoji-settings-status").length) {
- loading.destroy_indicator($("#emojiset_spinner"));
- $("#emojiset_select").val(page_params.emojiset);
- ui_report.success(i18n.t("Emojiset changed successfully!"),
- $('#emoji-settings-status').expectOne());
- var spinner = $("#emoji-settings-status").expectOne();
- settings_ui.display_checkmark(spinner);
- }
- }
-
+ // This function still has full support for multiple emojiset options.
if (page_params.emojiset === 'text') {
- emoji_success();
return;
}
@@ -160,7 +138,6 @@ exports.report_emojiset_change = function () {
sprite.onload = function () {
var sprite_css_href = "/static/generated/emoji/" + page_params.emojiset + "_sprite.css";
$("#emoji-spritesheet").attr('href', sprite_css_href);
- emoji_success();
};
sprite.src = "/static/generated/emoji/sheet_" + page_params.emojiset + "_64.png";
};
@@ -169,9 +146,9 @@ exports.update_page = function () {
$("#twenty_four_hour_time").prop('checked', page_params.twenty_four_hour_time);
$("#left_side_userlist").prop('checked', page_params.left_side_userlist);
$("#default_language_name").text(page_params.default_language_name);
+ $("#translate_emoji_to_text").prop('checked', page_params.emojiset === "text");
$("#translate_emoticons").prop('checked', page_params.translate_emoticons);
$("#night_mode").prop('checked', page_params.night_mode);
- // TODO: Set emojiset selector here.
// Longer term, we'll want to automate this function
};
diff --git a/static/templates/settings/display-settings.handlebars b/static/templates/settings/display-settings.handlebars
index 6817566340..95d898e72b 100644
--- a/static/templates/settings/display-settings.handlebars
+++ b/static/templates/settings/display-settings.handlebars
@@ -72,9 +72,10 @@