Copione merged onto master
commit
f61f59b296
|
@ -42,7 +42,7 @@ object FeatureFlags {
|
||||||
/**
|
/**
|
||||||
* Enables the new search experience
|
* Enables the new search experience
|
||||||
*/
|
*/
|
||||||
val newSearchExperience = Config.channel.isDebug
|
val newSearchExperience = Config.channel.isNightlyOrDebug
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Enables wait til first contentful paint
|
* Enables wait til first contentful paint
|
||||||
|
|
|
@ -272,7 +272,8 @@ class Core(private val context: Context) {
|
||||||
private val passwordsEncryptionKey by lazy {
|
private val passwordsEncryptionKey by lazy {
|
||||||
getSecureAbove22Preferences().getString(PASSWORDS_KEY)
|
getSecureAbove22Preferences().getString(PASSWORDS_KEY)
|
||||||
?: generateEncryptionKey(KEY_STRENGTH).also {
|
?: generateEncryptionKey(KEY_STRENGTH).also {
|
||||||
if (context.settings().passwordsEncryptionKeyGenerated) {
|
if (context.settings().passwordsEncryptionKeyGenerated &&
|
||||||
|
isSentryEnabled()) {
|
||||||
// We already had previously generated an encryption key, but we have lost it
|
// We already had previously generated an encryption key, but we have lost it
|
||||||
Sentry.capture("Passwords encryption key for passwords storage was lost and we generated a new one")
|
Sentry.capture("Passwords encryption key for passwords storage was lost and we generated a new one")
|
||||||
}
|
}
|
||||||
|
|
|
@ -383,8 +383,10 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val args by navArgs<HomeFragmentArgs>()
|
||||||
|
|
||||||
if (view.context.settings().accessibilityServicesEnabled &&
|
if (view.context.settings().accessibilityServicesEnabled &&
|
||||||
bundleArgs.getBoolean(FOCUS_ON_ADDRESS_BAR)
|
args.focusOnAddressBar
|
||||||
) {
|
) {
|
||||||
// We cannot put this in the fragment_home.xml file as it breaks tests
|
// We cannot put this in the fragment_home.xml file as it breaks tests
|
||||||
view.toolbar_wrapper.isFocusableInTouchMode = true
|
view.toolbar_wrapper.isFocusableInTouchMode = true
|
||||||
|
@ -413,6 +415,10 @@ class HomeFragment : Fragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
updateTabCounter(requireComponents.core.store.state)
|
updateTabCounter(requireComponents.core.store.state)
|
||||||
|
|
||||||
|
if (args.focusOnAddressBar && requireContext().settings().useNewSearchExperience) {
|
||||||
|
navigateToSearch()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun removeAllTabsAndShowSnackbar(sessionCode: String) {
|
private fun removeAllTabsAndShowSnackbar(sessionCode: String) {
|
||||||
|
|
|
@ -173,6 +173,8 @@ class SearchFragment : Fragment(), UserInteractionHandler {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
awesomeBarView.view.setOnEditSuggestionListener(toolbarView.view::setSearchTerms)
|
||||||
|
|
||||||
val urlView = toolbarView.view
|
val urlView = toolbarView.view
|
||||||
.findViewById<InlineAutocompleteEditText>(R.id.mozac_browser_toolbar_edit_url_view)
|
.findViewById<InlineAutocompleteEditText>(R.id.mozac_browser_toolbar_edit_url_view)
|
||||||
urlView?.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
|
urlView?.importantForAccessibility = View.IMPORTANT_FOR_ACCESSIBILITY_NO
|
||||||
|
|
|
@ -126,7 +126,14 @@ class ToolbarView(
|
||||||
/* Only set the search terms if pasted text is null so that the search term doesn't
|
/* Only set the search terms if pasted text is null so that the search term doesn't
|
||||||
overwrite pastedText when view enters `editMode` */
|
overwrite pastedText when view enters `editMode` */
|
||||||
if (searchState.pastedText.isNullOrEmpty()) {
|
if (searchState.pastedText.isNullOrEmpty()) {
|
||||||
view.setSearchTerms(searchState.searchTerms)
|
// If we're in edit mode, setting the search term will update the toolbar,
|
||||||
|
// so we make sure we have the correct term/query to show.
|
||||||
|
val termOrQuery = if (searchState.searchTerms.isNotEmpty()) {
|
||||||
|
searchState.searchTerms
|
||||||
|
} else {
|
||||||
|
searchState.query
|
||||||
|
}
|
||||||
|
view.setSearchTerms(termOrQuery)
|
||||||
}
|
}
|
||||||
|
|
||||||
// We must trigger an onTextChanged so when search terms are set when transitioning to `editMode`
|
// We must trigger an onTextChanged so when search terms are set when transitioning to `editMode`
|
||||||
|
|
|
@ -4,11 +4,16 @@
|
||||||
|
|
||||||
package org.mozilla.fenix.searchdialog
|
package org.mozilla.fenix.searchdialog
|
||||||
|
|
||||||
|
import android.app.Dialog
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.appcompat.app.AppCompatDialogFragment
|
import androidx.appcompat.app.AppCompatDialogFragment
|
||||||
|
import androidx.constraintlayout.widget.ConstraintProperties.BOTTOM
|
||||||
|
import androidx.constraintlayout.widget.ConstraintProperties.PARENT_ID
|
||||||
|
import androidx.constraintlayout.widget.ConstraintProperties.TOP
|
||||||
|
import androidx.constraintlayout.widget.ConstraintSet
|
||||||
import androidx.navigation.fragment.findNavController
|
import androidx.navigation.fragment.findNavController
|
||||||
import androidx.navigation.fragment.navArgs
|
import androidx.navigation.fragment.navArgs
|
||||||
import kotlinx.android.synthetic.main.fragment_search.view.*
|
import kotlinx.android.synthetic.main.fragment_search.view.*
|
||||||
|
@ -16,9 +21,11 @@ import kotlinx.android.synthetic.main.fragment_search_dialog.*
|
||||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||||
import mozilla.components.browser.state.selector.findTab
|
import mozilla.components.browser.state.selector.findTab
|
||||||
import mozilla.components.lib.state.ext.consumeFrom
|
import mozilla.components.lib.state.ext.consumeFrom
|
||||||
|
import mozilla.components.support.base.feature.UserInteractionHandler
|
||||||
import mozilla.components.support.ktx.android.view.hideKeyboard
|
import mozilla.components.support.ktx.android.view.hideKeyboard
|
||||||
import org.mozilla.fenix.HomeActivity
|
import org.mozilla.fenix.HomeActivity
|
||||||
import org.mozilla.fenix.R
|
import org.mozilla.fenix.R
|
||||||
|
import org.mozilla.fenix.components.toolbar.ToolbarPosition
|
||||||
import org.mozilla.fenix.ext.components
|
import org.mozilla.fenix.ext.components
|
||||||
import org.mozilla.fenix.ext.requireComponents
|
import org.mozilla.fenix.ext.requireComponents
|
||||||
import org.mozilla.fenix.ext.settings
|
import org.mozilla.fenix.ext.settings
|
||||||
|
@ -40,7 +47,7 @@ fun Settings.shouldShowSearchSuggestions(isPrivate: Boolean): Boolean {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SearchDialogFragment : AppCompatDialogFragment() {
|
class SearchDialogFragment : AppCompatDialogFragment(), UserInteractionHandler {
|
||||||
|
|
||||||
private lateinit var interactor: SearchDialogInteractor
|
private lateinit var interactor: SearchDialogInteractor
|
||||||
private lateinit var store: SearchDialogFragmentStore
|
private lateinit var store: SearchDialogFragmentStore
|
||||||
|
@ -52,6 +59,14 @@ class SearchDialogFragment : AppCompatDialogFragment() {
|
||||||
setStyle(STYLE_NO_TITLE, R.style.SearchDialogStyle)
|
setStyle(STYLE_NO_TITLE, R.style.SearchDialogStyle)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
|
||||||
|
return object : Dialog(requireContext(), this.theme) {
|
||||||
|
override fun onBackPressed() {
|
||||||
|
this@SearchDialogFragment.onBackPressed()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
override fun onCreateView(
|
override fun onCreateView(
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
container: ViewGroup?,
|
container: ViewGroup?,
|
||||||
|
@ -97,6 +112,27 @@ class SearchDialogFragment : AppCompatDialogFragment() {
|
||||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||||
super.onViewCreated(view, savedInstanceState)
|
super.onViewCreated(view, savedInstanceState)
|
||||||
|
|
||||||
|
if (view.context.settings().toolbarPosition == ToolbarPosition.BOTTOM) {
|
||||||
|
ConstraintSet().apply {
|
||||||
|
clone(search_wrapper)
|
||||||
|
|
||||||
|
clear(toolbar.id, TOP)
|
||||||
|
connect(toolbar.id, BOTTOM, PARENT_ID, BOTTOM)
|
||||||
|
|
||||||
|
clear(awesomeBar.id, TOP)
|
||||||
|
clear(awesomeBar.id, BOTTOM)
|
||||||
|
connect(awesomeBar.id, TOP, PARENT_ID, TOP)
|
||||||
|
connect(awesomeBar.id, BOTTOM, toolbar.id, TOP)
|
||||||
|
|
||||||
|
applyTo(search_wrapper)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
search_wrapper.setOnClickListener {
|
||||||
|
it.hideKeyboard()
|
||||||
|
dismissAllowingStateLoss()
|
||||||
|
}
|
||||||
|
|
||||||
consumeFrom(store) {
|
consumeFrom(store) {
|
||||||
awesomeBar?.visibility = if (it.query.isEmpty()) View.INVISIBLE else View.VISIBLE
|
awesomeBar?.visibility = if (it.query.isEmpty()) View.INVISIBLE else View.VISIBLE
|
||||||
toolbarView.update(it)
|
toolbarView.update(it)
|
||||||
|
@ -104,6 +140,13 @@ class SearchDialogFragment : AppCompatDialogFragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onBackPressed(): Boolean {
|
||||||
|
view?.hideKeyboard()
|
||||||
|
dismissAllowingStateLoss()
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
private fun setUpState(): SearchFragmentState {
|
private fun setUpState(): SearchFragmentState {
|
||||||
val activity = activity as HomeActivity
|
val activity = activity as HomeActivity
|
||||||
val settings = activity.settings()
|
val settings = activity.settings()
|
||||||
|
|
|
@ -2,10 +2,13 @@
|
||||||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
<!-- 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
|
- 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/. -->
|
- 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"
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:id="@+id/search_wrapper"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:fitsSystemWindows="true"
|
android:fitsSystemWindows="true"
|
||||||
|
android:background="?attr/scrimBackground"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
<mozilla.components.browser.toolbar.BrowserToolbar
|
<mozilla.components.browser.toolbar.BrowserToolbar
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
|
@ -25,29 +28,22 @@
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"/>
|
app:layout_constraintTop_toTopOf="parent"/>
|
||||||
<androidx.core.widget.NestedScrollView
|
<mozilla.components.browser.awesomebar.BrowserAwesomeBar
|
||||||
|
xmlns:mozac="http://schemas.android.com/apk/res-auto"
|
||||||
|
android:id="@+id/awesomeBar"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="0dp"
|
android:layout_height="0dp"
|
||||||
android:id="@+id/scrollView"
|
android:fadingEdge="horizontal"
|
||||||
android:background="?attr/scrimBackground"
|
android:fadingEdgeLength="40dp"
|
||||||
|
android:nestedScrollingEnabled="false"
|
||||||
|
android:requiresFadingEdge="vertical"
|
||||||
|
android:background="?attr/foundation"
|
||||||
|
android:visibility="invisible"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
app:layout_constraintTop_toBottomOf="@id/toolbar"
|
||||||
android:scrollbars="vertical">
|
mozac:awesomeBarChipBackgroundColor="@color/photonGreen50"
|
||||||
<mozilla.components.browser.awesomebar.BrowserAwesomeBar
|
mozac:awesomeBarDescriptionTextColor="?secondaryText"
|
||||||
xmlns:mozac="http://schemas.android.com/apk/res-auto"
|
mozac:awesomeBarTitleTextColor="?primaryText" />
|
||||||
android:id="@+id/awesomeBar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:fadingEdge="horizontal"
|
|
||||||
android:fadingEdgeLength="40dp"
|
|
||||||
android:nestedScrollingEnabled="false"
|
|
||||||
android:requiresFadingEdge="vertical"
|
|
||||||
android:background="?attr/foundation"
|
|
||||||
android:visibility="invisible"
|
|
||||||
mozac:awesomeBarChipBackgroundColor="@color/photonGreen50"
|
|
||||||
mozac:awesomeBarDescriptionTextColor="?secondaryText"
|
|
||||||
mozac:awesomeBarTitleTextColor="?primaryText" />
|
|
||||||
</androidx.core.widget.NestedScrollView>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
@ -171,8 +171,8 @@
|
||||||
<!-- Search Fragment -->
|
<!-- Search Fragment -->
|
||||||
<!-- Button in the search view that lets a user search by scanning a QR code -->
|
<!-- Button in the search view that lets a user search by scanning a QR code -->
|
||||||
<string name="search_scan_button">Skannaa</string>
|
<string name="search_scan_button">Skannaa</string>
|
||||||
<!-- Button in the search view that lets a user search by using a shortcut -->
|
<!-- Button in the search view that lets a user change their search engine -->
|
||||||
<string name="search_engines_shortcut_button">Hakukone</string>
|
<string name="search_engine_button">Hakukone</string>
|
||||||
<!-- Button in the search view when shortcuts are displayed that takes a user to the search engine settings -->
|
<!-- Button in the search view when shortcuts are displayed that takes a user to the search engine settings -->
|
||||||
<string name="search_shortcuts_engine_settings">Hakukoneasetukset</string>
|
<string name="search_shortcuts_engine_settings">Hakukoneasetukset</string>
|
||||||
<!-- Header displayed when selecting a shortcut search engine -->
|
<!-- Header displayed when selecting a shortcut search engine -->
|
||||||
|
@ -1471,9 +1471,7 @@
|
||||||
<string name="saved_login_duplicate">Kirjautumistieto tällä käyttäjänimellä on jo olemassa</string>
|
<string name="saved_login_duplicate">Kirjautumistieto tällä käyttäjänimellä on jo olemassa</string>
|
||||||
|
|
||||||
<!-- Synced Tabs -->
|
<!-- Synced Tabs -->
|
||||||
<!-- Text displayed when user is not logged into a Firefox Account -->
|
<!-- Text displayed to ask user to connect another device as no devices found with account -->
|
||||||
<string name="synced_tabs_connect_to_sync_account">Yhdistä Firefox-tilillä.</string>
|
|
||||||
<!-- Text displayed to ask user to connect another device as no devices found with account -->
|
|
||||||
<string name="synced_tabs_connect_another_device">Yhdistä toinen laite.</string>
|
<string name="synced_tabs_connect_another_device">Yhdistä toinen laite.</string>
|
||||||
<!-- Text displayed asking user to re-authenticate -->
|
<!-- Text displayed asking user to re-authenticate -->
|
||||||
<string name="synced_tabs_reauth">Tunnistaudu uudelleen.</string>
|
<string name="synced_tabs_reauth">Tunnistaudu uudelleen.</string>
|
||||||
|
@ -1494,13 +1492,4 @@
|
||||||
<!-- Confirmation dialog button text when top sites limit is reached. -->
|
<!-- Confirmation dialog button text when top sites limit is reached. -->
|
||||||
<string name="top_sites_max_limit_confirmation_button">Selvä</string>
|
<string name="top_sites_max_limit_confirmation_button">Selvä</string>
|
||||||
|
|
||||||
<!-- DEPRECATED STRINGS -->
|
|
||||||
<!-- Button in the search view that lets a user search by using a shortcut -->
|
|
||||||
<string name="search_shortcuts_button">Oikopolut</string>
|
|
||||||
<!-- DEPRECATED: Header displayed when selecting a shortcut search engine -->
|
|
||||||
<string name="search_shortcuts_search_with">Hae hakukoneella</string>
|
|
||||||
<!-- Header displayed when selecting a shortcut search engine -->
|
|
||||||
<string name="search_shortcuts_search_with_2">Tällä kertaa käytä hakuun:</string>
|
|
||||||
<!-- Preference title for switch preference to show search shortcuts -->
|
|
||||||
<string name="preferences_show_search_shortcuts">Näytä hakuoikopolut</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -1264,7 +1264,7 @@
|
||||||
<!-- Paste the text in the clipboard -->
|
<!-- Paste the text in the clipboard -->
|
||||||
<string name="browser_toolbar_long_press_popup_paste">붙여넣기</string>
|
<string name="browser_toolbar_long_press_popup_paste">붙여넣기</string>
|
||||||
<!-- Snackbar message shown after an URL has been copied to clipboard. -->
|
<!-- Snackbar message shown after an URL has been copied to clipboard. -->
|
||||||
<string name="browser_toolbar_url_copied_to_clipboard_snackbar">클립보드에 URL 복사됨</string>
|
<string name="browser_toolbar_url_copied_to_clipboard_snackbar">URL이 클립보드에 복사됨</string>
|
||||||
|
|
||||||
<!-- Title text for the Add To Homescreen dialog -->
|
<!-- Title text for the Add To Homescreen dialog -->
|
||||||
<string name="add_to_homescreen_title">홈 화면에 추가</string>
|
<string name="add_to_homescreen_title">홈 화면에 추가</string>
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
<!-- Browser menu button that opens a user's library -->
|
<!-- Browser menu button that opens a user's library -->
|
||||||
<string name="browser_menu_library">Bibliotecă</string>
|
<string name="browser_menu_library">Bibliotecă</string>
|
||||||
<!-- Browser menu toggle that requests a desktop site -->
|
<!-- Browser menu toggle that requests a desktop site -->
|
||||||
<string name="browser_menu_desktop_site">Versiune site pentru calculator</string>
|
<string name="browser_menu_desktop_site">Versiune site de desktop</string>
|
||||||
<!-- Browser menu toggle that adds a shortcut to the site on the device home screen. -->
|
<!-- Browser menu toggle that adds a shortcut to the site on the device home screen. -->
|
||||||
<string name="browser_menu_add_to_homescreen">Adaugă în ecranul de start</string>
|
<string name="browser_menu_add_to_homescreen">Adaugă în ecranul de start</string>
|
||||||
<!-- Browser menu toggle that installs a Progressive Web App shortcut to the site on the device home screen. -->
|
<!-- Browser menu toggle that installs a Progressive Web App shortcut to the site on the device home screen. -->
|
||||||
|
@ -167,8 +167,8 @@
|
||||||
<!-- Search Fragment -->
|
<!-- Search Fragment -->
|
||||||
<!-- Button in the search view that lets a user search by scanning a QR code -->
|
<!-- Button in the search view that lets a user search by scanning a QR code -->
|
||||||
<string name="search_scan_button">Scanează</string>
|
<string name="search_scan_button">Scanează</string>
|
||||||
<!-- Button in the search view that lets a user search by using a shortcut -->
|
<!-- Button in the search view that lets a user change their search engine -->
|
||||||
<string name="search_engines_shortcut_button">Motor de căutare</string>
|
<string name="search_engine_button">Motor de căutare</string>
|
||||||
<!-- Button in the search view when shortcuts are displayed that takes a user to the search engine settings -->
|
<!-- Button in the search view when shortcuts are displayed that takes a user to the search engine settings -->
|
||||||
<string name="search_shortcuts_engine_settings">Setări pentru motorul de căutare</string>
|
<string name="search_shortcuts_engine_settings">Setări pentru motorul de căutare</string>
|
||||||
<!-- Header displayed when selecting a shortcut search engine -->
|
<!-- Header displayed when selecting a shortcut search engine -->
|
||||||
|
@ -1451,9 +1451,7 @@
|
||||||
<string name="saved_login_duplicate">Există un set de date de autentificare cu acest nume de utilizator</string>
|
<string name="saved_login_duplicate">Există un set de date de autentificare cu acest nume de utilizator</string>
|
||||||
|
|
||||||
<!-- Synced Tabs -->
|
<!-- Synced Tabs -->
|
||||||
<!-- Text displayed when user is not logged into a Firefox Account -->
|
<!-- Text displayed to ask user to connect another device as no devices found with account -->
|
||||||
<string name="synced_tabs_connect_to_sync_account">Conectare cu un cont Firefox.</string>
|
|
||||||
<!-- Text displayed to ask user to connect another device as no devices found with account -->
|
|
||||||
<string name="synced_tabs_connect_another_device">Conectează alt dispozitiv.</string>
|
<string name="synced_tabs_connect_another_device">Conectează alt dispozitiv.</string>
|
||||||
<!-- Text displayed asking user to re-authenticate -->
|
<!-- Text displayed asking user to re-authenticate -->
|
||||||
<string name="synced_tabs_reauth">Te rugăm să te autentifici din nou.</string>
|
<string name="synced_tabs_reauth">Te rugăm să te autentifici din nou.</string>
|
||||||
|
@ -1474,13 +1472,4 @@
|
||||||
<!-- Confirmation dialog button text when top sites limit is reached. -->
|
<!-- Confirmation dialog button text when top sites limit is reached. -->
|
||||||
<string name="top_sites_max_limit_confirmation_button">Ok, am înțeles</string>
|
<string name="top_sites_max_limit_confirmation_button">Ok, am înțeles</string>
|
||||||
|
|
||||||
<!-- DEPRECATED STRINGS -->
|
|
||||||
<!-- Button in the search view that lets a user search by using a shortcut -->
|
|
||||||
<string name="search_shortcuts_button">Comenzi rapide</string>
|
|
||||||
<!-- DEPRECATED: Header displayed when selecting a shortcut search engine -->
|
|
||||||
<string name="search_shortcuts_search_with">Căutare cu</string>
|
|
||||||
<!-- Header displayed when selecting a shortcut search engine -->
|
|
||||||
<string name="search_shortcuts_search_with_2">De data aceasta, caută cu:</string>
|
|
||||||
<!-- Preference title for switch preference to show search shortcuts -->
|
|
||||||
<string name="preferences_show_search_shortcuts">Afișează comenzile rapide pentru căutări</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
<!-- Private mode shortcut "contextual feature recommendation" (CFR) -->
|
<!-- Private mode shortcut "contextual feature recommendation" (CFR) -->
|
||||||
<!-- Text for the main message -->
|
<!-- Text for the main message -->
|
||||||
<string name="cfr_message">Ana ekranınızdan gizli sekme açmak için bir kısayol ekleyin.</string>
|
<string name="cfr_message">Ana ekranınızdan gizli sekme açmak için kısayol ekleyebilirsiniz.</string>
|
||||||
<!-- Text for the positive button -->
|
<!-- Text for the positive button -->
|
||||||
<string name="cfr_pos_button_text">Kısayol ekle</string>
|
<string name="cfr_pos_button_text">Kısayol ekle</string>
|
||||||
<!-- Text for the negative button -->
|
<!-- Text for the negative button -->
|
||||||
|
|
|
@ -746,6 +746,13 @@
|
||||||
<!-- Text shown in snackbar when user closes all tabs -->
|
<!-- Text shown in snackbar when user closes all tabs -->
|
||||||
<string name="snackbar_tabs_closed">Varaqlar yopildi</string>
|
<string name="snackbar_tabs_closed">Varaqlar yopildi</string>
|
||||||
|
|
||||||
|
<!-- Tab collection deletion prompt dialog option to cancel deleting the collection -->
|
||||||
|
<string name="tab_collection_dialog_negative">Bekor qilish</string>
|
||||||
|
<!-- Text displayed in a notification when the user enters full screen mode -->
|
||||||
|
<string name="full_screen_notification">Toʻliq ekran rejimiga oʻtmoqda</string>
|
||||||
|
<!-- Message for copying the URL via long press on the toolbar -->
|
||||||
|
<string name="url_copied">Manzildan nusxa olindi</string>
|
||||||
|
|
||||||
<!-- Accessibility description text for a completed migration item -->
|
<!-- Accessibility description text for a completed migration item -->
|
||||||
<string name="migration_icon_description">Koʻchirish tugadi</string>
|
<string name="migration_icon_description">Koʻchirish tugadi</string>
|
||||||
<!--Text on list of migrated items (e.g. Settings, History, etc.)-->
|
<!--Text on list of migrated items (e.g. Settings, History, etc.)-->
|
||||||
|
|
|
@ -106,15 +106,26 @@ class ToolbarViewTest {
|
||||||
view.update(defaultState)
|
view.update(defaultState)
|
||||||
view.update(defaultState)
|
view.update(defaultState)
|
||||||
|
|
||||||
verify(exactly = 1) { toolbar.url = any() }
|
|
||||||
verify(exactly = 1) { toolbar.setSearchTerms(any()) }
|
verify(exactly = 1) { toolbar.setSearchTerms(any()) }
|
||||||
verify(exactly = 1) { interactor.onTextChanged(any()) }
|
|
||||||
// editMode gets called when the view is initialized. So it is called twice in this test
|
|
||||||
verify(exactly = 2) { toolbar.editMode() }
|
|
||||||
|
|
||||||
assertTrue(view.isInitialized)
|
assertTrue(view.isInitialized)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
fun `search term updates the url`() {
|
||||||
|
val view = buildToolbarView(false)
|
||||||
|
|
||||||
|
view.update(defaultState)
|
||||||
|
view.update(defaultState)
|
||||||
|
view.update(defaultState)
|
||||||
|
|
||||||
|
// editMode gets called when the view is initialized.
|
||||||
|
verify(exactly = 2) { toolbar.editMode() }
|
||||||
|
// search term changes update the url and invoke the interactor.
|
||||||
|
verify(exactly = 2) { toolbar.url = any() }
|
||||||
|
verify(exactly = 2) { interactor.onTextChanged(any()) }
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun `URL gets set to the states query`() {
|
fun `URL gets set to the states query`() {
|
||||||
val toolbarView = buildToolbarView(false)
|
val toolbarView = buildToolbarView(false)
|
||||||
|
|
|
@ -190,13 +190,13 @@ tasks.register("listRepositories") {
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("githubTestDetails", GithubDetailsTask) {
|
tasks.register("githubTestDetails", GithubDetailsTask) {
|
||||||
text = "### [Unit Test Results](/reports/test/testGeckoNightlyDebugUnitTest/index.html)"
|
text = "### [Unit Test Results]({reportsUrl}/test/testDebugUnitTest/index.html)"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
tasks.register("githubLintDetektDetails", GithubDetailsTask) {
|
||||||
text = "### [Detekt Results](/reports/detekt.html)"
|
text = "### [Detekt Results]({reportsUrl}/detekt.html)"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
tasks.register("githubLintAndroidDetails", GithubDetailsTask) {
|
||||||
text = "### [Android Lint Results](/reports/lint-results-geckoNightlyDebug.html)"
|
text = "### [Android Lint Results]({reportsUrl}/lint-results-geckoNightlyDebug.html)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
object AndroidComponents {
|
object AndroidComponents {
|
||||||
const val VERSION = "53.0.20200804130112"
|
const val VERSION = "54.0.20200807130552"
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,20 +26,11 @@ open class GithubDetailsTask : DefaultTask() {
|
||||||
private val detailsFile = File("/builds/worker/github/customCheckRunText.md")
|
private val detailsFile = File("/builds/worker/github/customCheckRunText.md")
|
||||||
private val suffix = "\n\n_(404 if compilation failed)_"
|
private val suffix = "\n\n_(404 if compilation failed)_"
|
||||||
|
|
||||||
/**
|
|
||||||
* Captures the link name and URL in a markdown link.
|
|
||||||
* i.e. "### [Hello](/world.html)" -> "/world.html"
|
|
||||||
*/
|
|
||||||
private val markdownLinkRegex = """\[(.*)]\((.*)\)""".toRegex()
|
|
||||||
|
|
||||||
@TaskAction
|
@TaskAction
|
||||||
fun writeFile() {
|
fun writeFile() {
|
||||||
val taskId = System.getenv("TASK_ID")
|
val taskId = System.getenv("TASK_ID")
|
||||||
val url = "https://firefoxci.taskcluster-artifacts.net/$taskId/0/public"
|
val reportsUrl = "https://firefoxci.taskcluster-artifacts.net/$taskId/0/public/reports"
|
||||||
val replaced = text.replace(markdownLinkRegex) { match ->
|
val replaced = text.replace("{reportsUrl}", reportsUrl)
|
||||||
val (_, linkName, linkUrl) = match.groupValues
|
|
||||||
"[$linkName](${url + linkUrl})"
|
|
||||||
}
|
|
||||||
|
|
||||||
project.mkdir("/builds/worker/github")
|
project.mkdir("/builds/worker/github")
|
||||||
detailsFile.writeText(replaced + suffix)
|
detailsFile.writeText(replaced + suffix)
|
||||||
|
|
Loading…
Reference in New Issue