[tor-commits] [Git][tpo/applications/fenix][tor-browser-87.0.0b2-10.5-1] Revert "Bug 40138: Add feedback survey card"

Matthew Finkel gitlab at torproject.org
Wed Mar 24 16:19:48 UTC 2021



Matthew Finkel pushed to branch tor-browser-87.0.0b2-10.5-1 at The Tor Project / Applications / fenix


Commits:
0f333548 by Matthew Finkel at 2021-03-23T21:39:10+00:00
Revert "Bug 40138: Add feedback survey card"

This reverts commit 706838904ea883f56095d77f9dd484ab61f6480e.

Bug 40151: Remove survey banner on TBA-stable

- - - - -


11 changed files:

- app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt
- app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt
- app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlInteractor.kt
- app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlView.kt
- − app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TorFeedbackSurveyViewHolder.kt
- app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
- − app/src/main/res/drawable/feedback_survey_padded_background.xml
- − app/src/main/res/drawable/tor_survey_icon_3x.png
- app/src/main/res/layout/fragment_home.xml
- − app/src/main/res/layout/tor_feedback_survey.xml
- app/src/main/res/values/colors.xml


Changes:

=====================================
app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlAdapter.kt
=====================================
@@ -23,7 +23,6 @@ import org.mozilla.fenix.home.sessioncontrol.viewholders.CollectionViewHolder
 import org.mozilla.fenix.home.sessioncontrol.viewholders.NoCollectionsMessageViewHolder
 import org.mozilla.fenix.home.sessioncontrol.viewholders.PrivateBrowsingDescriptionViewHolder
 import org.mozilla.fenix.home.sessioncontrol.viewholders.TorBootstrapPagerViewHolder
-import org.mozilla.fenix.home.sessioncontrol.viewholders.TorFeedbackSurveyViewHolder
 import org.mozilla.fenix.home.sessioncontrol.viewholders.TabInCollectionViewHolder
 import org.mozilla.fenix.home.sessioncontrol.viewholders.TopSitePagerViewHolder
 import org.mozilla.fenix.home.sessioncontrol.viewholders.onboarding.OnboardingAutomaticSignInViewHolder
@@ -81,7 +80,6 @@ sealed class AdapterItem(@LayoutRes val viewType: Int) {
     }
 
     object PrivateBrowsingDescription : AdapterItem(PrivateBrowsingDescriptionViewHolder.LAYOUT_ID)
-    object TorFeedbackSurvey : AdapterItem(TorFeedbackSurveyViewHolder.LAYOUT_ID)
     object NoCollectionsMessage : AdapterItem(NoCollectionsMessageViewHolder.LAYOUT_ID)
 
     object TorBootstrap : AdapterItem(TorBootstrapPagerViewHolder.LAYOUT_ID)
@@ -181,10 +179,6 @@ class SessionControlAdapter(
                 view,
                 interactor
             )
