FEATURE: Add "smallest" option to user text size preferences

This commit is contained in:
Kris 2020-07-07 13:08:19 -04:00
parent 44aaf4415d
commit 66257ca8b6
6 changed files with 9 additions and 2 deletions

View File

@ -21,7 +21,7 @@ const USER_HOMES = {
5: "top" 5: "top"
}; };
const TEXT_SIZES = ["smaller", "normal", "larger", "largest"]; const TEXT_SIZES = ["smallest", "smaller", "normal", "larger", "largest"];
const TITLE_COUNT_MODES = ["notifications", "contextual"]; const TITLE_COUNT_MODES = ["notifications", "contextual"];
export default Controller.extend({ export default Controller.extend({

View File

@ -14,6 +14,10 @@ html {
overflow-y: scroll; overflow-y: scroll;
direction: ltr; direction: ltr;
&.text-size-smallest {
font-size: $base-font-size-smallest;
}
&.text-size-smaller { &.text-size-smaller {
font-size: $base-font-size-smaller; font-size: $base-font-size-smaller;
} }

View File

@ -35,6 +35,7 @@ $bronze: #cd7f32 !default;
// Fonts // Fonts
// -------------------------------------------------- // --------------------------------------------------
$base-font-size-smallest: 0.815em !default; // eq. to 13px
$base-font-size-smaller: 0.875em !default; // eq. to 14px $base-font-size-smaller: 0.875em !default; // eq. to 14px
$base-font-size: 0.938em !default; // eq. to 15px $base-font-size: 0.938em !default; // eq. to 15px
$base-font-size-larger: 1.063em !default; // eq. to 17px $base-font-size-larger: 1.063em !default; // eq. to 17px

View File

@ -28,7 +28,7 @@ class UserOption < ActiveRecord::Base
end end
def self.text_sizes def self.text_sizes
@text_sizes ||= Enum.new(normal: 0, larger: 1, largest: 2, smaller: 3) @text_sizes ||= Enum.new(normal: 0, larger: 1, largest: 2, smaller: 3, smallest: 4)
end end
def self.title_count_modes def self.title_count_modes

View File

@ -1216,6 +1216,7 @@ en:
text_size: text_size:
title: "Text Size" title: "Text Size"
smallest: "Smallest"
smaller: "Smaller" smaller: "Smaller"
normal: "Normal" normal: "Normal"
larger: "Larger" larger: "Larger"

View File

@ -142,6 +142,7 @@ componentTest("valueAttribute (deprecated)", {
this.set("value", "normal"); this.set("value", "normal");
const content = [ const content = [
{ name: "Smallest", value: "smallest" },
{ name: "Smaller", value: "smaller" }, { name: "Smaller", value: "smaller" },
{ name: "Normal", value: "normal" }, { name: "Normal", value: "normal" },
{ name: "Larger", value: "larger" }, { name: "Larger", value: "larger" },