8000 4.71.0 Release by Stream-SDK-Bot · Pull Request #733 · GetStream/stream-chat-swiftui · GitHub
[go: up one dir, main page]

Skip to content

4.71.0 Release #733

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

Merged
merged 12 commits into from
Jan 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
18 changes: 10 additions & 8 deletions .github/workflows/cron-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ jobs:
os: macos-15
device: "iPhone 16 Pro"
setup_runtime: false
- ios: 17.4
- ios: 17.5
xcode: 15.4
os: macos-14
os: macos-15
device: "iPhone 14 Pro"
setup_runtime: false
- ios: 16.4
xcode: 15.3
xcode: 15.3 # fails on 15.4
os: macos-14
device: "iPhone 14 Pro"
setup_runtime: true
Expand Down Expand Up @@ -122,9 +122,11 @@ jobs:
strategy:
matrix:
include:
- xcode: 16.2
os: macos-15
6D40 - xcode: 16.1
os: macos-15
- xcode: 15.4
- xcode: 16.0
os: macos-15
fail-fast: false
runs-on: ${{ matrix.os }}
Expand All @@ -149,10 +151,10 @@ jobs:

build-xcode15:
name: Build SDKs (Xcode 15.0)
runs-on: macos-13
runs-on: macos-15
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
env:
XCODE_VERSION: "15.0.1"
XCODE_VERSION: "15.4"
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
Expand All @@ -175,9 +177,9 @@ jobs:

automated-code-review:
name: Automated Code Review
runs-on: macos-13
runs-on: macos-15
env:
XCODE_VERSION: "15.0.1"
XCODE_VERSION: "15.4"
steps:
- uses: actions/checkout@v4.1.1
- uses: ./.github/actions/bootstrap
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-start.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
test-release:
name: Start new release
runs-on: macos-14
runs-on: macos-15
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
Expand All @@ -32,4 +32,4 @@ jobs:
GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
XCODE_VERSION: "15.0.1"
XCODE_VERSION: "15.4"
8 changes: 4 additions & 4 deletions .github/workflows/smoke-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:

automated-code-review:
name: Automated Code Review
runs-on: macos-13
runs-on: macos-15
env:
XCODE_VERSION: "15.0.1"
XCODE_VERSION: "15.4"
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
steps:
- uses: actions/checkout@v4.1.1
Expand All @@ -65,10 +65,10 @@ jobs:

build-xcode15:
name: Build SDKs (Xcode 15.0)
runs-on: macos-13
runs-on: macos-15
if: ${{ github.event_name != 'push' && github.event.inputs.snapshots != 'true' }}
env:
XCODE_VERSION: "15.0.1"
XCODE_VERSION: "15.4"
steps:
- name: Connect Bot
uses: webfactory/ssh-agent@v0.7.0
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### 🔄 Changed

# [4.71.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.71.0)
_January 28, 2025_

