Skip to content

Commit

Permalink
Remove tooltip and survey from Places feature (#4790)
Browse files Browse the repository at this point in the history
* Remove tooltip and survey from Places feature

* Lint

* Oops

---------

Co-authored-by: Dmitry Brant <[email protected]>
  • Loading branch information
cooltey and dbrant authored Jul 11, 2024
1 parent 5700268 commit e330cbd
Show file tree
Hide file tree
Showing 39 changed files with 0 additions and 130 deletions.
16 changes: 0 additions & 16 deletions app/src/main/java/org/wikipedia/main/MainFragment.kt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import org.wikipedia.R
import org.wikipedia.WikipediaApp
import org.wikipedia.activity.BaseActivity
import org.wikipedia.activity.FragmentUtil.getCallback
import org.wikipedia.analytics.eventplatform.PlacesEvent
import org.wikipedia.analytics.eventplatform.ReadingListsAnalyticsHelper
import org.wikipedia.auth.AccountUtil
import org.wikipedia.commons.FilePageActivity
Expand Down Expand Up @@ -186,7 +185,6 @@ class MainFragment : Fragment(), BackPressedHandler, MenuProvider, FeedFragment.
downloadReceiver.register(requireContext(), downloadReceiverCallback)
// reset the last-page-viewed timer
Prefs.pageLastShown = 0
maybeShowPlacesTooltip()
}

override fun onDestroyView() {
Expand Down Expand Up @@ -570,19 +568,6 @@ class MainFragment : Fragment(), BackPressedHandler, MenuProvider, FeedFragment.
}
}

private fun maybeShowPlacesTooltip() {
if (Prefs.showOneTimePlacesMainNavOnboardingTooltip && Prefs.exploreFeedVisitCount > SHOW_PLACES_MAIN_NAV_TOOLTIP) {
enqueueTooltip {
PlacesEvent.logImpression("main_nav_tooltip")
FeedbackUtil.showTooltip(requireActivity(), binding.mainNavTabLayout.findViewById(NavTab.MORE.id),
getString(R.string.places_nav_tab_tooltip_message), aboveOrBelow = true, autoDismiss = false, showDismissButton = true).setOnBalloonDismissListener {
Prefs.showOneTimePlacesMainNavOnboardingTooltip = false
PlacesEvent.logAction("dismiss_click", "main_nav_tooltip")
}
}
}
}

