1
0
mirror of https://github.com/element-hq/element-x-android.git synced 2026-10-23 18:49:00 +03:00

56 Commits

Author SHA1 Message Date
Benoit Marty
14710599a7 Announce the swipe gesture on the account avatar
Display a banner on the room list when 2 or more accounts are logged in, to let the user know
that they can swipe their avatar to switch account. The banner is stored as a new
Announcement.SwipeAvatarToSwitchAccount, and is dismissed when the user taps on it, or when
the user switches account by swiping their avatar.

The banner is displayed at the same place as the new notification sound banner, but never
at the same time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 11:44:44 +02:00
Benoit Marty
b1f4178100 Replace AppMigration11 by a dismissal when entering the login flow
AppMigration11 was run once, in the first release containing it, whatever
the state of the MultiAccount feature flag. Users installing the app
while the feature flag was disabled were considered as new users and
would never see the announcement once the feature flag got enabled.

The multi-account announcement is now pending by default (NeverShown),
and is marked as shown when the user enters the login flow while the
feature is enabled, either for the first time or to add another account.
Users who were already logged in before the feature became available
will see the announcement.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 10:30:21 +02:00
Benoit Marty
72f4c4f897 Fix multi-account announcement never being displayed 2026-10-06 09:41:53 +02:00
Benoit Marty
c654bf0947 Announce multi-account support
Show a one-time bottom sheet on the home screen to announce that several
accounts can now be added (element-hq/element-meta#3349).

- Add `Announcement.MultiAccount`, which is never shown by default.
- AppMigration11 queues the announcement on application upgrade only,
  and marks it as shown if the user already has several accounts.
- HomePresenter shows the bottom sheet only when the announcement is
  pending, the MultiAccount feature flag is enabled and the user has a
  single account.
- The "Add account" button hides the sheet, marks the announcement as
  dismissed and starts the add account flow through the new
  `HomeEntryPoint.Callback.navigateToAddAccount()`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-06 09:05:28 +02:00
Benoit Marty
1ac63ebec5 Icon in BigIcon have a iconPrimary color according to Figma. 2026-09-30 15:44:12 +02:00
hayaksi1
03c330ee07 Rename PreviewParameterProvider subclasses to the PreviewParam suffix
The `Provider` suffix reads as a dependency provider rather than as preview
data, and it collides with the real providers in the codebase — `StringProvider`,
`PickerProvider`, the login feature's `AccountProvider` — so the name says
nothing about which of the two a class is. `PreviewParam` says it.

195 classes are renamed, along with the 185 files named after them, the konsist
rule that enforces the convention, the presentation-class file templates and the
onboarding documentation.

This cannot be split. `Konsist.scopeFromProduction()` scans the whole project, so
flipping the assertion before every class has moved leaves the rule red, and a
rule that accepted either suffix during a transition would be exactly the kind of
compatibility layer this convention change is meant to remove.

Two judgement calls in the rule itself. The `name.endsWith("PreviewProvider")`
exclusion is dropped: its only job was to reject a redundant `Preview` before
`Provider`, and the new suffix already contains it; no class currently ends with
`PreviewProvider`, so removing it changes nothing today. And
`EditableAvatarViewUriProvider` is renamed rather than deleted from the exclusion
list even though no such class exists in this repository, since it presumably
comes from the modules overlaid for the enterprise build.

Nothing keyed off the old suffix: no snapshot filename contains a provider class
name, so no Paparazzi image changes, and the Kover variants match on `*Presenter`,
`*State` and `*ViewKt`, so coverage bounds are unaffected.
2026-08-17 17:40:33 +03:00
Benoit Marty
f35546b473 Change text style of VisualList.
Ref: https://www.figma.com/design/G1xy0HDZKJf5TCRFmKb5d5/Compound-Android-Components?node-id=2001-140
2026-07-02 14:57:11 +02:00
Benoit Marty
d8b1a41f56 Create dedicated package for visual list and add Figma link. 2026-07-02 14:45:22 +02:00
Benoit Marty
c430877d87 Ensure Robolectric test are run using API 36 until the library support API 37. 2026-06-18 12:18:32 +02:00
Benoit Marty
c88edc9621 Notification settings: pick custom sounds for messages and call ringtones (#6897)
* Notification settings: pick custom sounds for messages and call ringtones (#6702)

* Feature: add notification sound settings for messages and calls

* Add sound not available banner, accessibility checks

* Fix build and Konsist convention violations

- libraries:preferences:api now uses io.element.android-compose-library
  so NotificationSound's @Immutable annotation can resolve, matching the
  pattern in libraries:matrix:api.
- Rename SoundUnavailableBannerStateProvider to
  NotificationSoundUnavailableStateProvider so the class name contains
  the parameter type as required by KonsistClassNameTest.

* Suppress LargeClass on RoomListPresenterTest

The three new sound-unavailable tests pushed the class past Detekt's
default LargeClass threshold. Matches the suppression pattern already
used on five presenter test classes under features/messages/impl/test.

* NotificationSettingsView: guard ringtone-picker launchers in inspection mode

rememberLauncherForActivityResult requires a LocalActivityResultRegistryOwner,
which Paparazzi-driven preview snapshot tests don't provide, causing
NotificationSettingsViewPreview to throw IllegalStateException for every
preview parameter. Extract the click handlers into a helper that returns a
no-op when LocalInspectionMode.current is true; the runtime path is unchanged.

* Handle unresolved notification sounds mid session

* Quality checks, refactor mid session error ui

* Suppress detekt LargeClass on NotificationSettingsPresenterTest

* Remove notification sound resilience layer, replace with file copy

* Reselect element sound option, code cleanup

* Add element fade notification sound option

* Fix new file headers

* Revert to flowOf(Unit) for announcement service

* Add ringtone picker dialog to match message selector

* Update strings in conjunction with ios

* Update test to reflect new string

* Sync strings.

* Update screenshots

* Fix test

* Remove not properly located translations.
This will be fixed in the next String sync.

* Fix test on CI

---------

Co-authored-by: Jenna Vassar <jenna.vassar@toptal.com>
Co-authored-by: ElementBot <android@element.io>
2026-05-28 16:54:12 +02:00
Benoit Marty
11b9efa2c9 Migrate to v2 testing APIs 2026-04-30 16:04:07 +02:00
ElementBot
e1b7171839 Sync Strings (#6626)
* Sync Strings from Localazy

* Use the previous plurals as plain strings

* Add extra case for 1 vs multiple users

* Update screenshots

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-04-20 17:09:10 +00:00
Benoit Marty
65f3e74e35 Merge pull request #6561 from element-hq/feature/bma/removeSpaceAnnouncement
Remove space announcement
2026-04-14 16:58:25 +02:00
Benoit Marty
d7e3c2df93 Add missing test for AnnouncementEvent.Continue 2026-04-14 12:16:09 +02:00
Benoit Marty
5ec4518409 Restore previous key. 2026-04-14 11:42:29 +02:00
bmarty
23c1112dcf Sync Strings from Localazy 2026-04-13 00:48:40 +00:00
Benoit Marty
24d1900694 Fix quality issues 2026-04-10 22:50:04 +02:00
Benoit Marty
1929973209 Remove space announcement.
Rework to keep the logic for fullscreen announcement.
2026-04-10 14:51:03 +02:00
bmarty
299d5a9394 Sync Strings from Localazy 2026-03-16 00:42:32 +00:00
ElementBot
cf479a8df0 Sync Strings from Localazy (#6269)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2026-03-02 14:54:50 +01:00
bmarty
25c723c35a Sync Strings from Localazy 2026-02-23 00:39:49 +00:00
bmarty
45ed8619dd Sync Strings from Localazy 2026-01-19 00:35:31 +00:00
ElementBot
ad881c303a Sync Strings from Localazy (#5904)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-12-15 23:51:19 +01:00
Benoit Marty
6427332c84 Fix compilation issue. 2025-12-12 12:21:41 +01:00
bmarty
32d56ea92d Sync Strings from Localazy 2025-12-01 00:23:54 +00:00
ElementBot
eff221645e Sync Strings (#5792)
* Sync Strings from Localazy

* Update localazy config and sync strings.

* Use the new localazy key.

* Sync strings again

* Sync strings again and fix compilation issue.

* Update screenshots

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-11-24 17:28:49 +01:00
ElementBot
703496e059 Sync Strings from Localazy (#5782)
Co-authored-by: jmartinesp <480955+jmartinesp@users.noreply.github.com>
2025-11-20 15:25:19 +00:00
ElementBot
738f707ca7 Sync Strings from Localazy (#5747)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-11-17 10:29:26 +01:00
Benoit Marty
eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty
f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty
7ad9c8f687 Rename handleEvents to handleEvent 2025-11-07 12:21:43 +01:00
ElementBot
b1addb4521 Sync Strings from Localazy (#5610)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-10-27 13:53:07 +01:00
Benoit Marty
263e761907 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
ElementBot
a22101150b Sync Strings (#5562)
* Sync Strings from Localazy

* Sync strings again

---------

Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-10-20 10:04:46 +00:00
ElementBot
8f4cc52ea4 Sync Strings from Localazy (#5515)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-10-13 08:01:58 +02:00
Benoit Marty
fb344d2761 Sync strings. 2025-10-09 12:21:15 +02:00
Benoit Marty
d806cf0ca4 Merge pull request #5486 from element-hq/sync-localazy
Sync Strings
2025-10-08 14:13:46 +02:00
bmarty
cb7186cf69 Sync Strings from Localazy 2025-10-08 10:23:22 +00:00
Benoit Marty
8c8f142723 Add missing tests on DefaultAnnouncementService 2025-10-08 11:38:11 +02:00
Benoit Marty
e31cc9b28b Extract AnnouncementStatus to its own file. 2025-10-08 11:30:49 +02:00
Benoit Marty
6b59c82a5c Improve InMemoryAnnouncementStore 2025-10-08 10:29:15 +02:00
Benoit Marty
7d922bbd03 Rename key and value 2025-10-08 10:26:15 +02:00
Benoit Marty
184bfeb209 Rename method. 2025-10-08 10:22:30 +02:00
Benoit Marty
752e846b1c Improve AnnouncementService. 2025-10-08 10:13:02 +02:00
Benoit Marty
a584a5c1c6 Update Localazy config and sync all the strings. 2025-10-07 15:53:53 +02:00
ElementBot
7095b460b3 Sync Strings from Localazy (#5460)
Co-authored-by: bmarty <3940906+bmarty@users.noreply.github.com>
2025-10-06 12:38:51 +02:00
Benoit Marty
3af56b64a5 Space announcement: iterate on wording. 2025-10-03 15:12:07 +02:00
Benoit Marty
d7f39c332f Introduce Announcement enum. 2025-10-03 12:05:06 +02:00
Benoit Marty
93c273468e Do not expose AnnouncementState in the api module 2025-10-03 11:57:06 +02:00
Benoit Marty
26106365ef Add test on SpaceAnnouncementView 2025-10-03 11:39:51 +02:00