Commit graph

353 commits

Author SHA1 Message Date
github-actions
fcef453f37 Import translations from android-l10n 2023-07-20 00:29:36 +00:00
github-actions
d1ade53631 Import translations from android-l10n 2023-07-19 00:41:23 +00:00
github-actions
f5a732b737 Import translations from android-l10n 2023-07-15 20:52:30 -04:00
github-actions
5ad818a6ce Import translations from android-l10n 2023-07-14 01:00:05 +00:00
Arturo Mejia
8b238ff494 Reverts "Bug 1815637 - Add rtl support." 2023-07-13 17:55:12 +00:00
github-actions
dbc1275f05 Import translations from android-l10n 2023-07-13 10:54:37 +00:00
github-actions
4bf12d49b4 Import translations from android-l10n 2023-07-11 01:33:46 +00:00
Gabriel Luong
573533651e Bug 1840210 - Rename mozac_ic_share to mozac_ic_share_android_24 2023-07-10 22:15:49 +00:00
Gabriel Luong
664bbcf3df Bug 1840210 - Rename mozac_ic_menu to mozac_ic_ellipsis_vertical_24 2023-07-10 22:15:49 +00:00
Gabriel Luong
466374bbc3 Bug 1840210 - Rename mozac_ic_extensions to mozac_ic_extension_24 2023-07-10 22:15:49 +00:00
Gabriel Luong
4d231b86f3 Bug 1840210 - Rename mozac_ic_back to mozac_ic_back_24 2023-07-10 22:15:49 +00:00
Gabriel Luong
d9f9642a26 Bug 1840210 - Rename mozac_ic_arrowhead_right to mozac_ic_chevron_right_24 2023-07-10 22:15:49 +00:00
github-actions
991f223d3b Import translations from android-l10n 2023-07-10 00:43:00 +00:00
github-actions
7510931f3b Import translations from android-l10n 2023-07-09 00:30:37 +00:00
github-actions
087549bfb4 Import translations from android-l10n 2023-07-08 00:33:58 +00:00
github-actions
3df3c5720d Import translations from android-l10n 2023-07-07 00:48:24 +00:00
github-actions
671c33c1b3 Import translations from android-l10n 2023-07-04 00:29:41 +00:00
github-actions
b075347c86 Import translations from android-l10n 2023-07-03 00:36:46 +00:00
github-actions
b9d9907851 Import translations from android-l10n 2023-07-01 00:50:12 +00:00
github-actions
040f943525 Import translations from android-l10n 2023-06-30 00:32:23 +00:00
github-actions
4393f494b1 Import translations from android-l10n 2023-06-29 00:46:50 +00:00
github-actions
9072fc05c7 Import translations from android-l10n 2023-06-28 00:35:06 +00:00
github-actions
57ab607eeb Import translations from android-l10n 2023-06-27 00:28:30 +00:00
gitstart
b4fe5f0964 Bug 1821210 - Added content description on Back button to say Navigate up button 2023-06-26 12:07:02 +00:00
rahulsainani
8de6355e70 Bug 1837961 - Part 2:Replace usages of ifChanged to distinctUntilChanged 2023-06-21 09:27:58 +00:00
mike a
0f6ee09218 Bug 1815637 - Add rtl support 2023-05-09 18:41:08 +00:00
Sergey Zolotarev
cf822d8a6c Bug 1812825 - Fix overlapping text in BrowserMenuImageTextCheckboxButton
Constrain the start of the checkbox element to the end of button text so that
they don't overlap and the menu item expands together with the checkbox.

