update default global nav menu item badge backgroud/text color

This change updates the defaults used for generating the ic-brand
global navigation menu item badge background and text colors. Due
to recent A11y contrast standards we're moving from a blue/white
to a white/black combination for background / text colors.

fixes FOO-2592
flag = none

Test plan:
• After checking out this patchset run:
   • `rails db:migrate`
   • `./script/nuke_node.sh`
• Using the default Themes templates found under /brand_configs
  select or ensure you're using the Default Template and navigate
  to the Global Navigation dropdown tab
   • Verify the default "Nav Badge" color is set to: #ffffff
   • Verify the default "Nav Badge Text" color is set to: #000000
• To trigger a notification badge to appear on one of the global nav
  menu items, it's easiest to just send a message via Inbox to
  the user in question that is under test. You will then be able
  to verify the badge has a white background with black text
  indicating the number of notifications needed to be read

Change-Id: Ia9de2cfe4398ca986af98652a5353860cd66b1b2
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/281076
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Charley Kline <ckline@instructure.com>
Reviewed-by: Jacob Burroughs <jburroughs@instructure.com>
Product-Review: Charley Kline <ckline@instructure.com>
QA-Review: Charley Kline <ckline@instructure.com>
Migration-Review: Jacob Burroughs <jburroughs@instructure.com>
This commit is contained in:
August Thornton 2021-12-13 11:41:41 -07:00
parent cba493080b
commit 264c109df6
5 changed files with 6 additions and 6 deletions

View File

@ -67,12 +67,12 @@
{
"variable_name": "ic-brand-global-nav-menu-item__badge-bgd",
"type": "color",
"default": "$ic-brand-primary"
"default": "#ffffff"
},
{
"variable_name": "ic-brand-global-nav-menu-item__badge-text",
"type": "color",
"default": "#ffffff"
"default": "#000000"
},
{
"variable_name": "ic-brand-global-nav-logo-bgd",

View File

@ -132,7 +132,7 @@ module BrandableCSS
migration = migrations.find { |m| m.name == MIGRATION_NAME + pre_or_post.camelize }
# they can't have the same id, so we just add 1 to the postdeploy one
expected_version = (pre_or_post == "predeploy") ? migration_version : (migration_version + 1)
raise BrandConfigWithOutCompileAssets if expected_version == 85_663_486_644_871_658_581_990
raise BrandConfigWithOutCompileAssets if expected_version == 338_164_632_037_494_729
raise DefaultMD5NotUpToDateError unless migration && migration.version == expected_version
end
end

View File

@ -229,12 +229,12 @@ describe BrandConfig do
end
it "expects md5 to be correct" do
what_it_should_be_if_you_have_not_ran_gulp_rev = 85_663_486_644_871_658_581_990
what_it_should_be_if_you_have = 839_184_435_922_331_766
what_it_should_be_if_you_have_not_ran_gulp_rev = 338_164_632_037_494_729
what_it_should_be_if_you_have = 9_870_895_717_200_317_536_012
expect(BrandableCSS.migration_version).to eq(what_it_should_be_if_you_have_not_ran_gulp_rev).or eq(what_it_should_be_if_you_have)
# if this spec fails, you have probably made a change to app/stylesheets/brandable_variables.json
# you will need to update the migration that runs brand_configs and update these md5s that are
# with and without running `rake canvas:compile_assets`
# Also update the other use of 85663486644871658581990 in lib/brandable_css.rb
# Also update the other use of 338_164_632_037_494_729 in lib/brandable_css.rb
end
end