74 Commits

Author SHA1 Message Date
Benoit Marty 99b7c758f2 Merge pull request #6954 from element-hq/fix/try-fixing-flaky-location-timeline-item-screenshots
Try fixing flaky screenshots for location timeline items
2026-06-10 14:44:39 +02:00
Benoit Marty 703f2b22ed Improve static map preview / screenshots. 2026-06-09 13:00:30 +02:00
Jorge Martin Espinosa a91e1fa2ae Make Vulkan a *not required* feature (#6961)
* Make Vulkan a *not required* feature

* Add `DeviceHasVulkanSupport` helper to check this on runtime

* When trying to open a screen with a map in it, check if vulkan is supported and display a new error dialog in that case

* Fix random lint issue

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-06-04 13:08:19 +00:00
Jorge Martín 63ba6d2b18 Try fixing flaky screenshots for location timeline items
Replace the `rememberAsyncImagePainter` call when in preview mode with fake values
2026-06-03 16:36:52 +02:00
Benoit Marty c846f4eee2 customMapStyleUrl should end with style.json and should not have any trailing slash. 2026-05-27 09:59:32 +02:00
Benoit Marty 6984ab0393 Use string template instead of multiple append invocations. 2026-05-27 09:54:27 +02:00
Benoit Marty 4a90768893 Read map tiler custom style from matrix .well-known file
Closes #6844
2026-05-26 16:14:09 +02:00
ganfra e49e183178 Feature : share live location (#6741)
* First live location sharing sending implementation

* Simplify logic around canStop sharing

* Add some debug logs around LiveLocationSharingService

* Add LiveLocationException

* Expose beaconId to identify the current share

* Throttle live location instead of debouncing

* Keep sync alive when sharing live location

* Improve LiveLocation sharing

* Show LiveLocationDisclaimer

* Read minDistanceUpdate in LiveLocationSharingService

* Set minDistanceUpdate in AdvancedSettings

* Display banner in room when sharing live location

* Fix tests around LiveLocationSharing

* Ensure shares are properly restarted/stopped when app is re-launched

* Ensure LLS data is cleared when session is removed

* Update and fix LLS tests

* Handle Start LLS in ui

* Add check LLS permissions

* Remove hardcoded strings

* Fix quality and format

* Create DeviceLocationProvider so we can share location data between sources (presenter/live location service)

* Update screenshots

* Fix warning

* Do not try to stop if it was not sharing

* Revert "Create DeviceLocationProvider so we can share location data between sources (presenter/live location service)"

This reverts commit ba12bd968e82941cc231bdbb449310b24c97c5b8.

* Tweak location provider config values

* Address PR review remarks

* Fix ktlint

* Update screenshots

* Fix some tests after merging develop

* Adjust TimelineItemLocationView ui to match figma

* Update screenshots

* Documentation and cleanup

* Remove temporary resource

---------

Co-authored-by: ElementBot <android@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Benoit Marty <benoitm@matrix.org>
2026-05-11 08:19:28 +00:00
ganfra c35b5811d0 Restore comment on StaticMapView 2026-04-20 15:14:10 +02:00
ganfra fbfeeae084 Fix formatting 2026-04-16 16:18:53 +02:00
ganfra 537063d899 Add focused location tracking when opening the map 2026-04-10 21:11:30 +02:00
ganfra b082f59f9c Start implementing LLS timeline item 2026-03-24 16:38:12 +01:00
ganfra 5a40144a24 Fix some existing tests after changes 2026-03-13 10:18:28 +01:00
ganfra 96147967ac Code cleanup 2026-03-12 12:35:46 +01:00
ganfra 785587911b Introduce LocationPinMarkers composable 2026-03-09 20:54:02 +01:00
ganfra f2d4ffc5bd Introduce LiveLocationContent for the timeline (needs sdk) 2026-03-09 20:54:01 +01:00
ganfra ffad69b7b9 Make sure we can display both Live and Static locations in ShowLocation 2026-03-09 20:54:01 +01:00
ganfra 268d2e587e Location accuracy should be nullable 2026-03-09 20:54:01 +01:00
ganfra 8a12cba923 Rename send location to share location 2026-03-09 20:54:01 +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 c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Benoit Marty 07b6148035 Remove context(parentNode: Node) and provide the parent Node as a parameter. 2025-10-31 12:04:57 +01:00
Benoit Marty f174084942 Use context parameter for the parentNode 2025-10-30 16:32:53 +01:00
Benoit Marty 02dc71c4c3 Remove NodeBuilder to ensure that Params and Callback are always provided. 2025-10-30 16:32:52 +01:00
Benoit Marty a575019760 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Jorge Martin Espinosa 35928e3630 Threads - first iteration (#5165)
* Initial threads support: parse `ThreadSummary`.

Replace several `isThreaded` values with `EventThreadInfo`, which contains the info about the event either being the root of a thread or part of it.

* Add `Threaded` timeline mode

* Add a `liveTimeline` parameter to `TimelineController`'s  constructor. This way we can customise which timeline will be used as the 'live' one. Also add `@LiveTimeline` DI qualifier for the actual live timeline of the room.

* Create `ThreadedMessagesNode`. Allow opening a thread in a separate screen.

* Add the callbacks for the list menu actions - even if they're the wrong ones and will send the data to the room instead

* Send attachments and location in threads

* Fix polls in threads, add support for sending voice messages in threads

* Display thread summaries only when the feature flag is enabled

* Use 'Reply' instead of 'Reply in thread' when in threaded timeline mode

* Remove incorrect usage of `Timeline` in `MessageComposerPresenter`. This led to replies to threaded events not appearing as actual replies.

---------

Co-authored-by: ElementBot <android@element.io>
2025-08-19 13:35:48 +00:00
renovate[bot] 5fb0fc0d50 fix(deps): update android.gradle.plugin to v8.10.0 (#4687)
* fix(deps): update android.gradle.plugin to v8.10.0

* Update lint version to 8.11.0-alpha09

* Fix lint false positive.

Error: Modifier factory functions must use the receiver Modifier instance [ModifierFactoryUnreferencedReceiver from androidx.compose.ui]

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2025-05-07 11:07:20 +02:00
Benoit Marty 3c1deff79c Element config (#4471)
* Add handy extension "VariantDimension.buildConfigFieldStr"

* Update configuration for MapTiler.

* Update configuration for Sentry.

* Build AnalyticsConfig depending on analytics configuration.

* Configure analytics policy url.

* Add handy extension "VariantDimension.buildConfigFieldBoolean"

* Configure legal urls.

* Add a way to disable rageshake / reporting bugs.

* Update screenshots

* Quality

* Fix test

* Use `ifBlank` extension

* Add missing configuration for PostHog

* Update configuration for Rageshake.

* Add build log.

* Disable crash detection if rageshake feature is not available.
Disabled twice.

* Hide link to analytics policy if the link is missing.

* Fix test when run in enterprise context.

* Use RageshakeFeatureAvailability where appropriate.

* Rename file.

* Move some classes to their correct module.

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-27 11:25:04 +01:00
Benoit Marty 2fd1c21df0 Let element enterprise be able to configure id for mapTiler. (#4446)
* Let element enterprise configure the ids for maptiler service.

* Disable location sharing and location viewer is the service is not available.

* Fix compilation issue on connected test

* Do not allow to reload the map if the mapId is not available.

* Update screenshots

* Rename file.

* Better to inject a string provider here, so we can unit test DefaultLocationService.

---------

Co-authored-by: ElementBot <android@element.io>
2025-03-21 17:06:52 +01:00
Benoit Marty db55b69a49 Coil3: also show the loader when the request is not yet started (State.Empty) 2025-03-03 15:52:30 +01:00
Benoit Marty a70249769d Migrate to coil3 2025-03-03 12:30:26 +01:00
Benoit Marty eda18f8b78 Replace Material icons with Compound icons wherever it's possible 2025-02-26 22:19:19 +01:00
Jorge Martin Espinosa 9b5b76203f Use secret Sentry DSN value (#4210)
* Use secret Sentry DSN value.

We realised our DSN entry has been shipped along with the code and it was being used in several forks as is, resulting in wrong bug reports coming into our Sentry dashboard and making it very hard to debug actual issues in the app.
2025-01-29 13:47:06 +01:00
Benoit Marty 97f3be3dc5 Apply dual licenses: AGPL + Element Commercial to file headers.
2 replace all actions have been performed:
- "SPDX-License-Identifier: AGPL-3.0-only" to "SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial"
- "Please see LICENSE in the repository root for full details." to "Please see LICENSE files in the repository root for full details."
2025-01-07 10:05:04 +01:00
renovate[bot] 98d9abecd9 fix(deps): update dependency io.nlopez.compose.rules:detekt to v0.4.15 (#3595)
* Update dependency io.nlopez.compose.rules:detekt to v0.4.15

* Fix new detekt issues

* Fix KtLint

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-10-04 16:58:19 +02:00
Benoit Marty f61df38e55 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Jorge Martin Espinosa b0cebf5ca0 Improve screenshot testing with ComposablePreviewScanner (#3125)
* Use ComposablePreviewScanner to rework how screenshot testing works
* Add test sharding
* Update screenshots
* Fixes for Element Gallery

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>
2024-07-03 13:05:06 +02:00
Benoit Marty 5d086ad82d Fix moar ktlint issues 2024-01-11 10:02:10 +01:00
renovate[bot] c8bd362397 Update plugin ktlint to v12.1.0 (#2200)
* Update plugin ktlint to v12.1.0

* Run `./gradlew ktlintFormat` and fix some issues manually.

* Fix other issues reproted by Ktlint

* Limit false positives, KtLint removes unnecessary curly brace in String templates.

* Remove useless Unit

* Minor improvements over ktlint changes

* Restore `AlertDialogContent` behaviour

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-01-10 16:22:24 +01:00
Jorge Martin Espinosa 087d2728d5 Extract compound tokens and theming to compound-android library (#1888)
* Replace tokens & icons with the external Compound ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2023-11-27 10:30:07 +01:00
Benoit Marty 5de8841d96 Upgrade lint to version 8.3.0-alpha11 and suppress false positive. 2023-11-06 16:03:16 +01:00
Benoit Marty 3c41158558 Use existing BooleanProvider 2023-10-12 15:03:50 +02:00
Benoit Marty 702c137ead Replace mutableStateOf by mutableIntStateOf and mutableFloatStateOf. Use intValue and floatValue to avoid unboxing. 2023-09-26 18:07:53 +02:00
Benoit Marty 0e4c146e87 Detekt: Rename DayNightPreviews to PreviewsDayNight to follow naming convention.
MultiPreview annotations should start with `Previews` as prefix
2023-09-21 08:30:36 +02:00
Benoit Marty 48fd833f8b More cleanup 2023-09-20 17:32:32 +02:00
Benoit Marty a3ae891e51 Fix issue detected by detekt 2023-08-16 15:24:18 +02:00
Benoit Marty 6aa5239189 Enable detekt rule PreviewPublic and fix existing issues. 2023-07-26 10:08:39 +02:00
Benoit Marty 1a1d4c2957 Fix code quality check failures after new rules from #935 has been merged on develop. 2023-07-21 16:04:55 +02:00
Benoit Marty b20448bf08 Merge pull request #935 from vector-im/feature/bma/noWarnings
Code quality: warnings are errors and enable more Detekt rules.
2023-07-21 15:52:05 +02:00