Fixes https://github.com/mozilla-mobile/fenix/issues/22509
2023-05-05 16:06:13 +00:00
github-actions
7064e4b466 Import translations from android-l10n 2023-04-23 00:31:30 +00:00
Geoff Brown
4b36c91e06 Bug 1825116 - Add license notice where missing (https://github.com/mozilla-mobile/firefox-android/pull/1637)
* Bug 1825116 - Add license notice where missing

* Bug 1825116 - Revert changes to strings.xml

* Bug 1825116 - Restore ic_cc*.xml
2023-04-19 21:08:15 +00:00
Geoff Brown
6561b2de2b Bug 1825116 - Resolve many black, isort, and file-whitespace lint issues 2023-04-12 14:04:29 +00:00
mcarare
278fa80cc2 Bug 1824717 - Remove unnecessary AndroidJUnit4 runner. 2023-04-05 12:44:13 +00:00
github-actions
13f166ef5e Import translations from android-l10n 2023-03-23 00:37:01 +00:00
github-actions
f5ca4d2c8c Import translations from android-l10n 2023-03-09 00:54:00 +00:00
Ryan VanderMeulen
0e5e70291c Bug 1820233 - Remove unneeded kotlin_stdlib inclusions and re-enable Werror in detekt build.gradle 2023-03-07 00:12:18 +00:00
mcarare
1f589a2e0b Bug 1802817 - Set namespace via DSL in gradle build files.
See https://developer.android.com/studio/build/configure-app-module#set-namespace
and https://issuetracker.google.com/issues/172361895
2023-03-02 17:13:09 +00:00
mcarare
922b5f6643 Bug 1802817 - Rename AC Dependencies to ComponentsDependencies.
This change is needed in order to avoid clashes with Dependencies class introduced
in Gradle from 7.6 version.
2023-03-02 17:13:09 +00:00
Mozilla L10n Automation Bot
44067eb38a Import l10n. 2023-01-22 22:27:02 +00:00
Mozilla L10n Automation Bot
cc6b07fe24 Import l10n. 2023-01-20 00:45:37 +00:00
Mozilla L10n Automation Bot
130360184d Import l10n. 2022-12-27 01:01:49 +00:00
Mozilla L10n Automation Bot
eb88d37e79 Import l10n. 2022-12-23 17:38:00 +00:00
DreVla
80fdbe3cc4 Bug 1800885 - Increased browser menu Add/Edit checkbox touch target
Increased touch target of the Add/Edit checkbox
to improve accessibility
2022-11-21 20:44:22 +00:00
Christian Sadilek
4091b14a33 Fix android lint in composite builds 2022-11-21 13:40:53 -05:00
Alexander Gramiak
bcc43f0530 Bug 1799230 - Use Non-Transitive R Classes
According to Android documentation: "This leads to faster builds and
the corresponding benefits of compilation avoidance."
2022-11-17 18:23:01 +00:00
Mihai Adrian Carare
e087b524a6 Bug 1796353 - Build with compileSdkVersion for Android 13 / API 33. (https://github.com/mozilla-mobile/firefox-android/pull/62)
* Bug 1796353 - Build with compileSdkVersion for Android 13 / API 33.

* Bug 1796353 - Update method signature for View.AccessibilityDelegate.

* Bug 1796353 - Handle AccessibilityNodeInfo.CollectionInfo.obtain deprecation.

* Bug 1796353 - Update method signature for View.OnAttachStateChangeListener.

* Bug 1796353 - Handle getParcelableExtra(String) deprecation.

* Bug 1796353 - Handle getParcelable(String) deprecation.

* Bug 1796353 - Handle getParcelableArrayListExtra(String) deprecation.

* Bug 1796353 - Move URLStringUtils to ktx package.

This is needed to avoid circular dependencies for some needed changes.

* Bug 1796353 - Suppress deprecation for get(String).

* Bug 1796353 - Replace removed method setAppCacheEnabled.

* Bug 1796353 - Handle PackageManager methods deprecations.

* Bug 1796353 - Handle getSerializable(String) deprecation.

* Bug 1796353 - Handle stopForeground deprecation.

* Bug 1796353 - Update method signature for GestureDetector.SimpleOnGestureListener.

* Bug 1796353 - Handle AccessibilityEvent.obtain deprecation.

* Bug 1796353 - Handle getParcelableArrayList(String) deprecation.

* Bug 1796353 - Handle getParcelableArray(String) deprecation.

* Bug 1796353 - Handle getSerializableExtra(String) deprecation.

* Bug 1796353 - Handle readParcelable(classLoader) deprecation.

* Bug 1796353 - Handle FillResponse.Builder setAuthentication deprecation.

* Bug 1796353 - Handle Dataset.Builder setValue deprecation.

* Bug 1796353 - Suppress get(String) deprecation.

We still need to use this method because we do not know the type beforehand.

* Bug 1796353 - Handle onBackPressed() deprecation.

* Bug 1796353 - Suppress queryBroadcastReceivers deprecation.

* Bug 1796353 - Suppress package manager methods deprecation.

* Bug 1796353 - Catch and report exceptions when handling touch event detection.

* Bug 1796353 - Suppress deprecation for getPackageInfo used in tests with SDK 28.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2022-11-16 00:35:40 -05:00
Gabriel Luong
d9d783b698 [components] Issue https://github.com/mozilla-mobile/android-components/issues/12939: Address all ktlint issues 2022-10-17 17:07:40 -04:00
Mozilla L10n Automation Bot
1b14baec2a [components] Import l10n. 2022-09-08 00:20:22 +00:00
mcarare
6b1a2d5dcb [components] For https://github.com/mozilla-mobile/android-components/issues/12381: Replace VisibleForTesting with @get:VisibleForTesting. 2022-08-31 09:47:47 +00:00
mcarare
97ae5efa57 [components] For https://github.com/mozilla-mobile/android-components/issues/12381: Remove VisibleForTesting annotation.
Values are also accessed from code, not just from tests.
2022-08-31 09:47:47 +00:00
Mozilla L10n Automation Bot
a5b627775a [components] Import l10n. 2022-08-30 00:23:46 +00:00
Mozilla L10n Automation Bot
ef2b1975c5 [components] Import l10n. 2022-08-28 01:12:33 +00:00
Mozilla L10n Automation Bot
8b96068192 [components] Import l10n. 2022-08-04 00:21:34 +00:00
Mozilla L10n Automation Bot
b957002826 [components] Import l10n. 2022-06-29 00:26:15 +00:00
Mozilla L10n Automation Bot
df86e312d0 [components] Import l10n. 2022-05-24 00:25:19 +00:00
Mugurell
d78b06b6bf [components] For https://github.com/mozilla-mobile/android-components/pull/11175 - Migrate runBlocking and runBlockingTest to runTest in unit tests
Used `runTestOnMain` where `MainCoroutineRule` was used or needed to be used,
`runTest` elsewhere.

Extra effort for removing all `runBlocking` occurrences in unit tests.
`kotlinx.coroutines.test.runTest` is a test specific API that seems like a more
appropriate way for running tests in a coroutine than the general
`kotlinx.coroutines.runBlocking` api.
2022-05-10 13:45:03 +00:00
Mugurell
2963708053 [components] For https://github.com/mozilla-mobile/android-components/issues/11755 - Replace TestCoroutineDispatcher with UnconfinedTestDispatcher
- Refactor out all usages of TestCoroutineDispatcher and TestCoroutineScope
- Refactor MainCoroutineRule to now use UnconfinedTestDispatcher by default.
This dispatcher will eagerly enter all launch or async blocks being more suited
to our codebase.
2022-05-10 13:45:03 +00:00
Mozilla L10n Automation Bot
97655be19c [components] Import l10n. 2022-05-07 00:25:54 +00:00
Mozilla L10n Automation Bot
a04407ea38 [components] Import l10n. 2022-05-06 00:18:19 +00:00
Mugurell
f91cb8abe1 [components] For https://github.com/mozilla-mobile/android-components/issues/11753 - Update compose to 1.1.1 and Kotlin to 1.6.10
This also required updating room to >= 2.4.0.
This new version adds a deprecation of the `MigrationTestHelper` api used in
`LoginExceptionStorageTest` that is to be later fixed in https://github.com/mozilla-mobile/android-components/issues/11765.

`activity_compose` was also update to the latest stable version to ensure a
better match with the latest stable version for compose.

Used 1.6.10 for Kotlin although 1.6.20 is available to prevent any issues with
Compose 1.1.1 reported as an error at compile time:
"e: This version (1.1.1) of the Compose Compiler requires Kotlin version 1.6.10
but you appear to be using Kotlin version 1.6.20 which is not known to be
compatible.  Please fix your configuration (or
`suppressKotlinVersionCompatibilityCheck` but don't say I didn't warn you!)."
2022-04-18 17:28:25 +00:00
Mozilla L10n Automation Bot
e009629e17 [components] Import l10n. 2022-03-12 00:21:49 +00:00
Mugurell
f04e8b683c [components] Revert "For https://github.com/mozilla-mobile/android-components/issues/11753 - Update compose to 1.1.0 and Kotlin to 1.6.10"
This reverts commit 3feac3db3901ef73efcd0e14c04b47cbdab2e7ff.
2022-02-28 22:27:21 +00:00
Mugurell
97b77729c7 [components] For https://github.com/mozilla-mobile/android-components/issues/11753 - Update compose to 1.1.0 and Kotlin to 1.6.10
This also required updating room to >= 2.4.0.
This new version adds a deprecation of the `MigrationTestHelper` api used in
`LoginExceptionStorageTest` that is to be later fixed in https://github.com/mozilla-mobile/android-components/issues/11765.

activity_compose was also update to the latest stable version to ensure a
better match with the latest stable version for compose.
2022-02-24 10:12:43 +00:00
Mozilla L10n Automation Bot
61700d4de2 [components] Import l10n. 2022-02-12 00:25:46 +00:00
Mozilla L10n Automation Bot
12afbcd07d [components] Import l10n. 2021-12-22 00:25:35 +00:00
mcarare
dc3a2b1791 [components] For https://github.com/mozilla-mobile/android-components/issues/11186: Add optional backgroundColorResource to BrowserMenuCategory. 2021-10-28 21:50:36 +00:00
Sebastian Kaspari
90ec41fc3a [components] Update Kotlin and Jetpack Compose versions. 2021-10-25 10:58:07 +00:00
Mugurell
d14dc4d46e [components] For https://github.com/mozilla-mobile/android-components/issues/10990 - Assert on color resource value not on a hardcoded one 2021-09-16 20:55:02 +00:00
Mozilla L10n Automation Bot
89e858047c [components] Import l10n. 2021-09-12 00:22:14 +00:00
mcarare
ac152315ae [components] For https://github.com/mozilla-mobile/android-components/issues/10905: Add a Two State BrowserMenuImageText menu item. 2021-09-01 08:51:17 +00:00
Mozilla L10n Automation Bot
0c51979722 [components] Import l10n. 2021-08-22 00:20:53 +00:00
Mozilla L10n Automation Bot
5f47d86a46 [components] Import l10n. 2021-08-13 00:23:45 +00:00
Mozilla L10n Automation Bot
b74636142b [components] Import l10n. 2021-08-10 00:19:37 +00:00
Mozilla L10n Automation Bot
8e637deda7 [components] Import l10n. 2021-08-04 00:25:18 +00:00
Sebastian Kaspari
ce323400dd [components] Run ktlintFormat to fix new ktlint errors. 2021-07-28 12:03:23 +00:00
Michael Comella
06e80c6e10 [components] For https://github.com/mozilla-mobile/android-components/issues/10604: remove remaining unused imports automatically.
This commit was automatically generated with:
```sh
./gradlew ktlint --args="-F"
```
2021-07-27 19:39:04 +00:00
Michael Comella
9f3e6f1a1b [components] For https://github.com/mozilla-mobile/android-components/issues/10604: reuse new TestCoroutineDispatcher in additional tests.
These follow a few more simple patterns I was able to find:
- the testDispatcher is not used anywhere else: remove it
- the testDispatcher is used to set a main dispatcher: this is redundant
to the test rule so remove it both the dispatcher & the main dispatcher
- the testDispatcher is actually used elsewhere: for simplicity, change
the reference to point at the MainCoroutineRule.
2021-07-27 19:39:04 +00:00
Stefan Arentz
a719bbf6ce [components] For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master branch to main (https://github.com/mozilla-mobile/android-components/pull/10647)
* For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master to main (GitHub Workflows)

* For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master to main (Pull Request Template)

* For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master to main (README)

* For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master to main (l10n.toml)

* For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master to main (GitHubPlugin.kt)

* For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master to main (Documentation & Comments)

* For https://github.com/mozilla-mobile/android-components/issues/10137 - Rename master to main (TaskCluster)
2021-07-21 09:59:30 -04:00
Sebastian Kaspari
28a76101be [components] Update Kotlin to 1.5.10 (and Coroutines to 1.5.0 and Room to 2.3.0). 2021-07-19 09:32:44 +00:00
Ionut Cristian Bedregeanu
60aa8bcb57 [components] Send the mutable list of menu items as parameter 2021-07-09 07:42:38 +00:00
Ionut Cristian Bedregeanu
266499b6f2 [components] For https://github.com/mozilla-mobile/android-components/issues/10559 - Adds showAddonsInMenu in WebExtensionBrowserMenuBuilder
Adds `showAddonsInMenu` in WebExtensionBrowserMenuBuilder to allow the option of removing `Add-ons`
item even if another extensions are displayed
Add unit tests to test if 'Add-ons' item visibility is updated properly
2021-07-09 07:42:38 +00:00
codrut.topliceanu
ac072ce9b3 [components] For https://github.com/mozilla-mobile/android-components/issues/10537 - Applies tint to imageView instead of drawable
`Drawable.setTint` did not correctly apply the tint received from Fenix. Switching to `imageView.setTintResource` fixes the issue.
2021-07-01 13:53:54 +00:00
mcarare
636adaf2a9 [components] For https://github.com/mozilla-mobile/android-components/issues/10404: Remove deprecated kotlin-android-extensions plugin
(cherry picked from commit d99621583ceb11e7d91ebe284e40aec145793e48)
2021-06-15 08:32:26 +00:00
Christian Sadilek
4dfb6d92c1 [components] Revert "For https://github.com/mozilla-mobile/android-components/issues/10404: Remove deprecated kotlin-android-extensions plugin"
This reverts commit d99621583ceb11e7d91ebe284e40aec145793e48.
2021-06-14 18:09:24 +00:00
mcarare
17c2336fde [components] For https://github.com/mozilla-mobile/android-components/issues/10404: Remove deprecated kotlin-android-extensions plugin 2021-06-14 10:05:57 +00:00
Mozilla L10n Automation Bot
a8fdec01fe [components] Import l10n. 2021-06-14 00:15:29 +00:00
Sebastian Kaspari
98ab7b1b5f [components] Fix or suppress warnings from new detekt version. 2021-05-25 15:22:17 +00:00
Mozilla L10n Automation Bot
d218d523cc [components] Import l10n. 2021-05-21 00:21:02 +00:00
mcarare
bb1b016292 [components] For https://github.com/mozilla-mobile/android-components/issues/10092: Allow placeholder item to change tint for the extension icon. 2021-05-18 14:08:24 +00:00
Mozilla L10n Automation Bot
cc491ecdc9 [components] Import l10n. 2021-05-12 00:20:05 +00:00
Arturo Mejia
3cfebb6c94 [components] Second batch of new proton icons 2021-05-06 02:01:35 +00:00
Mugurell
d7362ffc39 [components] For https://github.com/mozilla-mobile/android-components/issues/10133 - BrowserMenuCompoundButton now reports the right dimensions
A BrowserMenuCompoundButton setup with compound drawables and used in our
BrowserMenu configured with a DynamicWidthRecyclerVIew will return a width
smaller with the size + padding of the compound drawables.

By replacing the default `inherit` layout direction for the initial onMeasure
we ensure the menu will also count the bounds of the compound drawables.
2021-04-27 16:17:25 +00:00
Mugurell
059a2e61d3 [components] For https://github.com/mozilla-mobile/android-components/issues/10108 - Reconcile list and adapter positions in ExpandableLayout (https://github.com/mozilla-mobile/android-components/pull/10111)
ExpandableLayout uses adapter based indexes to identify children.
In dynamic menus with list items being hidden this could lead to invalid
calculations and even to exceptions for indexes bigger that the then current
children count in the list.

To reconcile this we'll calculate a valid lastVisibleItemIndexWhenCollapsed and
stickyItemIndex to be used before the operations in calculateCollapsedHeight().

Because the code is now clearly tightly coupled to RecyclerView this patch also
refactors a previous general ViewGroup type to RecyclerView and because of this
part of the previous tests needed some adjustments.

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-04-19 20:27:56 +00:00
Arturo Mejia
6c73a4e435 [components] Closes https://github.com/mozilla-mobile/android-components/issues/10091 Added style property to WebExtensionBrowserMenuBuilder's constructor 2021-04-19 16:12:10 +00:00
Mozilla L10n Automation Bot
374642dc42 [components] Import l10n. 2021-04-18 00:21:12 +00:00
Mugurell
e3d829ec56 [components] Cleanup - Don't count item padding in ExpandableLayout
ExpandableLayout needs to iterate through all items until the one set as the
limit of the collapsible menu and accumulate the distance.
It adds the items height and margins but also erroneously the padding.

Stop counting the padding if height is counted. Height contains any vertical
padding set.
2021-04-14 16:29:28 +00:00
Mugurell
498195b57a [components] For https://github.com/mozilla-mobile/android-components/issues/9932 - Make ExpandableLayout aware of the sticky footer item index
If the menu starts as collapsed and it has a sticky footer set the bottom item
until which the menu should be collapsed must be shown on top of the sticky
item's view.
As an edgecase, if the same item is the limit of the collapsed menu and also
the sticky footer that will be the last item shown in the collapsed menu but
will be shown with full height.
2021-04-14 16:29:28 +00:00
Mugurell
980305e518 [components] For https://github.com/mozilla-mobile/android-components/issues/9932 - BrowserMenuAdapter is now a StickyItems Adapter
The most important new responsibilities are to update the view of the sticky
item.

BrowserMenu's background is only set on the parent's layout so the Adapter will
have to set that same background to the sticky item's view such that other
items scrolling underneath it will be totally obscured.

Because the menu's background can be set in multiple ways (by setting a value
for mozac_browser_menu_background / by passing a MenuStyle or like in Fenix
having a default theme for all "above" views) BrowserMenu will offer a new
backgroundColor property that as the single source of truth for this which can
then be used by the Adapter.
2021-04-14 16:29:28 +00:00
Mugurell
b627db9a9c [components] For https://github.com/mozilla-mobile/android-components/issues/9932 - Add isSticky support to most of the menu items
Most of the menu items should support this new property and allow AC clients to
configure the menus such that a specific menu item will not be scrolled
off-screen but rather anchored to the top/bottom of the menu following where
the menu is anchored.
2021-04-14 16:29:28 +00:00
Mugurell
475b34fd2b [components] For https://github.com/mozilla-mobile/android-components/issues/9932 - New LayoutManager with support for sticky header / footer
Vertical LinearLayoutManager configured with StickyItemPlacement such that:
- if StickyItemPlacement.TOP the sticky item will not be scrolled upwards
off-screen
- if StickyItemPlacement.TOP the sticky item will not be scrolled downwards
off-screen
2021-04-14 16:29:28 +00:00
mcarare
4c8cca7393 [components] For https://github.com/mozilla-mobile/android-components/issues/10037: Adjust BrowserMenuImageTextCheckboxButton item to fit UX specs. 2021-04-12 07:25:16 +00:00
Mugurell
7155b649c8 [components] For https://github.com/mozilla-mobile/android-components/issues/10032 - Handle menu touches in expandable menu on Samsung devices
Refactored the code so that touches/scrolls are still swallowed while the
menu is expanding after which ExpandableLayout should let all MotionEvents
pass through to be handled by menu items children.
2021-04-12 04:43:07 +00:00