mirror of https://github.com/zulip/zulip.git
settings: Hyphenate dense-mode classes.
This commit is contained in:
parent
2763be8977
commit
0cfd4c8eed
|
@ -769,8 +769,8 @@ export function dispatch_normal_event(event) {
|
||||||
activity_ui.build_user_sidebar();
|
activity_ui.build_user_sidebar();
|
||||||
}
|
}
|
||||||
if (event.property === "dense_mode") {
|
if (event.property === "dense_mode") {
|
||||||
$("body").toggleClass("less_dense_mode");
|
$("body").toggleClass("less-dense-mode");
|
||||||
$("body").toggleClass("more_dense_mode");
|
$("body").toggleClass("more-dense-mode");
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
event.property === "web_font_size_px" ||
|
event.property === "web_font_size_px" ||
|
||||||
|
|
|
@ -278,9 +278,9 @@ export function initialize_kitchen_sink_stuff() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!user_settings.dense_mode) {
|
if (!user_settings.dense_mode) {
|
||||||
$("body").addClass("less_dense_mode");
|
$("body").addClass("less-dense-mode");
|
||||||
} else {
|
} else {
|
||||||
$("body").addClass("more_dense_mode");
|
$("body").addClass("more-dense-mode");
|
||||||
}
|
}
|
||||||
|
|
||||||
// To keep the specificity same for the CSS related to hiding the
|
// To keep the specificity same for the CSS related to hiding the
|
||||||
|
|
|
@ -930,7 +930,7 @@ run_test("user_settings", ({override}) => {
|
||||||
toggled = [];
|
toggled = [];
|
||||||
dispatch(event);
|
dispatch(event);
|
||||||
assert_same(user_settings.dense_mode, true);
|
assert_same(user_settings.dense_mode, true);
|
||||||
assert_same(toggled, ["less_dense_mode", "more_dense_mode"]);
|
assert_same(toggled, ["less-dense-mode", "more-dense-mode"]);
|
||||||
|
|
||||||
event = event_fixtures.user_settings__web_font_size_px;
|
event = event_fixtures.user_settings__web_font_size_px;
|
||||||
user_settings.web_font_size_px = 14;
|
user_settings.web_font_size_px = 14;
|
||||||
|
|
Loading…
Reference in New Issue