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.
* Use @DayNightPreviews for static map
To properly screenshot the dark pin.
* Update screenshots
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
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
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
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!)
* Link Compound's `TypographyTokens` to `ElementTheme`.
Also add some docs about when we should use each set of tokens.
* Renamed `LocalColors` to `LocalLegacyColors`.
Made both `LocalLegacyColors` and `LocalCompoundColors` internal. This means it will need to always be used through `ElementTheme.`
Also, removed any usages of `LocalColors.current` accross the project, they're now used through `ElementTheme.legacyColors`.
* Added tokens.
* Apply color to MaterialTheme, also add typography.
* Map colors to the right ones in the themes.
* Create and improve previews of some components
* More preview improvements
* Add `tertiary` and `onTertiary` colors, remove some unused ones.
* Fix usage of deleted color token
* Fix bug in Switch previews
* Create a separate `:libraries:theme` module to keep everything related to colors, typography and Compound in general.
* Fix `DatePickerPreview`
* Add missing Compound generated files by fixing their package name
* Move `ElementTheme` to the `:libraries:theme` module, make some variables internal.
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>