* Create `CompoundButton`
* Some fixes
* Lint fixes
* Start replacing existing `Button` usages
* Replace button usages
* Remove previous Button composable
* Rename `CompoundButton` to `Button`
* Fix emphasized button being displayed as Text
* Fix cancel button in `WaitListView`
* Update screenshots
* Add shorthand functions for `OutlinedButton` and `TextButton`
* Add changelog
* Fix wrong size used for emphasized button in dialog
* Create a private `ButtonInternal` implementation with the shared logic.
- Make `ButtonStyle` private.
- Rename `title` to `text`.
- Rename `buttonStyle` and `buttonSize` to just `style` and `size`.
* Fix several warnings and lint issues.
* Update screenshots
---------
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
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
* Add `Copy` action for text events
* Remove 'Copy' action from the list for non-text events
* Use `@ContributesBinding` to inject `AndroidClipboardHelper`.
- Add the edit action in the room details
- Add "Add topic" button in room details
- Add the screen behind that action to edit some room properties: avatar, name, topic
- Handle the save button action
- enable the button only if changes are detected
- display a loader "updating room"
- display an error dialog if any request has failed
- Check user has the right power level to change various attributes
- "Add topic" is only shown if there's no topic and they are able to set on
- Edit menu is only shown if they can change topic, name or avatar
- On the edit page, any fields they can't change are uneditable
Co-authored-by: Chris Smith <csmith@lunarian.uk>
* Update AGP to 8.0.0.
* Set JAVA_HOME to JDK17
* Update lint version.
* Use right JDK for dependency analysis, replace deprecated env var.
* Upgrade to Gradle 8.1.
* Remove `@Supress(DSL_SCOPE_VIOLATION)` as it's no longer needed.
---------
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>