### 🐞 Fixed
- Fix thread reply action shown when inside a Thread [#717](https://github.com/GetStream/stream-chat-swiftui/pull/717)
- Improve voice over by adding missing labels, removing decorative images, and setting accessibility actions [#726](https://github.com/GetStream/stream-chat-swiftui/pull/726)
- Fix avatar's background color when changing the navigation bar background color [#725](https://github.com/GetStream/stream-chat-swiftui/pull/725)
### 🔄 Changed
- Deprecate unused `ChatMessage.userDisplayInfo(from:)` which only accessed cached data [#718](https://github.com/GetStream/stream-chat-swiftui/pull/718)
### 🎭 New Localizations
Add localizable keys for supporting accessibility labels:
- `channel.list.scroll-to-bottom.title`
- `channel.header.info.title`
- `message.attachment.accessibility-label`
- `message.read-status.seen-by*`
- `message.cell.sent-at`
- `composer.picker.show-all`
- `composer.audio-recording.*`

# [4.70.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.70.0)
_January 15, 2025_

Expand Down
3 changes: 3 additions & 0 deletions DemoAppSwiftUI/ChannelHeader/CustomChannelHeader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ public struct CustomChannelHeader: ToolbarContent {
.background(colors.tintColor)
.clipShape(Circle())
}
.accessibilityLabel(Text("New Channel"))
}
ToolbarItem(placement: .navigationBarLeading) {
Button {
actionsPopupShown = true
} label: {
StreamLazyImage(url: currentUserController.currentUser?.imageURL)
.accessibilityLabel("Account Actions")
.accessibilityAddTraits(.isButton)
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions DemoAppSwiftUI/ChannelHeader/NewChatView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ struct NewChatView: View, KeyboardReadable {
viewFactory: DemoAppFactory.shared,
channelController: controller
)
.modifier(TabBarVisibilityModifier())
} else {
Spacer()
}
Expand All @@ -104,6 +105,17 @@ struct NewChatView: View, KeyboardReadable {
}
}

struct TabBarVisibilityModifier: ViewModifier {

func body(content: Content) -> some View {
if #available(iOS 16.0, *) {
content.toolbar(.hidden, for: .bottomBar)
} else {
content
}
}
}

struct SelectedUserView: View {

@Injected(\.colors) var colors
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.70.0"),
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.71.0"),
],
targets: [
.target(
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<p align="center">
<a href="https://sonarcloud.io/summary/new_code?id=GetStream_stream-chat-swiftui"><img src="https://sonarcloud.io/api/project_badges/measure?project=GetStream_stream-chat-swiftui&metric=coverage" /></a>

<img id="stream-chat-swiftui-label" alt="StreamChatSwiftUI" src="https://img.shields.io/badge/StreamChatSwiftUI-8.22%20MB-blue"/>
<img id="stream-chat-swiftui-label" alt="StreamChatSwiftUI" src="https://img.shields.io/badge/StreamChatSwiftUI-8.21%20MB-blue"/>
</p>

## SwiftUI StreamChat SDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,21 @@ public struct DefaultChatChannelHeader: ToolbarContent {
resignFirstResponder()
isActive = true
} label: {
Rectangle()
.fill(Color(colors.background))
.contentShape(Rectangle())
.frame(width: 36, height: 36)
.clipShape(Circle())
.offset(x: 8)
ChannelAvatarView(
avatar: headerImage,
showOnlineIndicator: onlineIndicatorShown,
1241 size: CGSize(width: 36, height: 36)
)
.offset(x: 4)
}
.accessibilityLabel(Text(L10n.Channel.Header.Info.title))

NavigationLink(isActive: $isActive) {
LazyView(ChatChannelInfoView(channel: channel, shownFromMessageList: true))
} label: {
EmptyView()
}

ChannelAvatarView(
avatar: headerImage,
showOnlineIndicator: onlineIndicatorShown,
size: CGSize(width: 36, height: 36)
)
.offset(x: 8)
.allowsHitTesting(false)
.accessibilityHidden(true)
}
.accessibilityIdentifier("ChannelAvatarView")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public struct ChatChannelInfoView: View, KeyboardReadable {
.onTapGesture {
viewModel.addUsersShown = false
}
.accessibilityAction {
viewModel.addUsersShown = false
}
AddUsersView(
loadedUserIds: viewModel.participants.map(\.id),
onUserTap: viewModel.addUserTapped(_:)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,17 +272,7 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
scrolledId = nil
return true
} else {
let findBaseId: String? = {
if StreamRuntimeCheck._isDatabaseObserverItemReusingEnabled {
return messageId
} else {
return messageId.components(separatedBy: "$").first
}
}()
guard let baseId = findBaseId else {
scrolledId = nil
return true
}
let baseId = messageId
let alreadyLoaded = messages.map(\.id).contains(baseId)
if alreadyLoa 10000 ded {
if scrolledId == nil {
Expand Down Expand Up @@ -368,8 +358,8 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {

let previous = index - 1
let previousMessage = messages[previous]
let currentAuthorId = messageCachingUtils.authorId(for: message)
let previousAuthorId = messageCachingUtils.authorId(for: previousMessage)
let currentAuthorId = message.author.id
let previousAuthorId = previousMessage.author.id

if currentAuthorId != previousAuthorId {
temp[message.id]?.append(firstMessageKey)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public struct AttachmentPickerTypeView: View {
pickerType: .media,
selected: attachmentPickerType
)
.accessibilityLabel(Text(L10n.Composer.Picker.showAll))
.accessibilityIdentifier("PickerTypeButtonMedia")
}

Expand All @@ -65,6 +66,7 @@ public struct AttachmentPickerTypeView: View {
pickerType: .instantCommands,
selected: attachmentPickerType
)
.accessibilityLabel(Text(L10n.Composer.Suggestions.Commands.header))
.accessibilityIdentifier("PickerTypeButtonCommands")
}
case .collapsed:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ public struct AttachmentSourcePickerView: View {
isSelected: selected == .files,
onTap: onTap
)
.accessibilityLabel(L10n.Composer.Picker.file)
.accessibilityIdentifier("attachmentPickerFiles")

AttachmentPickerButton(
Expand All @@ -176,6 +177,7 @@ public struct AttachmentSourcePickerView: View {
isSelected: selected == .polls,
onTap: onTap
)
.accessibilityLabel(L10n.Composer.Polls.createPoll)
.accessibilityIdentifier("attachmentPickerPolls")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public struct SendMessageButton: View {
)
}
.disabled(!enabled)
.accessibilityAddTraits(.isButton)
.accessibilityLabel(Text(L10n.Composer.Placeholder.message))
.accessibilityIdentifier("SendMessageButton")
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,5 +85,12 @@ public struct VoiceRecordingButton: View {
}
}
)
.accessibilityRemoveTraits(.isImage)
.accessibilityAddTraits(.isButton)
.accessibilityLabel(Text(L10n.Composer.AudioRecording.start))
.accessibilityAction {
viewModel.recordingState = .recording(.zero)
viewModel.startRecording()
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ struct RecordingView: View {
HStack {
Image(systemName: "mic")
.foregroundColor(.red)
.accessibilityHidden(true)
RecordingDurationView(duration: audioRecordingInfo.duration)

Spacer()
Expand All @@ -30,6 +31,7 @@ struct RecordingView: View {
}
.foregroundColor(Color(colors.textLowEmphasis))
.opacity(opacityForSlideToCancel)
.accessibilityHidden(true)

Spacer()

Expand All @@ -38,6 +40,7 @@ struct RecordingView: View {
} label: {
Image(systemName: "mic")
}
.accessibilityLabel(Text(L10n.Composer.AudioRecording.stop))
}
.padding(.all, 12)
.overlay(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public struct VoiceRecordingContainerView<Factory: ViewFactory>: View {
public var body: some View {
VStack(spacing: 0) {
VStack {
if let quotedMessage = utils.messageCachingUtils.quotedMessage(for: message) {
if let quotedMessage = message.quotedMessage {
factory.makeQuotedMessageView(
quotedMessage: quotedMessage,
fillAvailableSpace: !message.attachmentCounts.isEmpty,
Expand Down Expand Up @@ -215,6 +215,7 @@ struct VoiceRecordingView: View {
.resizable()
.aspectRatio(contentMode: .fit)
.frame(height: 40)
.accessibilityHidden(true)
}
}
.onReceive(handler.$context, perform: { value in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ struct BottomReactionsView: View {
.onLongPressGesture {
onLongPress()
}
.accessibilityAction {
viewModel.reactionTapped(reaction)
}
}
}

Expand Down
Loading
Loading
0