Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into fork
Browse files Browse the repository at this point in the history
  • Loading branch information
interfect committed Sep 5, 2020
2 parents 275c5c1 + 9122381 commit 7d2591e
Show file tree
Hide file tree
Showing 21 changed files with 696 additions and 89 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.test.platform.app.InstrumentationRegistry
import okhttp3.mockwebserver.MockWebServer
import org.junit.After
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.mozilla.fenix.ext.settings
Expand Down Expand Up @@ -76,6 +77,7 @@ class StrictEnhancedTrackingProtectionTest {
}
}

@Ignore("Failing on AC 58 update: https://github.com/mozilla-mobile/fenix/issues/14524")
@Test
fun testStrictVisitContentNotification() {
val trackingProtectionTest =
Expand All @@ -89,6 +91,7 @@ class StrictEnhancedTrackingProtectionTest {
}.closeNotificationPopup {}
}

@Ignore("Failing on AC 58 update: https://github.com/mozilla-mobile/fenix/issues/14524")
@Test
fun testStrictVisitContentShield() {
val trackingProtectionTest =
Expand All @@ -106,6 +109,7 @@ class StrictEnhancedTrackingProtectionTest {
}
}

@Ignore("Failing on AC 58 update: https://github.com/mozilla-mobile/fenix/issues/14524")
@Test
fun testStrictVisitProtectionSheet() {
val trackingProtectionTest =
Expand All @@ -125,6 +129,7 @@ class StrictEnhancedTrackingProtectionTest {
}
}

@Ignore("Failing on AC 58 update: https://github.com/mozilla-mobile/fenix/issues/14524")
@Test
fun testStrictVisitDisable() {
val trackingProtectionTest =
Expand Down Expand Up @@ -156,6 +161,7 @@ class StrictEnhancedTrackingProtectionTest {
}
}

@Ignore("Failing on AC 58 update: https://github.com/mozilla-mobile/fenix/issues/14524")
@Test
fun testStrictVisitDisableExceptionToggle() {
val trackingProtectionTest =
Expand Down Expand Up @@ -188,6 +194,7 @@ class StrictEnhancedTrackingProtectionTest {
}
}

@Ignore("Failing on AC 58 update: https://github.com/mozilla-mobile/fenix/issues/14524")
@Test
fun testStrictVisitSheetDetails() {
val trackingProtectionTest =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
}
}

view.swipeRefresh.isEnabled = FeatureFlags.pullToRefreshEnabled
@Suppress("ConstantConditionIf")
if (FeatureFlags.pullToRefreshEnabled) {
val primaryTextColor =
Expand All @@ -674,9 +675,6 @@ abstract class BaseBrowserFragment : Fragment(), UserInteractionHandler, Session
owner = this,
view = view
)
} else {
// Disable pull to refresh
view.swipeRefresh.setOnChildScrollUpCallback { _, _ -> true }
}

webchannelIntegration.set(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,10 @@ class MasterPasswordTipProvider(

val passwordErrorText = context.getString(R.string.mp_dialog_error_transfer_saved_logins)
val migrationContinueButton =
dialogView.findViewById<MaterialButton>(R.id.migration_continue)
dialogView.findViewById<MaterialButton>(R.id.migration_continue).apply {
alpha = HALF_OPACITY
isEnabled = false
}
val passwordView = dialogView.findViewById<TextInputEditText>(R.id.password_field)
val passwordLayout =
dialogView.findViewById<TextInputLayout>(R.id.password_text_input_layout)
Expand Down Expand Up @@ -179,7 +182,7 @@ class MasterPasswordTipProvider(
dialogView.findViewById<MaterialButton>(R.id.positive_button).apply {
text = context.getString(R.string.mp_dialog_close_transfer)
setOnClickListener {
tip?.let { dismissTip(it) }
dismissMPTip()
dialog.dismiss()
}
}
Expand Down Expand Up @@ -212,8 +215,21 @@ class MasterPasswordTipProvider(
}
}

private fun dismissMPTip() {
tip?.let {
context.metrics.track(Event.TipClosed(it.identifier))

context.components.settings.preferences
.edit()
.putBoolean(it.identifier, false)
.apply()

dismissTip(it)
}
}

private fun showSuccessDialog() {
tip?.let { dismissTip(it) }
dismissMPTip()

context.metrics.track(Event.MasterPasswordMigrationSuccess)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ class DefaultToolbarMenu(
}

val downloadsItem = BrowserMenuImageText(
"Downloads",
context.getString(R.string.library_downloads),
R.drawable.ic_download,
primaryTextColor()
) {
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/mozilla/fenix/home/HomeMenu.kt
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ class HomeMenu(
}

val downloadsItem = BrowserMenuImageText(
"Downloads",
context.getString(R.string.library_downloads),
R.drawable.ic_download,
primaryTextColor
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
SupportUtils.SumoTopic.SEARCH_SUGGESTION
),
newTab = store.state.tabId == null,
from = BrowserDirection.FromSearch
from = BrowserDirection.FromSearchDialog
)
}

Expand Down Expand Up @@ -331,7 +331,7 @@ class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
.openToBrowserAndLoad(
searchTermOrURL = result,
newTab = store.state.tabId == null,
from = BrowserDirection.FromSearch
from = BrowserDirection.FromSearchDialog
)
dialog.dismiss()
}
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_browser.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
app:layout_constraintTop_toTopOf="parent"
tools:context="browser.BrowserFragment">

<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
<mozilla.components.ui.widgets.VerticalSwipeRefreshLayout
android:id="@+id/swipeRefresh"
android:layout_width="match_parent"
android:layout_height="match_parent"
Expand All @@ -34,7 +34,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone" />
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
</mozilla.components.ui.widgets.VerticalSwipeRefreshLayout>

<ViewStub
android:id="@+id/stubFindInPage"
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout/fragment_edit_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
android:layout_marginTop="3dp"
android:layout_marginBottom="10dp"
android:background="@null"
android:contentDescription="@string/saved_login_copy_username"
android:contentDescription="@string/saved_login_clear_username"
app:tint="@color/saved_login_clear_edit_text_tint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/inputLayoutUsername"
Expand Down Expand Up @@ -219,7 +219,7 @@
android:layout_width="48dp"
android:layout_height="30dp"
android:background="@null"
android:contentDescription="@string/saved_logins_copy_password"
android:contentDescription="@string/saved_logins_clear_password"
app:tint="@color/saved_login_clear_edit_text_tint"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/revealPasswordButton"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-ast/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,8 @@
<string name="tab_tray_menu_item_share">Compartir toles llingüetes</string>
<!-- Text shown in the menu to view recently closed tabs -->
<string name="tab_tray_menu_recently_closed">Llingüetes zarraes apocayá</string>
<!-- Text shown in the menu to view tab settings -->
<string name="tab_tray_menu_tab_settings">Axustes de llingüetes</string>
<!-- Text shown in the menu for closing all tabs -->
<string name="tab_tray_menu_item_close">Zarrar toles llingüetes</string>
<!-- Shortcut action to open new tab -->
Expand Down
Loading

0 comments on commit 7d2591e

Please sign in to comment.