Enable messaging framework in nightly

pull/543/head
Arturo Mejia 2 years ago committed by mergify[bot]
parent 61bffb6685
commit 120113abff

@ -113,6 +113,5 @@ object FeatureFlags {
/** /**
* Enables receiving from the messaging framework. * Enables receiving from the messaging framework.
*/ */
@Suppress("MayBeConst") val messagingFeature = Config.channel.isNightlyOrDebug
val messagingFeature = false
} }

@ -26,7 +26,7 @@ object CustomAttributeProvider {
val now = Calendar.getInstance() val now = Calendar.getInstance()
return JSONObject( return JSONObject(
mapOf( mapOf(
"is_default_browser" to BrowsersCache.all(context).isDefaultBrowser, "is_default_browser_string" to BrowsersCache.all(context).isDefaultBrowser.toString(),
"date_string" to formatter.format(now.time) "date_string" to formatter.format(now.time)
) )
) )

@ -14,13 +14,13 @@
android:id="@+id/title_text" android:id="@+id/title_text"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
tools:text="Title" tools:text="Title"
android:layout_marginBottom="10dp"
android:textAppearance="@style/Header16TextStyle" android:textAppearance="@style/Header16TextStyle"
app:layout_constraintBottom_toTopOf="@id/description_text"
app:layout_constraintEnd_toStartOf="@id/close"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintEnd_toStartOf="@id/close"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/description_text" />
<ImageButton <ImageButton
android:id="@+id/close" android:id="@+id/close"
@ -43,15 +43,15 @@
app:layout_constraintBottom_toTopOf="@id/message_button" app:layout_constraintBottom_toTopOf="@id/message_button"
app:layout_constraintEnd_toStartOf="@id/close" app:layout_constraintEnd_toStartOf="@id/close"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" /> app:layout_constraintTop_toTopOf="@id/title_text" />
<Button <Button
android:id="@+id/message_button" android:id="@+id/message_button"
style="@style/PositiveButton" style="@style/PositiveButton"
android:layout_height="36dp" android:layout_height="36dp"
android:background="@drawable/rounded_button_background" android:background="@drawable/rounded_button_background"
android:layout_marginTop="16dp"
android:text="@string/preferences_set_as_default_browser" android:text="@string/preferences_set_as_default_browser"
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/description_text" /> app:layout_constraintTop_toBottomOf="@id/description_text" />

@ -115,35 +115,37 @@ features:
defaults: defaults:
- value: - value:
triggers: triggers:
USER_RECENTLY_INSTALLED: days_since_install < 7 USER_RECENTLY_INSTALLED: days_since_install < 7
USER_RECENTLY_UPDATED: days_since_update < 7 && days_since_install != days_since_update USER_RECENTLY_UPDATED: days_since_update < 7 && days_since_install != days_since_update
USER_TIER_ONE_COUNTRY: ('US' in locale || 'GB' in locale || 'CA' in locale || 'DE' in locale || 'FR' in locale) USER_TIER_ONE_COUNTRY: ('US' in locale || 'GB' in locale || 'CA' in locale || 'DE' in locale || 'FR' in locale)
USER_EN_SPEAKER: "'en' in locale" USER_EN_SPEAKER: "'en' in locale"
USER_DE_SPEAKER: "'de' in locale" USER_DE_SPEAKER: "'de' in locale"
USER_FR_SPEAKER: "'fr' in locale" USER_FR_SPEAKER: "'fr' in locale"
DEVICE_ANDROID: os == 'Android' DEVICE_ANDROID: os == 'Android'
DEVICE_IOS: os == 'iOS' DEVICE_IOS: os == 'iOS'
ALWAYS: "true" ALWAYS: "true"
NEVER: "false" NEVER: "false"
I_AM_DEFAULT_BROWSER: "is_default_browser_string == 'true'"
I_AM_NOT_DEFAULT_BROWSER: "is_default_browser_string == 'false'"
actions: actions:
ENABLE_PRIVATE_BROWSING: ://enable_private_browsing ENABLE_PRIVATE_BROWSING: ://enable_private_browsing
INSTALL_SEARCH_WIDGET: ://install_search_widget INSTALL_SEARCH_WIDGET: ://install_search_widget
MAKE_DEFAULT_BROWSER: ://make_default_browser MAKE_DEFAULT_BROWSER: ://make_default_browser
VIEW_BOOKMARKS: ://urls_bookmarks VIEW_BOOKMARKS: ://urls_bookmarks
VIEW_COLLECTIONS: ://home_collections VIEW_COLLECTIONS: ://home_collections
VIEW_HISTORY: ://urls_history VIEW_HISTORY: ://urls_history
VIEW_HOMESCREEN: ://home VIEW_HOMESCREEN: ://home
OPEN_SETTINGS_ACCESSIBILITY: ://settings_accessibility OPEN_SETTINGS_ACCESSIBILITY: ://settings_accessibility
OPEN_SETTINGS_ADDON_MANAGER: ://settings_addon_manager OPEN_SETTINGS_ADDON_MANAGER: ://settings_addon_manager
OPEN_SETTINGS_DELETE_BROWSING_DATA: ://settings_delete_browsing_data OPEN_SETTINGS_DELETE_BROWSING_DATA: ://settings_delete_browsing_data
OPEN_SETTINGS_LOGINS: ://settings_logins OPEN_SETTINGS_LOGINS: ://settings_logins
OPEN_SETTINGS_NOTIFICATIONS: ://settings_notifications OPEN_SETTINGS_NOTIFICATIONS: ://settings_notifications
OPEN_SETTINGS_PRIVACY: ://settings_privacy OPEN_SETTINGS_PRIVACY: ://settings_privacy
OPEN_SETTINGS_SEARCH_ENGINE: ://settings_search_engine OPEN_SETTINGS_SEARCH_ENGINE: ://settings_search_engine
OPEN_SETTINGS_TRACKING_PROTECTION: ://settings_tracking_protection OPEN_SETTINGS_TRACKING_PROTECTION: ://settings_tracking_protection
OPEN_SETTINGS_WALLPAPERS: ://settings_wallpapers OPEN_SETTINGS_WALLPAPERS: ://settings_wallpapers
OPEN_SETTINGS: ://settings OPEN_SETTINGS: ://settings
TURN_ON_SYNC: ://turn_on_sync TURN_ON_SYNC: ://turn_on_sync
styles: styles:
DEFAULT: DEFAULT:
priority: 50 priority: 50
@ -167,61 +169,15 @@ features:
EXPIRES_QUICKLY: EXPIRES_QUICKLY:
priority: 100 priority: 100
max-display-count: 1 max-display-count: 1
- channel: developer - channel: nightly
value: { value:
"messages": { messages:
"my-viewpoint-survey": { default-browser:
"title": "Message tile", text: default_browser_experiment_card_text
"text": "Love Firefox? Fill in our survey!", action: "MAKE_DEFAULT_BROWSER"
"action": "https://surveyprovider.com/survey-id/{uuid}", trigger: [ "I_AM_NOT_DEFAULT_BROWSER" ]
"trigger": [ "ALWAYS" ], style: "DEFAULT"
"style": "DEFAULT", button-label: preferences_set_as_default_browser
"button-label": "Go to the survey"
}
}
}
- channel: developer
value: {
"messages": {
"private-tabs-auto-close": {
"action": "OPEN_SETTINGS",
"text": "Sharing your phone? Autoclosing private tabs is for you!",
"trigger": [
"USER_RECENTLY_INSTALLED"
]
}
},
"message-under-experiment": "private-tabs-auto-close"
}
- channel: developer
value: {
"triggers": {
"USER_IE_COUNTRY": "'IE' in locale"
},
"styles": {
"irish-green": {
"priority": 50
}
},
"messages": {
"eu-tracking-protection-for-ireland": {
"action": "OPEN_SETTINGS",
"text": "GDPR has you covered. Firefox has GDPR covered",
"style": "irish-green",
"trigger": [
"NEW_USER",
"USER_IE_COUNTRY"
]
}
},
"message-under-experiment": "eu-tracking-protection-for-"
}
types: types:
objects: objects:

Loading…
Cancel
Save