Niedzielski has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/310585

Change subject: Hygiene: remove redundant code in NavTabView/Test
......................................................................

Hygiene: remove redundant code in NavTabView/Test

• Remove redundant Drawable padding change. It's unclear why but the
  screenshots showed the slightest jitter seemingly from this change so
  update them too.

• Remove screen width as a variable for layout direction. NavTabView is
  no longer responsive.

Change-Id: I00183908177674f65250ba77e9fe95f3c05cad07
---
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
D 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.5x-light.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
M 
app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
M app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
M app/src/main/java/org/wikipedia/navtab/NavTabView.java
14 files changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/85/310585/1

diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
index 51239fc..fea2bbe 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
index 51239fc..fea2bbe 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-120dp-en-rtl-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
deleted file mode 100644
index 3b4108c..0000000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-ltr-font1.0x-light.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
deleted file mode 100644
index 3b4108c..0000000
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testLayoutDirection-480dp-en-rtl-font1.0x-light.png
+++ /dev/null
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
index a21d028..c085dc5 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-dark.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
index a21d028..c085dc5 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testSelect-120dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
index 51239fc..fea2bbe 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-dark.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
index 51239fc..fea2bbe 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testTheme-120dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
index 51239fc..fea2bbe 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.5x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.5x-light.png
index 8aa320c..aac10cc 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.5x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-120dp-en-ltr-font1.5x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
index c60754d..0fd6037 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.0x-light.png
Binary files differ
diff --git 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
index 7f24a9b..d36dff5 100644
--- 
a/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
+++ 
b/app/screenshots-ref/org.wikipedia.navtab.NavTabViewTest.testWidth-720dp-en-ltr-font1.5x-light.png
Binary files differ
diff --git a/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java 
b/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
index 0f7b253..b58df89 100644
--- a/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/navtab/NavTabViewTest.java
@@ -22,9 +22,8 @@
         snap(subject);
     }
 
-    @Theory public void testLayoutDirection(@TestedOn(ints = {WIDTH_DP_L, 
WIDTH_DP_XS}) int widthDp,
-                                            LayoutDirection direction) {
-        setUp(widthDp, direction, 1, Theme.LIGHT);
+    @Theory public void testLayoutDirection(LayoutDirection direction) {
+        setUp(WIDTH_DP_XS, direction, 1, Theme.LIGHT);
         snap(subject);
     }
 
diff --git a/app/src/main/java/org/wikipedia/navtab/NavTabView.java 
b/app/src/main/java/org/wikipedia/navtab/NavTabView.java
index e7462c3..98ac087 100644
--- a/app/src/main/java/org/wikipedia/navtab/NavTabView.java
+++ b/app/src/main/java/org/wikipedia/navtab/NavTabView.java
@@ -25,7 +25,6 @@
     public NavTabView icon(@DrawableRes int id) {
         icon = drawable(id);
         setCompoundDrawablesRelativeWithIntrinsicBounds(null, icon, null, 
null);
-        setCompoundDrawablePadding(0);
         return this;
     }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00183908177674f65250ba77e9fe95f3c05cad07
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski <sniedziel...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to