-            TorFeedbackSurveyViewHolder.LAYOUT_ID -> TorFeedbackSurveyViewHolder(
-                view,
-                interactor
-            )
             TorBootstrapPagerViewHolder.LAYOUT_ID -> TorBootstrapPagerViewHolder(
                 view,
                 components,


=====================================
app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlController.kt
=====================================
@@ -92,11 +92,6 @@ interface SessionControlController {
      */
     fun handlePrivateBrowsingLearnMoreClicked()
 
-    /**
-     * @see [TabSessionInteractor.onTorFeedbackSurveyLaunchClicked]
-     */
-    fun handleTorFeedbackSurveyLaunchClicked()
-
     /**
      * @see [TopSiteInteractor.onRenameTopSiteClicked]
      */
@@ -625,12 +620,4 @@ class DefaultSessionControlController(
     override fun handleTorNetworkSettingsClicked() {
         openTorNetworkSettings()
     }
-
-    override fun handleTorFeedbackSurveyLaunchClicked() {
-        activity.openToBrowserAndLoad(
-            searchTermOrURL = SupportUtils.TOR_FEEDBACK_SURVEY_URL,
-            newTab = true,
-            from = BrowserDirection.FromHome
-        )
-    }
 }


=====================================
app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlInteractor.kt
=====================================
@@ -18,12 +18,6 @@ interface TabSessionInteractor {
      * "Common myths about private browsing" link in private mode.
      */
     fun onPrivateBrowsingLearnMoreClicked()
-
-    /**
-     * Shows the Feedback Survey web page in a new tab. Called when a user clicks on the
-     * "Launch the Survey" button.
-     */
-    fun onTorFeedbackSurveyLaunchClicked()
 }
 
 /**
@@ -367,8 +361,4 @@ class SessionControlInteractor(
     override fun onTorBootstrapNetworkSettingsClicked() {
         controller.handleTorNetworkSettingsClicked()
     }
-
-    override fun onTorFeedbackSurveyLaunchClicked() {
-        controller.handleTorFeedbackSurveyLaunchClicked()
-    }
 }


=====================================
app/src/main/java/org/mozilla/fenix/home/sessioncontrol/SessionControlView.kt
=====================================
@@ -66,7 +66,7 @@ private fun showCollections(
     }
 }
 
-private fun privateModeAdapterItems() = listOf(AdapterItem.TorFeedbackSurvey)
+private fun privateModeAdapterItems() = listOf(AdapterItem.PrivateBrowsingDescription)
 
 private fun bootstrapAdapterItems() = listOf(AdapterItem.TorBootstrap)
 


=====================================
app/src/main/java/org/mozilla/fenix/home/sessioncontrol/viewholders/TorFeedbackSurveyViewHolder.kt deleted
=====================================
@@ -1,34 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-package org.mozilla.fenix.home.sessioncontrol.viewholders
-
-import android.view.View
-import androidx.recyclerview.widget.RecyclerView
-import kotlinx.android.synthetic.main.tor_feedback_survey.view.*
-import org.mozilla.fenix.R
-import org.mozilla.fenix.home.sessioncontrol.TabSessionInteractor
-
-class TorFeedbackSurveyViewHolder(
-    view: View,
-    private val interactor: TabSessionInteractor
-) : RecyclerView.ViewHolder(view) {
-
-    init {
-        // val resources = view.resources
-        // val appName = resources.getString(R.string.app_name)
-        // view.private_session_description.text = resources.getString(
-        //     R.string.private_browsing_placeholder_description_2, appName
-        // )
-        with(view.feedback_survey_launch_button) {
-            setOnClickListener {
-                interactor.onTorFeedbackSurveyLaunchClicked()
-            }
-        }
-    }
-
-    companion object {
-        const val LAYOUT_ID = R.layout.tor_feedback_survey
-    }
-}


=====================================
app/src/main/java/org/mozilla/fenix/settings/SupportUtils.kt
=====================================
@@ -37,7 +37,6 @@ object SupportUtils {
     const val DONATE_URL = "https://donate.torproject.org/"
     const val TB_MANUAL_URL = "https://tb-manual.torproject.org/mobile-tor"
     const val TOR_RELEASES = "https://www.torproject.org/releases/"
-    const val TOR_FEEDBACK_SURVEY_URL = "http://bogdyardcfurxcle.onion/index.php/491436"
 
     enum class SumoTopic(internal val topicStr: String) {
         FENIX_MOVING("sync-delist"),


=====================================
app/src/main/res/drawable/feedback_survey_padded_background.xml deleted
=====================================
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?><!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<ripple xmlns:android="http://schemas.android.com/apk/res/android"
-    android:color="@color/feedback_survey_padded_background_color">
-    <item
-        android:bottom="6dp"
-        android:top="6dp">
-        <shape android:shape="rectangle">
-            <corners android:radius="4dp" />
-        </shape>
-    </item>
-</ripple>


=====================================
app/src/main/res/drawable/tor_survey_icon_3x.png deleted
=====================================
Binary files a/app/src/main/res/drawable/tor_survey_icon_3x.png and /dev/null differ


=====================================
app/src/main/res/layout/fragment_home.xml
=====================================
@@ -94,8 +94,7 @@
             android:textColor="#DEFFFFFF"
             android:textSize="40sp"
             android:lineSpacingMultiplier="1.1"
-            app:layout_scrollFlags="scroll"
-            android:visibility="gone" />
+            app:layout_scrollFlags="scroll" />
 
     </com.google.android.material.appbar.AppBarLayout>
 


=====================================
app/src/main/res/layout/tor_feedback_survey.xml deleted
=====================================
@@ -1,79 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- This Source Code Form is subject to the terms of the Mozilla Public
-   - License, v. 2.0. If a copy of the MPL was not distributed with this
-   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
-<androidx.constraintlayout.widget.ConstraintLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/feedback_survey_wrapper"
-    style="@style/OnboardingCardLightWithPadding"
-    android:layout_width="match_parent"
-    android:layout_height="wrap_content"
-    android:clipChildren="false"
-    android:clipToPadding="false">
-
-    <LinearLayout
-        android:id="@+id/feedback_survey_header_wrapper"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toTopOf="parent"
-        android:importantForAccessibility="no">
-
-        <ImageView
-            android:id="@+id/tor_feedback_icon"
-            android:layout_width="wrap_content"
-            android:layout_height="32dp"
-            android:layout_marginEnd="10dp"
-            android:adjustViewBounds="true"
-            android:clickable="false"
-            android:focusable="false"
-            android:importantForAccessibility="no"
-            app:srcCompat="@drawable/tor_survey_icon_3x"/>
-
-        <TextView
-            android:id="@+id/feedback_survey_header"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:ellipsize="none"
-            android:lineSpacingExtra="6dp"
-            android:paddingHorizontal="4dp"
-            android:paddingTop="4dp"
-            android:scrollHorizontally="false"
-            android:textAlignment="viewStart"
-            android:textColor="?primaryText"
-            android:textSize="20sp"
-            android:text="Do you use Snowflake?" />
-    </LinearLayout>
-
-    <TextView
-        android:id="@+id/feedback_survey_description"
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:ellipsize="none"
-        android:lineSpacingExtra="6dp"
-        android:paddingHorizontal="4dp"
-        android:paddingTop="4dp"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/feedback_survey_header_wrapper"
-        android:scrollHorizontally="false"
-        android:textAlignment="viewStart"
-        android:textColor="?primaryText"
-        android:textSize="16sp"
-        android:text="Snowflake is a pluggable transport available in Tor Browser. Help us improve it by completing this short survey about your browsing experience:" />
-
-    <Button
-        style="@style/PositiveButton"
-        android:id="@+id/feedback_survey_launch_button"
-        android:text="Launch the Survey"
-        android:layout_marginTop="16dp"
-        android:textSize="18dp"
-        android:textColor="@android:color/black"
-        android:background="@drawable/feedback_survey_padded_background"
-        android:fontFamily="Roboto-Medium"
-        app:layout_constraintEnd_toEndOf="parent"
-        app:layout_constraintStart_toStartOf="parent"
-        app:layout_constraintTop_toBottomOf="@id/feedback_survey_description" />
-
-</androidx.constraintlayout.widget.ConstraintLayout>


=====================================
app/src/main/res/values/colors.xml
=====================================
@@ -425,7 +425,4 @@
 
     <!-- Toolbar menu icon colors -->
     <color name="toolbar_menu_transparent">@android:color/transparent</color>
-
-    <!-- Tor -->
-    <color name="feedback_survey_padded_background_color">#A76FFA</color>
 </resources>



View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/commit/0f3335483d3e8be2fac777b2d1f57e106fdb651c

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/fenix/-/commit/0f3335483d3e8be2fac777b2d1f57e106fdb651c
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tor-commits/attachments/20210324/56088f3f/attachment-0001.htm>


More information about the tor-commits mailing list