[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: test

2017-08-23 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/373314 )

Change subject: test
..

test

Change-Id: I91f6340761104a081d03a7ead13cf238b65ea9da
---
A foo
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/foo b/foo
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/foo

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91f6340761104a081d03a7ead13cf238b65ea9da
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: TEST

2017-07-26 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/368123 )

Change subject: TEST
..

TEST

Change-Id: I084bdcf5b4aeb326a4d4a19aa25ba722c6e06b45
---
M .gitignore
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index d559456..5e5902a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -43,4 +43,8 @@
 
 # diff-screenshots
 /app/screenshots
-/app/screenshots-diff
\ No newline at end of file
+/app/screenshots-diff
+
+.sdk/build-tools
+.sdk/platforms
+.sdk/platform-tools

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I084bdcf5b4aeb326a4d4a19aa25ba722c6e06b45
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Test: Update build tools to 26.0.0 (again)

2017-07-26 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367932 )

Change subject: Test: Update build tools to 26.0.0 (again)
..

Test: Update build tools to 26.0.0 (again)

Change-Id: I52b8115b0aa3d7e91b86d41060547b6bad5dae76
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index 9565622..f8e8d0c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -39,7 +39,7 @@
 android {
 // Keep version in sync with /project.properties
 compileSdkVersion 25
-buildToolsVersion '25.0.3'
+buildToolsVersion '26.0.0'
 
 compileOptions {
 sourceCompatibility = JAVA_VERSION

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I52b8115b0aa3d7e91b86d41060547b6bad5dae76
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Test: Revert build-tools to 25.0.3

2017-07-25 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/367680 )

Change subject: Test: Revert build-tools to 25.0.3
..


Test: Revert build-tools to 25.0.3

Bug: T171562
Change-Id: Ia6f6cd2bd676b6b3ef2880c49dcf25f492d2ec82
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index f8e8d0c..9565622 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -39,7 +39,7 @@
 android {
 // Keep version in sync with /project.properties
 compileSdkVersion 25
-buildToolsVersion '26.0.0'
+buildToolsVersion '25.0.3'
 
 compileOptions {
 sourceCompatibility = JAVA_VERSION

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6f6cd2bd676b6b3ef2880c49dcf25f492d2ec82
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Test: Revert build-tools to 25.0.3

2017-07-25 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367680 )

Change subject: Test: Revert build-tools to 25.0.3
..

Test: Revert build-tools to 25.0.3

Bug: T171562
Change-Id: Ia6f6cd2bd676b6b3ef2880c49dcf25f492d2ec82
---
M app/build.gradle
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index f8e8d0c..9565622 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -39,7 +39,7 @@
 android {
 // Keep version in sync with /project.properties
 compileSdkVersion 25
-buildToolsVersion '26.0.0'
+buildToolsVersion '25.0.3'
 
 compileOptions {
 sourceCompatibility = JAVA_VERSION

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6f6cd2bd676b6b3ef2880c49dcf25f492d2ec82
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: TEST (DO NOT MERGE): A tweak to tabbed navigation.

2016-09-27 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: TEST (DO NOT MERGE): A tweak to tabbed navigation.
..

TEST (DO NOT MERGE): A tweak to tabbed navigation.

This is a possible alternative design, in case our users revolt against
bottom tabs. Will abandon if the reception to bottom tabs is positive.

Change-Id: I48de80737cc1aa110db3cc5ce056106d12df3ffd
---
M app/src/main/java/org/wikipedia/navtab/NavTabView.java
M app/src/main/res/drawable/view_nav_tab_text_color.xml
M app/src/main/res/layout/activity_single_fragment_with_toolbar.xml
M app/src/main/res/layout/fragment_main.xml
M app/src/main/res/layout/fragment_nearby.xml
M app/src/main/res/values/dimens.xml
M app/src/main/res/values/styles.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
9 files changed, 33 insertions(+), 62 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/navtab/NavTabView.java 
b/app/src/main/java/org/wikipedia/navtab/NavTabView.java
index 98ac087..c77291a 100644
--- a/app/src/main/java/org/wikipedia/navtab/NavTabView.java
+++ b/app/src/main/java/org/wikipedia/navtab/NavTabView.java
@@ -2,61 +2,38 @@
 
 import android.content.Context;
 import android.graphics.drawable.Drawable;
-import android.os.Build;
 import android.support.annotation.ColorInt;
 import android.support.annotation.ColorRes;
 import android.support.annotation.DrawableRes;
-import android.support.annotation.Nullable;
 import android.support.annotation.StringRes;
 import android.support.v4.content.ContextCompat;
 import android.support.v4.graphics.drawable.DrawableCompat;
-import android.util.TypedValue;
-import android.widget.TextView;
+import android.widget.ImageView;
 
 import org.wikipedia.R;
 
-public class NavTabView extends TextView {
-@Nullable private Drawable icon;
+public class NavTabView extends ImageView {
 
 public NavTabView(Context context) {
-super(context, null, R.attr.navTabViewStyle);
+super(context);
 }
 
 public NavTabView icon(@DrawableRes int id) {
-icon = drawable(id);
-setCompoundDrawablesRelativeWithIntrinsicBounds(null, icon, null, 
null);
+setImageDrawable(drawable(id));
 return this;
 }
 
 public NavTabView text(@StringRes int id) {
-setText(id);
+setContentDescription(getResources().getString(id));
 return this;
-}
-
-@Override public void 
setCompoundDrawablesRelativeWithIntrinsicBounds(@Nullable Drawable start,
-  
@Nullable Drawable top,
-  
@Nullable Drawable end,
-  
@Nullable Drawable bottom) {
-if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
-super.setCompoundDrawablesRelativeWithIntrinsicBounds(start, top, 
end, bottom);
-} else {
-setCompoundDrawablesWithIntrinsicBounds(start, top, end, bottom);
-}
 }
 
 // It doesn't appear practical to tint an XML Drawable that itself is 
referenced in another XML
 // Drawable.
 @Override protected void drawableStateChanged() {
 super.drawableStateChanged();
-if (icon == null) {
-return;
-}
-
-int color = color(isSelected() ? R.color.foundation_blue : 
R.color.foundation_gray);
-DrawableCompat.setTint(icon, color);
-setTextSize(TypedValue.COMPLEX_UNIT_PX,
-getResources().getDimension(isSelected()
-? R.dimen.nav_tab_active_text_size : 
R.dimen.nav_tab_inactive_text_size));
+int color = color(isSelected() ? android.R.color.white : 
R.color.light_gray);
+DrawableCompat.setTint(getDrawable(), color);
 }
 
 private Drawable drawable(@DrawableRes int id) {
diff --git a/app/src/main/res/drawable/view_nav_tab_text_color.xml 
b/app/src/main/res/drawable/view_nav_tab_text_color.xml
index b017826..98c6feb 100644
--- a/app/src/main/res/drawable/view_nav_tab_text_color.xml
+++ b/app/src/main/res/drawable/view_nav_tab_text_color.xml
@@ -1,5 +1,5 @@
 
 http://schemas.android.com/apk/res/android";>
-
-
+
+
 
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_single_fragment_with_toolbar.xml 
b/app/src/main/res/layout/activity_single_fragment_with_toolbar.xml
index f9a5563..793a772 100644
--- a/app/src/main/res/layout/activity_single_fragment_with_toolbar.xml
+++ b/app/src/main/res/layout/activity_single_fragment_with_toolbar.xml
@@ -20,8 +20,7 @@
 style="@style/AppTheme.ToolbarStyle"
 android:background="@color/main_toolbar"
 app:theme="@style/AppTheme.ToolbarTheme"
-   

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: TEST (DO NOT MERGE): Always open pages from Intent in a new ...

2016-09-26 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: TEST (DO NOT MERGE): Always open pages from Intent in a new 
foreground tab.
..

TEST (DO NOT MERGE): Always open pages from Intent in a new foreground tab.

Some users, as well as our own dogfooding, have expressed some confusion
around the behavior of the hardware Back button when reading articles.

(There does *not* appear to be confusion about the behavior of the
Home-as-up button, i.e. it is agreed that this button should always take
the user back to MainActivity, regardless of how many pages are in the
backstack of the current tab.)

The confusion seems to stem from the following:
When a user opens a page from within MainActivity (from the feed, History,
etc), it causes PageActivity to open, and load the requested page into the
*current tab* that may have been previously open. This causes some
unexpected behavior:  if the user presses the hardware Back button,
PageActivity will go backwards in the backstack of pages that had already
existed in the current tab. This is contrary to the intuition that the
Back button should simply close the current page and go back to
MainActivity from where we launched it.

One proposed idea to alleviate the confusion is to always load pages in a
new tab (that is, pages that are loaded from an Intent that causes
PageActivity to start). Here are the benefits to this approach:

- This introduces better "navigational consistency", meaning that every
  launch of PageActivity will now be a proper self-contained browsing
  "session".
- The user will still be able to navigate to links and build a backstack
  in the current tab, but the number of Back presses to return to the
  parent Activity will now make intuitive sense, since the newly-opened
  page will not be pushed onto the existing backstack of the current tab.
- Notice that when the app is launched from an external Intent (e.g. from
  a deeplink) we do already open the requested page in a new tab,
  precisely for the purpose of maintaining consistent Back behavior. We
  should simply treat "internal" Intents coming from MainActivity the same
  way we treat external intents.

This patch prototypes this behavior. Please take it for a spin and see how it
feels.

Change-Id: I861b2822942f28c95ac0c3d3fb6f56ed18a8fd00
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
1 file changed, 1 insertion(+), 5 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index ddc3c7c..da32e1e 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -278,11 +278,7 @@
 } else if (ACTION_PAGE_FOR_TITLE.equals(intent.getAction())) {
 PageTitle title = intent.getParcelableExtra(EXTRA_PAGETITLE);
 HistoryEntry historyEntry = 
intent.getParcelableExtra(EXTRA_HISTORYENTRY);
-if (intent.getBooleanExtra(EXTRA_NEWTAB, false)) {
-loadPage(title, historyEntry, TabPosition.NEW_TAB_BACKGROUND);
-} else {
-loadPage(title, historyEntry);
-}
+loadPageInForegroundTab(title, historyEntry);
 } else if (ACTION_SHOW_TAB_LIST.equals(intent.getAction())) {
 showTabList();
 } else if (ACTION_RESUME_READING.equals(intent.getAction())) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I861b2822942f28c95ac0c3d3fb6f56ed18a8fd00
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Test null listener in CardLargeHeaderViewTest

2016-09-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Test null listener in CardLargeHeaderViewTest
..


Test null listener in CardLargeHeaderViewTest

Change-Id: I34d32e4708fc01d1c5627ccb45eee9aa9a646dba
---
M app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
index 83123a1..95328fb 100644
--- 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
@@ -5,7 +5,6 @@
 import android.support.annotation.StringRes;
 import android.view.View;
 
-import org.junit.Test;
 import org.junit.experimental.theories.Theory;
 import org.junit.experimental.theories.suppliers.TestedOn;
 import org.wikipedia.R;
@@ -64,14 +63,16 @@
 assertText(subject, R.id.view_card_header_large_title, text);
 }
 
-@Test public void testOnClickListener() {
+@Theory public void testOnClickListener(@TestedOn(ints = {0, 1}) int 
nonnull) {
 setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.checkerboard,
 R.string.reading_list_name_sample);
 
-OnClickListener listener = mock(View.OnClickListener.class);
+OnClickListener listener = nonnull == 0 ? null : 
mock(View.OnClickListener.class);
 subject.onClickListener(listener);
 subject.performClick();
-verify(listener);
+if (listener != null) {
+verify(listener);
+}
 }
 
 private void setUp(int widthDp, @NonNull LayoutDirection layoutDirection, 
float fontScale,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34d32e4708fc01d1c5627ccb45eee9aa9a646dba
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Test null listener in CardLargeHeaderViewTest

2016-09-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Test null listener in CardLargeHeaderViewTest
..

Test null listener in CardLargeHeaderViewTest

Change-Id: I34d32e4708fc01d1c5627ccb45eee9aa9a646dba
---
M app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
1 file changed, 5 insertions(+), 4 deletions(-)


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

diff --git 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
index 83123a1..95328fb 100644
--- 
a/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/feed/view/CardLargeHeaderViewTest.java
@@ -5,7 +5,6 @@
 import android.support.annotation.StringRes;
 import android.view.View;
 
-import org.junit.Test;
 import org.junit.experimental.theories.Theory;
 import org.junit.experimental.theories.suppliers.TestedOn;
 import org.wikipedia.R;
@@ -64,14 +63,16 @@
 assertText(subject, R.id.view_card_header_large_title, text);
 }
 
-@Test public void testOnClickListener() {
+@Theory public void testOnClickListener(@TestedOn(ints = {0, 1}) int 
nonnull) {
 setUp(WIDTH_DP_L, LayoutDirection.LOCALE, 1, Theme.LIGHT, 
R.drawable.checkerboard,
 R.string.reading_list_name_sample);
 
-OnClickListener listener = mock(View.OnClickListener.class);
+OnClickListener listener = nonnull == 0 ? null : 
mock(View.OnClickListener.class);
 subject.onClickListener(listener);
 subject.performClick();
-verify(listener);
+if (listener != null) {
+verify(listener);
+}
 }
 
 private void setUp(int widthDp, @NonNull LayoutDirection layoutDirection, 
float fontScale,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34d32e4708fc01d1c5627ccb45eee9aa9a646dba
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

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