Commit Graph

28 Commits

Author SHA1 Message Date
Marco Romano
ffaf24751a Use correct share my location icon in button (#936)
As per newer design specs.

Related to:
- https://github.com/vector-im/element-meta/issues/1678
2023-07-20 13:59:06 +00:00
Marco Romano
d5a93a50e0 Add screenshots with ~1.5 lines long desc to expanded location view (#923)
This will help in catching alignment regressions.

Related to:
- https://github.com/vector-im/element-meta/issues/1678
2023-07-20 13:42:35 +00:00
Marco Romano
188af2ee98 Correct location event body (#930)
- Now sending the correct body format as agreed with design. This won't be show in EX clients though.

Related to:
- https://github.com/vector-im/element-meta/issues/1682
2023-07-20 10:16:40 +00:00
Marco Romano
584a227920 maplibre-compose allow customisation of location dot style (#929)
- And style it according to our designs.

Related to:
- https://github.com/vector-im/element-meta/issues/1682
2023-07-20 12:09:40 +02:00
renovate[bot]
6d3b816bf5 Update dependency app.cash.molecule:molecule-runtime to v1 (#925)
* Update dependency app.cash.molecule:molecule-runtime to v1

* Replace `RecompositionClock` with `RecompositionMode`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2023-07-20 07:36:19 +02:00
Marco Romano
025d8781a7 Refactor a custom alignment to its own modifier for readability. (#924) 2023-07-19 16:58:04 +02:00
Marco Romano
30060b5729 Don't crash when sharing a location with no maptiler apikey (#919)
Related to:
- https://github.com/vector-im/element-meta/issues/1682
2023-07-19 16:33:50 +02:00
Marco Romano
c135da2562 Location expanded view: show own location (#916)
If the location permission is granted:
- Shows the user's own location
- Shows a button to center the map on it

Part of:
- https://github.com/vector-im/element-meta/issues/1678
2023-07-19 13:26:06 +00:00
Marco Romano
fb85cc0be4 Fix insets for nav bar in send location view (#915)
Improvement of https://github.com/vector-im/element-x-android/pull/770

- https://github.com/vector-im/element-meta/issues/1682
2023-07-19 13:57:34 +02:00
Marco Romano
278f8ae4c6 Send My Location (#770)
- https://github.com/vector-im/element-meta/issues/1682
2023-07-19 09:58:13 +00:00
Chris Smith
b7bd08b210 Location sharing: don't hardcode API key
In an effort to make it easier for forks to (a) use their own
API keys (b) change map styles or maybe even providers, move
the MapTiler key out of the source code and pass it in via
env var or property.

Also refactor the utility classes slightly to keep all the URL
related functions together, to reduce the chance of collisions
when maintaining such forks.
2023-07-17 16:09:53 +01:00
Benoit Marty
16f30db20e Move TypographyAliases next to ColorAliases 2023-07-11 11:29:56 +02:00
Benoit Marty
529f6d681e Create alias for typography (more semantic name). aliasScreenTitle 2023-07-11 10:29:06 +02:00
Benoit Marty
247348b372 TextStyle again. 2023-07-10 17:33:42 +02:00
Chris Smith
85d20c7874 Remove CenterAlignedTopAppBar
Centering the titles is very iOS-y and not aligned with the material
guidelines (which say center aligned top bars are only for the main
root page in the app). They also present issues when we have titles
and textual actions that end up being quite long in other languages,
as they end up merging together.

Fixes #655
2023-07-07 13:59:05 +01:00
Chris Smith
1c57f9b4bc Merge pull request #791 from vector-im/misc/cjs/mapbox-attribution-colour 2023-07-06 12:29:33 +01:00
Chris Smith
e41ec85bc8 Change MapLibre attribution tint 2023-07-06 09:37:25 +01:00
Chris Smith
77470b9a97 Show descriptions for locations.
Descriptions show in the same message bubble above the map in
the timeline, and in a bar at the top of the expanded map view.
2023-07-05 15:18:36 +01:00
Marco Romano
f33561c25d Revert "Auto generate dark mode previews and screenshots (#776)" (#784)
This reverts commit 79b529193c.
2023-07-05 15:47:53 +02:00
Marco Romano
79b529193c Auto generate dark mode previews and screenshots (#776)
With this change, composable previews and screenshots should be created with just:
```
@ElementPreviews
@Composable
fun MyViewPreview() {
    ElementPreview { 
        MyView()
    }
}
```

- Adds `@ElementPreviews` which is a shorthand for:
```
@Preview(name = "D")
@Preview(name = "N", uiMode = Configuration.UI_MODE_NIGHT_YES)
```
Should be used in connection with the now public `fun ElementPreview()` composable.

- Adds ElementPreviews to previewAnnotations in dangerfile
- Screenshots of night mode previews are now rendered with night mode
- Replaces `ElementPreviewLight` and `ElementThemedPreview` with `ElementPreview`
- Deprecates `ElementPreviewDark` which should be removed.
- Remaining usages of `ElementPreviewDark` are now ignored during screenshot tests
2023-07-05 13:58:24 +02:00
Chris Smith
0635fa9ee5 Tidy and simplify using PR suggestions 2023-07-05 10:52:44 +01:00
Chris Smith
87853b467f s/view/show/ 2023-07-05 10:19:07 +01:00
Chris Smith
7a2cc5df0a Tap on locations in timeline to see a larger map
Show a fully-featured MapView, centered on the dropped pin,
which allows panning/zooming. Share button allows opening
in a map application.

Supports showing a description at the top of the screen,
if one is supplied with the event.

Out of scope: showing the local user's location (being
done as a separate story).

Includes some minor tidying: remove duplicate Location,
and make GeoURI parsing a method on that class; fix the
pointer location in MapView (I broke it earlier, whoops!)
2023-07-04 16:19:24 +01:00
Marco Romano
29d5d3baa7 Adds new optional parameters to MatrixRoom.sendLocation() (#767)
For location sharing.
2023-07-04 13:57:19 +00:00
Chris Smith
330e786d0d Move pin graphic/component to design system 2023-07-03 11:51:50 +01:00
Chris Smith
bd0e24598a Show location replies per the designs 2023-06-30 16:14:44 +01:00
Marco Romano
0858cfb272 Send pin-drop location (#636)
Share pindrop location

This feature allows the user to share any location by just selecting it from the map.

Closes: https://github.com/vector-im/element-x-android/issues/690
2023-06-29 22:07:47 +00:00
Marco Romano
3eb6a4bc5a Set up SDK & reusable map view component (#476)
Adds `libraries/map` which contains some initial building blocks that will be used by the location sharing feature.

Ref: https://github.com/vector-im/element-meta/issues/1684
2023-06-27 07:23:00 +00:00