From e480bfa2b564eaa7eec9c249994f7fc26527022e Mon Sep 17 00:00:00 2001 From: Moh'd Khier Abualruz Date: Thu, 23 Nov 2023 11:19:44 +0100 Subject: [PATCH] Update theme icon for client preferences in user links - Add appearance.svg file and classes - Update the icon name in php - Update icon name in test data and Snapshot To test: change return value of isClientPreferencesPinned() from SkinVector22 PHP Class to false Bug: T351142 Change-Id: If61f3019430be3cb9c926b09bc397e27d8e636f2 --- includes/SkinVector22.php | 2 +- resources/skins.vector.styles/images/appearance.svg | 7 +++++++ resources/skins.vector.styles/mixins.less | 4 ++++ tests/jest/__snapshots__/userLinks.test.js.snap | 2 +- tests/jest/userLinksData.js | 2 +- 5 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 resources/skins.vector.styles/images/appearance.svg diff --git a/includes/SkinVector22.php b/includes/SkinVector22.php index dc9a5e4b6..f1e40487b 100644 --- a/includes/SkinVector22.php +++ b/includes/SkinVector22.php @@ -496,7 +496,7 @@ class SkinVector22 extends SkinMustache { $this->msg( 'vector-client-prefs-label' )->text(), '', // @todo: Use new theme icon (T351142) - 'settings' + 'appearance' ) : null, 'data-vector-sticky-header' => $featureManager->isFeatureEnabled( Constants::FEATURE_STICKY_HEADER diff --git a/resources/skins.vector.styles/images/appearance.svg b/resources/skins.vector.styles/images/appearance.svg new file mode 100644 index 000000000..faa985a9c --- /dev/null +++ b/resources/skins.vector.styles/images/appearance.svg @@ -0,0 +1,7 @@ + + + + appearance + + + diff --git a/resources/skins.vector.styles/mixins.less b/resources/skins.vector.styles/mixins.less index 2649a3f49..638d93c3c 100644 --- a/resources/skins.vector.styles/mixins.less +++ b/resources/skins.vector.styles/mixins.less @@ -98,3 +98,7 @@ left: auto !important; /* stylelint-disable-line declaration-no-important */ right: 0; } + +.vector-icon.mw-ui-icon-wikimedia-appearance { + background-image: url( ./images/appearance.svg ); +} diff --git a/tests/jest/__snapshots__/userLinks.test.js.snap b/tests/jest/__snapshots__/userLinks.test.js.snap index 9ab79743d..84164763d 100644 --- a/tests/jest/__snapshots__/userLinks.test.js.snap +++ b/tests/jest/__snapshots__/userLinks.test.js.snap @@ -62,7 +62,7 @@ exports[`UserLinks renders 1`] = `
  • Talk
  • Sandbox
  • -
  • Preferences
  • +
  • Preferences
  • Beta
  • Uploads
  • diff --git a/tests/jest/userLinksData.js b/tests/jest/userLinksData.js index e19eee3d0..bfc948476 100644 --- a/tests/jest/userLinksData.js +++ b/tests/jest/userLinksData.js @@ -52,7 +52,7 @@ const templateData = {
  • Talk
  • Sandbox
  • -
  • Preferences
  • +
  • Preferences
  • Beta
  • Uploads