From 1443af49c1b548b6d750f0e4794ecc8e9f26bf21 Mon Sep 17 00:00:00 2001 From: spsiddarthan Date: Thu, 16 Jan 2025 19:28:10 +0530 Subject: [PATCH 1/5] Masterbar: Add a label for the Reader icon. --- client/layout/masterbar/logged-in.jsx | 23 +++++++++++++---------- client/layout/masterbar/style.scss | 10 ++++++++++ 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/client/layout/masterbar/logged-in.jsx b/client/layout/masterbar/logged-in.jsx index cb2be558eb6f3..84517704a3201 100644 --- a/client/layout/masterbar/logged-in.jsx +++ b/client/layout/masterbar/logged-in.jsx @@ -471,16 +471,19 @@ class MasterbarLoggedIn extends Component { className="masterbar__reader" url="/read" icon={ - - - +
+ + + + Reader +
} onClick={ this.clickReader } isActive={ this.isActive( 'reader', true ) } diff --git a/client/layout/masterbar/style.scss b/client/layout/masterbar/style.scss index 890540443c395..869682146453f 100644 --- a/client/layout/masterbar/style.scss +++ b/client/layout/masterbar/style.scss @@ -845,6 +845,16 @@ body.is-mobile-app-view { } } +.masterbar__icon-with-label { + display: flex; + align-items: center; + gap: 8px; /* Space between icon and label */ +} + +.masterbar__icon-label { + font-size: $masterbar-font-size; +} + .masterbar-cart-button { svg { overflow: visible; From b403d2d721c8739f1c23acc645f7af518b7b88bc Mon Sep 17 00:00:00 2001 From: spsiddarthan Date: Thu, 16 Jan 2025 19:42:33 +0530 Subject: [PATCH 2/5] Remove comment --- client/layout/masterbar/style.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/layout/masterbar/style.scss b/client/layout/masterbar/style.scss index 869682146453f..7a4a18b90c1aa 100644 --- a/client/layout/masterbar/style.scss +++ b/client/layout/masterbar/style.scss @@ -848,7 +848,7 @@ body.is-mobile-app-view { .masterbar__icon-with-label { display: flex; align-items: center; - gap: 8px; /* Space between icon and label */ + gap: 8px; } .masterbar__icon-label { From f8333ae6233d8c00c85c8060732037e0da009712 Mon Sep 17 00:00:00 2001 From: spsiddarthan Date: Thu, 16 Jan 2025 22:36:29 +0530 Subject: [PATCH 3/5] Hide the label on mobile screens. --- client/layout/masterbar/logged-in.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/layout/masterbar/logged-in.jsx b/client/layout/masterbar/logged-in.jsx index 84517704a3201..bb24bfae860df 100644 --- a/client/layout/masterbar/logged-in.jsx +++ b/client/layout/masterbar/logged-in.jsx @@ -482,7 +482,7 @@ class MasterbarLoggedIn extends Component { > - Reader + Reader } onClick={ this.clickReader } From 8f765f6531dde48c29029a5ec79d3aa6695e234f Mon Sep 17 00:00:00 2001 From: spsiddarthan Date: Thu, 16 Jan 2025 22:44:53 +0530 Subject: [PATCH 4/5] Added translation. --- client/layout/masterbar/logged-in.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/layout/masterbar/logged-in.jsx b/client/layout/masterbar/logged-in.jsx index bb24bfae860df..4d1374aefe618 100644 --- a/client/layout/masterbar/logged-in.jsx +++ b/client/layout/masterbar/logged-in.jsx @@ -482,7 +482,9 @@ class MasterbarLoggedIn extends Component { > - Reader + + { translate( 'Reader' ) } + } onClick={ this.clickReader } From 84bc6bdd975de6ee7b70f0ddb45084aefe056b1f Mon Sep 17 00:00:00 2001 From: spsiddarthan Date: Fri, 17 Jan 2025 00:14:30 +0530 Subject: [PATCH 5/5] Make a child component of Item. --- client/layout/masterbar/logged-in.jsx | 31 +++++++++++++-------------- client/layout/masterbar/style.scss | 10 ++------- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/client/layout/masterbar/logged-in.jsx b/client/layout/masterbar/logged-in.jsx index 4d1374aefe618..88cd83d10d537 100644 --- a/client/layout/masterbar/logged-in.jsx +++ b/client/layout/masterbar/logged-in.jsx @@ -471,28 +471,27 @@ class MasterbarLoggedIn extends Component { className="masterbar__reader" url="/read" icon={ -
- - - - - { translate( 'Reader' ) } - -
+ + + } onClick={ this.clickReader } isActive={ this.isActive( 'reader', true ) } tooltip={ translate( 'Read the blogs and topics you follow' ) } preloadSection={ this.preloadReader } hasGlobalBorderStyle - /> + > + + { translate( 'Reader' ) } + + ); } diff --git a/client/layout/masterbar/style.scss b/client/layout/masterbar/style.scss index 7a4a18b90c1aa..da581895b77cb 100644 --- a/client/layout/masterbar/style.scss +++ b/client/layout/masterbar/style.scss @@ -845,14 +845,8 @@ body.is-mobile-app-view { } } -.masterbar__icon-with-label { - display: flex; - align-items: center; - gap: 8px; -} - -.masterbar__icon-label { - font-size: $masterbar-font-size; +.masterbar__item-reader-label { + padding-left: 6px; } .masterbar-cart-button {