Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3369] video thumbnails UI components gallery #4283

Merged
Merged
Show file tree
Hide file tree
Changes from 63 commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
8559bea
[3369] Duplicate `ImageAttachmentViewHolder`. The duplicate is rename…
MarinTolic Sep 14, 2022
0f3ffb8
[3369] Appease detekt
MarinTolic Sep 14, 2022
94cae9a
[3369] Update deprecations and the changelog
MarinTolic Sep 14, 2022
a238717
[3369] Implement decorators for the new `MediaAttachmentsViewHolder`
MarinTolic Sep 14, 2022
405518e
Merge branch 'develop' of https://github.com/GetStream/stream-chat-an…
MarinTolic Oct 4, 2022
9001f6b
[3369] Switch to using the new user avatar.
MarinTolic Oct 4, 2022
7fc762e
Merge branch 'develop' of https://github.com/GetStream/stream-chat-an…
MarinTolic Oct 5, 2022
c41756c
[3369] Implemented the ability to display video thumbnails inside the…
MarinTolic Oct 5, 2022
2e2c207
[3369] Appease Detekt
MarinTolic Oct 5, 2022
91743bb
[3369] Expand the customizability of the new media attachment view
MarinTolic Oct 6, 2022
c84b289
[3369] Expand the customizability of the new media attachment view
MarinTolic Oct 6, 2022
2c64ae4
[3369] Remove unused classes
MarinTolic Oct 7, 2022
1e992cc
[3369] Set placeholder tint as nullable so a lack of tint is a valid …
MarinTolic Oct 7, 2022
a5b1d93
[3369] Switch to using a 1:1 dimension ratio attachment preview for a…
MarinTolic Oct 7, 2022
6506e31
[3369] Remove separate backgrounds for video and image attachments du…
MarinTolic Oct 7, 2022
f8ecbed
[3369] Remove separate backgrounds for video and image attachments du…
MarinTolic Oct 7, 2022
4c87363
[3369] Remove an unnecessary todo since it's not an action.
MarinTolic Oct 7, 2022
de1d49b
[3369] Add the ability to tint the play video icon
MarinTolic Oct 7, 2022
30f8513
Merge branch 'develop' into feature/3369-video-thumbnails-ui-components
MarinTolic Oct 7, 2022
413e45a
[3369] Update the changelog
MarinTolic Oct 7, 2022
a5c4bb7
[3369] Remove an unnecessary deprecation
MarinTolic Oct 7, 2022
20f451d
[3369] Enable viewing videos in the attachment gallery activity
MarinTolic Oct 11, 2022
a24ec03
[3369] Generate detekt baseline
MarinTolic Oct 11, 2022
46d9cce
[3369] Implement a play button for the main viewing area inside the a…
MarinTolic Oct 12, 2022
4490ae0
Merge branch 'develop' of https://github.com/GetStream/stream-chat-an…
MarinTolic Oct 12, 2022
7cdd61d
[3369] Implement thumbnail preview for the video media and externally…
MarinTolic Oct 12, 2022
ab9f38d
[3369] Update the bottom bar design inside the gallery
MarinTolic Oct 14, 2022
d3c66f1
[3369] Improve video UX and sharing reliability
MarinTolic Oct 14, 2022
10ea7b5
[3369] Fix a crash
MarinTolic Oct 14, 2022
4d16a74
[3369] Make padding symmetric
MarinTolic Oct 14, 2022
a324fa0
[3369] Improve video UX reliability
MarinTolic Oct 14, 2022
04fc899
[3369] Add a toast for failed playbacks
MarinTolic Oct 14, 2022
621d955
[3369] Improve gallery UX
MarinTolic Oct 14, 2022
b33bfd7
[3369] Move styled attributes for video attachments to a separate sty…
MarinTolic Oct 16, 2022
474f0f7
[3369] Move styled attributes for video attachments to a separate sty…
MarinTolic Oct 16, 2022
6ae5019
[3369] Enable customization of the play button inside the media overv…
MarinTolic Oct 17, 2022
ed30af2
[3369] Appease detekt.
MarinTolic Oct 17, 2022
05f6921
Update CHANGELOG.md
MarinTolic Oct 17, 2022
9828e5c
[3369] Replace the old image attachment type with a media attachment …
MarinTolic Oct 17, 2022
68fa2ce
[3369] Replace the old image attachment type with a media attachment …
MarinTolic Oct 17, 2022
13e24ea
Merge remote-tracking branch 'origin/feature/3369-video-thumbnails-ui…
MarinTolic Oct 17, 2022
1ff6e3e
Apply suggestions from code review
MarinTolic Oct 17, 2022
67b9824
[3369] Update kdocs according to PR comments
MarinTolic Oct 17, 2022
b439f42
Merge remote-tracking branch 'origin/feature/3369-video-thumbnails-ui…
MarinTolic Oct 17, 2022
4d19980
[3369] Update kdocs according to PR comments
MarinTolic Oct 17, 2022
9e2c136
Merge branch 'feature/3369-video-thumbnails-ui-components' of https:/…
MarinTolic Oct 17, 2022
92d8ff5
[3369] Update kdocs according to PR comments
MarinTolic Oct 17, 2022
f2adb58
[3369] Generate detekt baseline
MarinTolic Oct 17, 2022
f4c95b1
[3369] Implement the ability to change background and image placehold…
MarinTolic Oct 17, 2022
91c0bf6
[3369] Appease detekt
MarinTolic Oct 17, 2022
c77e5c9
[3369] Implemented the ability to change image placeholders and media…
MarinTolic Oct 17, 2022
28b2012
[3369] Implemented progress bars for loading images and thumbnails
MarinTolic Oct 18, 2022
d258c88
[3369] Updated video player external state
MarinTolic Oct 18, 2022
cee96a9
[3369] Remove the ability to change media preview background because …
MarinTolic Oct 18, 2022
c4ea0d2
[3369] Remove unused style
MarinTolic Oct 18, 2022
71ae0b5
[3369] Remove unused style
MarinTolic Oct 18, 2022
226be6a
Merge branch 'develop' of https://github.com/GetStream/stream-chat-an…
MarinTolic Oct 18, 2022
d602544
[3369] Update style transformers
MarinTolic Oct 18, 2022
dcf752b
[3369] Remove an unnecessary todo
MarinTolic Oct 18, 2022
e3b1137
[3369] Remove placeholders while loading
MarinTolic Oct 18, 2022
9f3eced
[3369] Don't load video thumbnails into quoted attachments if video t…
MarinTolic Oct 18, 2022
0032136
[3369] Update the changelog
MarinTolic Oct 18, 2022
6d07743
Fix styling via theme attrs
bychkovdmitry Oct 19, 2022
aa0a15f
Merge branch 'develop' of https://github.com/GetStream/stream-chat-an…
MarinTolic Oct 20, 2022
5084827
[3369] Change string name and text and delete old translations that a…
MarinTolic Oct 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@
- Improved asking for `WRITE_EXTERNAL_STORAGE` permission. The permission won't be requested starting from Android Q unless legacy external storage is requested. [#4219](https://github.com/GetStream/stream-chat-android/pull/4219)
- Improved the stability of cooldown timer in slow mode. [#4251](https://github.com/GetStream/stream-chat-android/pull/4251)
- Improved how system bar colors are handled on the attachment gallery screen. [#4269](https://github.com/GetStream/stream-chat-android/pull/4269)
- The default attachment gallery is now able to handle videos as well as images. [#4283](https://github.com/GetStream/stream-chat-android/pull/4283)

### ✅ Added
- Added `UserAvatarView` and `ChannelAvatarView` to replace `AvatarView` to keep consistency with the Compose UI SDK. [#4165](https://github.com/GetStream/stream-chat-android/pull/4165)
- Added the ability to turn off video previews (thumbnails) via `ChatUI.videoThumbnailsEnabled`. Video previews are a paid feature and as such you can turn them off. They are on by default and the pricing can be found [here](https://getstream.io/chat/pricing/). [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- Added a new function `MessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()` which returns a `ViewHolder` capable of previewing both images and videos. [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- Added a style class called `MediaAttachmentViewStyle`. The new style controls how previews of both image and video attachments are displayed inside the message list. [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- Added `UnsupportedAttachmentFactory` for unsupported attachments. [#4271](https://github.com/GetStream/stream-chat-android/pull/4271)
- Added attrs to `UnsupportedAttachmentsView` that allow to customize the UI of unsupported attachments in [#4271](https://github.com/GetStream/stream-chat-android/pull/4271):
* `streamUiUnsupportedAttachmentBackgroundColor`
Expand All @@ -87,10 +91,14 @@
- Added the ability to turn off video previews (thumbnails) via `ChatUI.videoThumbnailsEnabled`. Video previews are a paid feature and as such you can turn them off. They are on by default and the pricing can be found [here](https://getstream.io/chat/pricing/). [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- Added a new function `MessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()` which returns a `ViewHolder` capable of previewing both images and videos. [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- Added a style class called `MediaAttachmentViewStyle`. The new style controls how previews of both image and video attachments are displayed inside the message list. [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- Added the ability to style the play button inside the attachment gallery. The necessary attributes along with their description can be found [here](https://github.com/GetStream/stream-chat-android/blob/main/stream-chat-android-ui-components/src/main/res/values/attrs_attachment_gallery_activity.xml). These attributes can be parsed using the newly created `AttachmentGalleryViewMediaStyle` class. [#4283](https://github.com/GetStream/stream-chat-android/pull/4283)
- Added new styled attributes for `MediaAttachmentGridView`. The new attributes along with their description can be found [here](https://github.com/GetStream/stream-chat-android/blob/main/src/main/res/values/attrs_media_attachment_grid_view.xml). These attributes can be parsed using the newly created `MediaAttachmentGridViewStyle` class. [#4283](https://github.com/GetStream/stream-chat-android/pull/4283)

### ⚠️ Changed
- 🚨 Breaking change: The function `MessageListItemViewHolderFactory.createImageAttachmentsViewHolder()` has been removed in favor of the function `MessageListItemViewHolderFactory.createMediaAttachmentsViewHolder()` which returns a `ViewHolder` capable of previewing both images and videos. [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- 🚨 Breaking change: `ImageAttachmentViewStyle` has been removed and replaced by `MediaAttachmentViewStyle`. The new style controls how previews of both image and video attachments are displayed inside the message list. [#4158](https://github.com/GetStream/stream-chat-android/pull/4158)
- 🚨 Breaking change: Attribute `streamUiSaveImageEnabled` has been renamed to `streamUiSaveMediaEnabled`. [#4283](https://github.com/GetStream/stream-chat-android/pull/4283)
- 🚨 Breaking change: Attribute `streamUiSaveImageIcon` has been renamed to `streamUiSaveMediaIcon`. [#4283](https://github.com/GetStream/stream-chat-android/pull/4283)

### ❌ Removed
- Removed `AvatarView` in favor of `UserAvatarView` and `ChannelAvatarView` to keep consistency with the Compose UI SDK. [#4165](https://github.com/GetStream/stream-chat-android/pull/4165)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,7 @@ public final class io/getstream/chat/android/ui/SupportedReactions$ReactionDrawa
public final class io/getstream/chat/android/ui/TransformStyle {
public static final field INSTANCE Lio/getstream/chat/android/ui/TransformStyle;
public final fun getAttachmentGalleryOptionsStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getAttachmentGalleryViewMediaStyle ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getAttachmentsPickerStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getAvatarStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getChannelActionsDialogStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
Expand All @@ -717,7 +718,8 @@ public final class io/getstream/chat/android/ui/TransformStyle {
public final fun getEditReactionsStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getFileAttachmentStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getGiphyViewHolderStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getImageAttachmentStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getMediaAttachmentGridViewStyle ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getMediaAttachmentStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getMentionListViewStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getMessageComposerStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getMessageInputStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
Expand All @@ -735,6 +737,7 @@ public final class io/getstream/chat/android/ui/TransformStyle {
public final fun getUnsupportedAttachmentStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun getViewReactionsStyleTransformer ()Lio/getstream/chat/android/ui/StyleTransformer;
public final fun setAttachmentGalleryOptionsStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setAttachmentGalleryViewMediaStyle (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setAttachmentsPickerStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setAvatarStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setChannelActionsDialogStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
Expand All @@ -743,7 +746,8 @@ public final class io/getstream/chat/android/ui/TransformStyle {
public final fun setEditReactionsStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setFileAttachmentStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setGiphyViewHolderStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setImageAttachmentStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setMediaAttachmentGridViewStyle (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setMediaAttachmentStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setMentionListViewStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setMessageComposerStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
public final fun setMessageInputStyleTransformer (Lio/getstream/chat/android/ui/StyleTransformer;)V
Expand Down Expand Up @@ -1636,6 +1640,39 @@ public final class io/getstream/chat/android/ui/gallery/AttachmentGalleryResultI
public static final fun toAttachmentGalleryResultItem (Lio/getstream/chat/android/client/models/Attachment;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Z)Lio/getstream/chat/android/ui/gallery/AttachmentGalleryResultItem;
}

public final class io/getstream/chat/android/ui/gallery/AttachmentGalleryViewMediaStyle {
public fun <init> (Landroid/graphics/drawable/Drawable;Ljava/lang/Integer;IFFIIIIIILandroid/graphics/drawable/Drawable;)V
public final fun component1 ()Landroid/graphics/drawable/Drawable;
public final fun component10 ()I
public final fun component11 ()I
public final fun component12 ()Landroid/graphics/drawable/Drawable;
public final fun component2 ()Ljava/lang/Integer;
public final fun component3 ()I
public final fun component4 ()F
public final fun component5 ()F
public final fun component6 ()I
public final fun component7 ()I
public final fun component8 ()I
public final fun component9 ()I
public final fun copy (Landroid/graphics/drawable/Drawable;Ljava/lang/Integer;IFFIIIIIILandroid/graphics/drawable/Drawable;)Lio/getstream/chat/android/ui/gallery/AttachmentGalleryViewMediaStyle;
public static synthetic fun copy$default (Lio/getstream/chat/android/ui/gallery/AttachmentGalleryViewMediaStyle;Landroid/graphics/drawable/Drawable;Ljava/lang/Integer;IFFIIIIIILandroid/graphics/drawable/Drawable;ILjava/lang/Object;)Lio/getstream/chat/android/ui/gallery/AttachmentGalleryViewMediaStyle;
public fun equals (Ljava/lang/Object;)Z
public final fun getImagePlaceholder ()Landroid/graphics/drawable/Drawable;
public final fun getViewMediaPlayVideoButtonIcon ()Landroid/graphics/drawable/Drawable;
public final fun getViewMediaPlayVideoIconBackgroundColor ()I
public final fun getViewMediaPlayVideoIconCornerRadius ()F
public final fun getViewMediaPlayVideoIconElevation ()F
public final fun getViewMediaPlayVideoIconHeight ()I
public final fun getViewMediaPlayVideoIconPaddingBottom ()I
public final fun getViewMediaPlayVideoIconPaddingEnd ()I
public final fun getViewMediaPlayVideoIconPaddingStart ()I
public final fun getViewMediaPlayVideoIconPaddingTop ()I
public final fun getViewMediaPlayVideoIconTint ()Ljava/lang/Integer;
public final fun getViewMediaPlayVideoIconWidth ()I
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class io/getstream/chat/android/ui/gallery/AttachmentMediaActivity : androidx/appcompat/app/AppCompatActivity {
public static final field Companion Lio/getstream/chat/android/ui/gallery/AttachmentMediaActivity$Companion;
public fun <init> ()V
Expand All @@ -1646,6 +1683,37 @@ public final class io/getstream/chat/android/ui/gallery/AttachmentMediaActivity$
public static synthetic fun createIntent$default (Lio/getstream/chat/android/ui/gallery/AttachmentMediaActivity$Companion;Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Landroid/content/Intent;
}

public final class io/getstream/chat/android/ui/gallery/MediaAttachmentGridViewStyle {
public fun <init> (ZLandroid/graphics/drawable/Drawable;Ljava/lang/Integer;IFFIIIILandroid/graphics/drawable/Drawable;)V
public final fun component1 ()Z
public final fun component10 ()I
public final fun component11 ()Landroid/graphics/drawable/Drawable;
public final fun component2 ()Landroid/graphics/drawable/Drawable;
public final fun component3 ()Ljava/lang/Integer;
public final fun component4 ()I
public final fun component5 ()F
public final fun component6 ()F
public final fun component7 ()I
public final fun component8 ()I
public final fun component9 ()I
public final fun copy (ZLandroid/graphics/drawable/Drawable;Ljava/lang/Integer;IFFIIIILandroid/graphics/drawable/Drawable;)Lio/getstream/chat/android/ui/gallery/MediaAttachmentGridViewStyle;
public static synthetic fun copy$default (Lio/getstream/chat/android/ui/gallery/MediaAttachmentGridViewStyle;ZLandroid/graphics/drawable/Drawable;Ljava/lang/Integer;IFFIIIILandroid/graphics/drawable/Drawable;ILjava/lang/Object;)Lio/getstream/chat/android/ui/gallery/MediaAttachmentGridViewStyle;
public fun equals (Ljava/lang/Object;)Z
public final fun getImagePlaceholder ()Landroid/graphics/drawable/Drawable;
public final fun getPlayVideoButtonIcon ()Landroid/graphics/drawable/Drawable;
public final fun getPlayVideoIconBackgroundColor ()I
public final fun getPlayVideoIconCornerRadius ()F
public final fun getPlayVideoIconElevation ()F
public final fun getPlayVideoIconPaddingBottom ()I
public final fun getPlayVideoIconPaddingEnd ()I
public final fun getPlayVideoIconPaddingStart ()I
public final fun getPlayVideoIconPaddingTop ()I
public final fun getPlayVideoIconTint ()Ljava/lang/Integer;
public final fun getShowUserAvatars ()Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class io/getstream/chat/android/ui/gallery/options/AttachmentGalleryOptionsViewStyle {
public fun <init> (Lio/getstream/chat/android/ui/common/style/TextStyle;IZLandroid/graphics/drawable/Drawable;ZLandroid/graphics/drawable/Drawable;ZLandroid/graphics/drawable/Drawable;ZLandroid/graphics/drawable/Drawable;I)V
public final fun component1 ()Lio/getstream/chat/android/ui/common/style/TextStyle;
Expand All @@ -1669,8 +1737,8 @@ public final class io/getstream/chat/android/ui/gallery/options/AttachmentGaller
public final fun getOptionTextStyle ()Lio/getstream/chat/android/ui/common/style/TextStyle;
public final fun getReplyOptionDrawable ()Landroid/graphics/drawable/Drawable;
public final fun getReplyOptionEnabled ()Z
public final fun getSaveImageOptionDrawable ()Landroid/graphics/drawable/Drawable;
public final fun getSaveImageOptionEnabled ()Z
public final fun getSaveMediaOptionDrawable ()Landroid/graphics/drawable/Drawable;
public final fun getSaveMediaOptionEnabled ()Z
public final fun getShowInChatOptionDrawable ()Landroid/graphics/drawable/Drawable;
public final fun getShowInChatOptionEnabled ()Z
public fun hashCode ()I
Expand Down
Loading