jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: Refactor how watchstar works
......................................................................


Hygiene: Refactor how watchstar works

It should be agnostic to the way the icon is implemented

Change-Id: Ic758078428812c353b4c7d7ef507715ee6514645
---
M javascripts/modules/watchstar/Watchstar.js
M less/modules/watchstar.less
2 files changed, 4 insertions(+), 18 deletions(-)

Approvals:
  Kaldari: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/javascripts/modules/watchstar/Watchstar.js 
b/javascripts/modules/watchstar/Watchstar.js
index 42422eb..202209d 100644
--- a/javascripts/modules/watchstar/Watchstar.js
+++ b/javascripts/modules/watchstar/Watchstar.js
@@ -11,7 +11,7 @@
                } ),
                watchedIcon = new Icon( {
                        name: 'watched',
-                       additionalClassNames: 'icon-32px watch-this-article'
+                       additionalClassNames: 'icon-32px watch-this-article 
watched'
                } ),
                toast = M.require( 'toast' ),
                user = M.require( 'user' ),
@@ -87,7 +87,7 @@
                postRender: function ( options ) {
                        var self = this,
                                unwatchedClass = watchIcon.getGlyphClassName(),
-                               watchedClass = watchedIcon.getGlyphClassName(),
+                               watchedClass = watchedIcon.getGlyphClassName() 
+ ' watched',
                                page = options.page,
                                $el = self.$el;
 
diff --git a/less/modules/watchstar.less b/less/modules/watchstar.less
index b5e1e3c..478b773 100644
--- a/less/modules/watchstar.less
+++ b/less/modules/watchstar.less
@@ -1,24 +1,10 @@
 @import "minerva.variables";
 @import "minerva.mixins";
 
-@watchThisArticleSize: 48px;
-
-// watchlist and search results
-.page-list .watch-this-article {
-       position: absolute;
-       right: 0;
-       top: 50%;
-       margin-top: -(@watchThisArticleSize / 2);
-       width: @watchThisArticleSize;
-}
-
 .animations {
-       .mw-ui-icon.watch-this-article,
-       .icon.watch-this-article {
+       .watch-this-article {
                .transition-transform( .5s );
-
-               &.mw-ui-icon-watched,
-               &.icon-watched {
+               &.watched {
                        .transform( rotate(72deg) );
                }
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/204662
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic758078428812c353b4c7d7ef507715ee6514645
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson <[email protected]>
Gerrit-Reviewer: Kaldari <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to