private inner class PageChangeCallback : OnPageChangeCallback() {
override fun onPageSelected(position: Int) {
callback()?.onTabChanged(NavTab.of(position))
Expand Down Expand Up @@ -616,7 +601,6 @@ class MainFragment : Fragment(), BackPressedHandler, MenuProvider, FeedFragment.
companion object {
// Actually shows on the 3rd time of using the app. The Pref.incrementExploreFeedVisitCount() gets call after MainFragment.onResume()
private const val SHOW_EDITS_SNACKBAR_COUNT = 2
private const val SHOW_PLACES_MAIN_NAV_TOOLTIP = 1

fun newInstance(): MainFragment {
return MainFragment().apply {
Expand Down
31 changes: 0 additions & 31 deletions app/src/main/java/org/wikipedia/page/PageActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import org.wikipedia.activity.SingleWebViewActivity
import org.wikipedia.analytics.eventplatform.ArticleLinkPreviewInteractionEvent
import org.wikipedia.analytics.eventplatform.BreadCrumbLogEvent
import org.wikipedia.analytics.eventplatform.DonorExperienceEvent
import org.wikipedia.analytics.eventplatform.PlacesEvent
import org.wikipedia.analytics.metricsplatform.ArticleLinkPreviewInteraction
import org.wikipedia.auth.AccountUtil
import org.wikipedia.commons.FilePageActivity
Expand Down Expand Up @@ -385,7 +384,6 @@ class PageActivity : BaseActivity(), PageFragment.Callback, LinkPreviewDialog.Lo
override fun onPageLoadComplete() {
removeTransitionAnimState()
maybeShowThemeTooltip()
maybeShowPlacesTooltip()
}

override fun onPageDismissBottomSheet() {
Expand Down Expand Up @@ -678,35 +676,6 @@ class PageActivity : BaseActivity(), PageFragment.Callback, LinkPreviewDialog.Lo
.show()
}

private fun maybeShowPlacesTooltip() {
if (!Prefs.showOneTimePlacesPageOnboardingTooltip ||
pageFragment.page?.pageProperties?.geo == null || isTooltipShowing) {
return
}
enqueueTooltip {
FeedbackUtil.getTooltip(
this,
StringUtil.fromHtml(getString(R.string.places_article_menu_tooltip_message)),
arrowAnchorPadding = -DimenUtil.roundedDpToPx(7f),
topOrBottomMargin = -8,
aboveOrBelow = false,
autoDismiss = false,
showDismissButton = true
).apply {
PlacesEvent.logImpression("article_more_tooltip")
setOnBalloonDismissListener {
PlacesEvent.logAction("dismiss_click", "article_more_tooltip")
isTooltipShowing = false
Prefs.showOneTimePlacesPageOnboardingTooltip = false
}
isTooltipShowing = true
BreadCrumbLogEvent.logTooltipShown(this@PageActivity, binding.pageToolbarButtonShowOverflowMenu)
showAlignBottom(binding.pageToolbarButtonShowOverflowMenu)
setCurrentTooltip(this)
}
}
}

private fun maybeShowThemeTooltip() {
if (!Prefs.showOneTimeCustomizeToolbarTooltip) {
return
Expand Down
8 changes: 0 additions & 8 deletions app/src/main/java/org/wikipedia/settings/Prefs.kt
Original file line number Diff line number Diff line change
Expand Up @@ -691,14 +691,6 @@ object Prefs {
get() = PrefsIoUtil.getString(R.string.preference_key_places_wiki_code, WikipediaApp.instance.appOrSystemLanguageCode).orEmpty()
set(value) = PrefsIoUtil.setString(R.string.preference_key_places_wiki_code, value)

var showOneTimePlacesPageOnboardingTooltip
get() = PrefsIoUtil.getBoolean(R.string.preference_key_show_places_page_onboarding_tooltip, true)
set(value) = PrefsIoUtil.setBoolean(R.string.preference_key_show_places_page_onboarding_tooltip, value)

var showOneTimePlacesMainNavOnboardingTooltip
get() = PrefsIoUtil.getBoolean(R.string.preference_key_show_places_main_nav_onboarding_tooltip_shown, true)
set(value) = PrefsIoUtil.setBoolean(R.string.preference_key_show_places_main_nav_onboarding_tooltip_shown, value)

var placesLastLocationAndZoomLevel: Pair<Location, Double>?
get() {
// latitude|longitude|zoomLevel
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-be/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1766,8 +1766,6 @@
<string name="places_filter_title">Фільтраваць па мовам</string>
<string name="places_toggle_buttons_map">Мапа</string>
<string name="places_toggle_buttons_list">Спіс</string>
<string name="places_nav_tab_tooltip_message">Даследуйце артыкулы Вікіпедыі вакол вас з дапамогаю Месцаў</string>
<string name="places_article_menu_tooltip_message">Націсніце «Паглядзець на мапе», каб даведацца пра месцазнаходжанне гэтага артыкула</string>
<string name="places_survey_very_satisfied_option">Вельмі задаволены</string>
<string name="places_survey_very_unsatisfied_option">Вельмі незадаволены</string>
<string name="places_survey_dialog_title">Дапамажыце палепшыць \"Месцы\"</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-bn/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1205,8 +1205,6 @@
<string name="places_filter_title">ভাষা ফিল্টার করুন</string>
<string name="places_toggle_buttons_map">মানচিত্র</string>
<string name="places_toggle_buttons_list">তালিকা</string>
<string name="places_nav_tab_tooltip_message">আপনার চারপাশের স্থানগুলি সম্পর্কেউইকিপিডিয়া নিবন্ধগুলি বের করুন</string>
<string name="places_article_menu_tooltip_message">এই নিবন্ধটির অবস্থান অন্বেষণ করতে\'মানচিত্রে দেখুন\' আলতো চাপুন।</string>
<string name="places_survey_very_satisfied_option">খুবই সন্তুষ্ট</string>
<string name="places_survey_very_unsatisfied_option">খুবই অসন্তুষ্ট</string>
<string name="places_survey_dialog_title" fuzzy="true">\'স্থানগুলি\' উন্নত করতে সাহায্য করুন</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1338,8 +1338,6 @@
<string name="places_filter_title">Filtrovat jazyk</string>
<string name="places_toggle_buttons_map">Mapa</string>
<string name="places_toggle_buttons_list">Seznam</string>
<string name="places_nav_tab_tooltip_message">Objevujte články na Wikipedii kolem sebe pomocí záložky Místa</string>
<string name="places_article_menu_tooltip_message">Klepnutím na „Zobrazit na mapě“ prozkoumáte polohu tohoto článku</string>
<string name="places_survey_very_satisfied_option">Velmi spokojen(a)</string>
<string name="places_survey_very_unsatisfied_option">Velmi nespokojen(a)</string>
<string name="places_survey_dialog_title">Pomozte vylepšit „Místa“</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-da/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1623,8 +1623,6 @@
<string name="places_filter_title">Filtrér efter sprog</string>
<string name="places_toggle_buttons_map">Kort</string>
<string name="places_toggle_buttons_list">Liste</string>
<string name="places_nav_tab_tooltip_message">Opdag Wikipedia-artikler omkring dig med Steder</string>
<string name="places_article_menu_tooltip_message">Tryk på \'Se på kort\' for at udforske denne artikels placering</string>
<string name="places_survey_very_satisfied_option">Meget tilfreds</string>
<string name="places_survey_very_unsatisfied_option">Meget utilfreds</string>
<string name="places_survey_dialog_title">Hjælp med at forbedre \'Steder\'</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-dag/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1549,8 +1549,6 @@
<string name="places_filter_title">Filter balli</string>
<string name="places_toggle_buttons_map">nahingbaŋ</string>
<string name="places_toggle_buttons_list">Yuya</string>
<string name="places_nav_tab_tooltip_message">Lihimi m-bo \"Wikipedia\" lahabali shɛŋa din be a yaɣa li</string>
<string name="places_article_menu_tooltip_message" fuzzy="true">Dihimi &lt;b&gt;\'View on map\'&lt;/b&gt; ka di zaŋ a m-bo lahabali shɛŋa din be a yaɣa li</string>
<string name="places_survey_very_satisfied_option">Tiɣi viɛnyɛla</string>
<string name="places_survey_very_unsatisfied_option">Bi\'tiɣi viɛnyɛla</string>
<string name="places_survey_dialog_title" fuzzy="true">Sɔŋmi lɛbigi tiŋsi</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1585,8 +1585,6 @@
<string name="places_filter_title">Sprache filtern</string>
<string name="places_toggle_buttons_map">Karte</string>
<string name="places_toggle_buttons_list">Liste</string>
<string name="places_nav_tab_tooltip_message">Entdecke Wikipedia-Artikel in deiner Nähe mit Orte</string>
<string name="places_article_menu_tooltip_message">Tippe auf „Auf Karte anzeigen“, um den Standort dieses Artikels zu erkunden</string>
<string name="places_survey_very_satisfied_option">Sehr zufrieden</string>
<string name="places_survey_very_unsatisfied_option">Sehr unzufrieden</string>
<string name="places_survey_dialog_title">Hilf mit, „Orte“ zu verbessern</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1723,8 +1723,6 @@
<string name="places_filter_title">Filtrer par langue</string>
<string name="places_toggle_buttons_map">Carte</string>
<string name="places_toggle_buttons_list">Liste</string>
<string name="places_nav_tab_tooltip_message">Découvrez les articles Wikipédia autour de vous avec Lieux</string>
<string name="places_article_menu_tooltip_message">Appuyez sur « Afficher sur la carte » pour explorer l’emplacement de cet article.</string>
<string name="places_survey_very_satisfied_option">Très satisfait</string>
<string name="places_survey_very_unsatisfied_option">Très insatisfait</string>
<string name="places_survey_dialog_title">Aider à améliorer les \'Lieux\'</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-ha/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1567,6 +1567,4 @@
<string name="places_filter_title">Harshen tacewa</string>
<string name="places_toggle_buttons_map">Taswira</string>
<string name="places_toggle_buttons_list">jeri</string>
<string name="places_nav_tab_tooltip_message">Gano labaran Wikipedia da ke kewaye da ku tare da Wuraren</string>
<string name="places_article_menu_tooltip_message" fuzzy="true">Taɓa wannnan madannin don bincika wurin wannan labarin</string>
</resources>
2 changes: 0 additions & 2 deletions app/src/main/res/values-hi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1462,8 +1462,6 @@
<string name="places_filter_title">भाषा फ़िल्टर करें</string>
<string name="places_toggle_buttons_map">नक्शा</string>
<string name="places_toggle_buttons_list">लिस्ट</string>
<string name="places_nav_tab_tooltip_message">स्थानों के साथ अपने आस-पास विकिपीडिया लेख खोजें</string>
<string name="places_article_menu_tooltip_message" fuzzy="true">इस आर्टिकल की लोकेशन जानने के लिए \'मैप पर देखें\' पर टैप करें&gt;</string>
<string name="places_survey_very_satisfied_option">बहुत संतुष्ट</string>
<string name="places_survey_very_unsatisfied_option">बहुत असंतुष्ट</string>
<string name="places_survey_dialog_title" fuzzy="true">\'स्थानों\' को बेहतर बनाने में सहायता करें</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-hu/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1650,8 +1650,6 @@
<string name="places_filter_title">Nyelvi szűrés</string>
<string name="places_toggle_buttons_map">Térkép</string>
<string name="places_toggle_buttons_list">Lista</string>
<string name="places_nav_tab_tooltip_message">Fedezd fel a körülötted lévő Wikipédia-cikkeket a Helyek segítségével</string>
<string name="places_article_menu_tooltip_message">Érintsd meg a „Megtekintés a térképen” elemet a cikk helyének felfedezéséhez</string>
<string name="places_survey_very_satisfied_option">Nagyon elégedett</string>
<string name="places_survey_very_unsatisfied_option">Nagyon elégedetlen</string>
<string name="places_survey_dialog_title">Segítsen a „Helyek” fejlesztésében</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-ia/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1656,8 +1656,6 @@
<string name="places_filter_title">Filtrar per lingua</string>
<string name="places_toggle_buttons_map">Carta</string>
<string name="places_toggle_buttons_list">Lista</string>
<string name="places_nav_tab_tooltip_message">Discoperi articulos de Wikipedia circa te con Locos</string>
<string name="places_article_menu_tooltip_message">Tocca ‘Vider sur carta’ pro explorar le loco de iste articulo</string>
<string name="places_survey_very_satisfied_option">Multo satisfacite</string>
<string name="places_survey_very_unsatisfied_option">Multo insatisfacite</string>
<string name="places_survey_dialog_title">Adjuta a meliorar ‘Locos’</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1576,8 +1576,6 @@
<string name="places_filter_title">Saring bahasa</string>
<string name="places_toggle_buttons_map">Peta</string>
<string name="places_toggle_buttons_list">Daftar</string>
<string name="places_nav_tab_tooltip_message">Temukan artikel Wikipedia di sekitar Anda dengan Tempat</string>
<string name="places_article_menu_tooltip_message">Ketuk \'Lihat di peta\' untuk menjelajahi lokasi artikel ini</string>
<string name="places_survey_very_satisfied_option">Sangat puas</string>
<string name="places_survey_very_unsatisfied_option">Sangat tidak puas</string>
<string name="places_survey_dialog_title">Bantu memperbaiki \'Tempat\'</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1592,8 +1592,6 @@
<string name="donate_gpay_help_tax">Informazioni di deducibilità fiscale</string>
<string name="places_title">Luoghi</string>
<string name="places_toggle_buttons_map">Mappa</string>
<string name="places_nav_tab_tooltip_message">Scopri le voci di Wikipedia intorno a te con Luoghi</string>
<string name="places_article_menu_tooltip_message">Tocca \"Visualizza sulla mappa\" per esplorare la posizione di questa voce</string>
<string name="places_survey_very_satisfied_option">Molto soddisfatto</string>
<string name="places_survey_very_unsatisfied_option">Molto insoddisfatto</string>
<string name="places_survey_dialog_title">Aiuta a migliorare \'Luoghi\'</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-iw/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,6 @@
<string name="places_filter_title">סינון לפי שפה</string>
<string name="places_toggle_buttons_map">מפה</string>
<string name="places_toggle_buttons_list">רשימה</string>
<string name="places_nav_tab_tooltip_message">ב\"מקומות\" אפשר לגלות ערכי ויקיפדיה סביבך</string>
<string name="places_article_menu_tooltip_message">יש ללחוץ על \"הצגה על מפה\" כדי לחקור את המיקום של הערך הזה</string>
<string name="places_survey_very_satisfied_option">מרוצה מאוד</string>
<string name="places_survey_very_unsatisfied_option">מאוד לא מרוצה</string>
<string name="places_survey_dialog_title">עזרו לנו לשפר את \"מקומות\"</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1630,8 +1630,6 @@
<string name="places_filter_title">言語を絞り込む</string>
<string name="places_toggle_buttons_map">地図</string>
<string name="places_toggle_buttons_list">一覧</string>
<string name="places_nav_tab_tooltip_message">自分の周辺の場所でウィキペディアの記事を発見します</string>
<string name="places_article_menu_tooltip_message">この記事の位置を探すには「地図上で表示」をタップしてください</string>
<string name="places_survey_very_satisfied_option">非常に満足</string>
<string name="places_survey_very_unsatisfied_option">非常に不満</string>
<string name="places_survey_dialog_title">「場所」の改善にご協力ください</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-krc/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1633,8 +1633,6 @@
<string name="places_filter_title">Фильтр тил</string>
<string name="places_toggle_buttons_map">Карта</string>
<string name="places_toggle_buttons_list">Тизме</string>
<string name="places_nav_tab_tooltip_message">Джерле бла тёгеригигиздеги Википедия статьяланы табыгъыз</string>
<string name="places_article_menu_tooltip_message">Бу статьяны темасын ортагъа чыгъарыр ючюн \'Картада кёр\'ге басыгъыз</string>
<string name="places_survey_very_satisfied_option">Бек разыма</string>
<string name="places_survey_very_unsatisfied_option">Бек разы тюлме</string>
<string name="places_survey_dialog_title">\'Джерле\'ни маджаллашдырыргъа болушлукъчу бол</string>
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values-lb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1350,7 +1350,6 @@
<string name="places_title">Plazen</string>
<string name="places_toggle_buttons_map">Kaart</string>
<string name="places_toggle_buttons_list">Lëscht</string>
<string name="places_nav_tab_tooltip_message">Entdeckt Wikipedia-Artikelen an Ärer Ëmgéigend mat „Plazen“</string>
<string name="places_survey_very_satisfied_option">Ganz zefridden</string>
<string name="places_survey_very_unsatisfied_option">Ganz onzefridden</string>
<string name="places_survey_dialog_title">Hëlleft fir „Plazen“ ze verbesseren</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-mk/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1661,8 +1661,6 @@
<string name="places_filter_title">Филтрирај јазик</string>
<string name="places_toggle_buttons_map">Карта</string>
<string name="places_toggle_buttons_list">Список</string>
<string name="places_nav_tab_tooltip_message">Откривајте Википедиини статии околу вас со Места</string>
<string name="places_article_menu_tooltip_message">Допрете на „Погл. на карта“ за да го истражите наоѓалиштето на оваа статија</string>
<string name="places_survey_very_satisfied_option">Многу задоволен</string>
<string name="places_survey_very_unsatisfied_option">Многу незадоволен</string>
<string name="places_survey_dialog_title">Помогнете ни да го подобриме „Места“</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-nb/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1664,8 +1664,6 @@
<string name="places_filter_title">Filtrer etter språk</string>
<string name="places_toggle_buttons_map">Kart</string>
<string name="places_toggle_buttons_list">Liste</string>
<string name="places_nav_tab_tooltip_message">Oppdag Wikipedia-artikler rundt deg med Steder</string>
<string name="places_article_menu_tooltip_message">Trykk på «Vis på kart» for å utforske nærområdet til denne artikkelen</string>
<string name="places_survey_very_satisfied_option">Veldig fornøyd</string>
<string name="places_survey_very_unsatisfied_option">Veldig misfornøyd</string>
<string name="places_survey_dialog_title">Hjelp til med å forbedre «Steder»</string>
Expand Down
Loading

0 comments on commit e330cbd

Please sign in to comment.