Skip to content

Reaction Snapshot Overlay Mispositioned. #805

Closed
@kylelol

Description

@kylelol

Actual behaviour

I have a SwiftUI view with the following structure. On iPad I was to show the list of channels of the left 25% of the screen and the selected channel conversion on the right 75% of the screen:

    var body: some View {
        stackView
    }
    
    private var stackView: some View {
        GeometryReader { geometry in
            HStack(spacing: 0) {
                channelListView
                    .frame(width: geometry.size.width * 0.25)
                if let channel {
                    channelView(channel: channel)
                        .frame(width: geometry.size.width * 0.75)
                } else {
                    Text("No Conversation Selected")
                }
            }
        }
    }
    
    var channelListView: some View {
        StaffChatChannelListView(
            channelListController: chatClient.channelListController(
                query: ChannelListQuery(
                    filter: .and([
                        .containMembers(userIds: [chatClient.currentUserId ?? ""]),
                        .equal("student_status", to: true)
                    ])
                )
            )
        ) { channel in
            self.channel = channel
        }        
    }
    
    func channelView(channel: ChatChannel) -> some View {
        ChatChannelView(
            channelController: chatClient.channelController(
                for: channel.cid,
                messageOrdering: .topToBottom
            )
        )
        .id(channel.cid.rawValue)
    }

That renders the following screenshot:

Image

However, whenever I hold to read on a message the snapshot and overlay get completely mispositioned:

Image Image

Expected behaviour

I would expect the snapshot and overlays to be positioned correctly.

Steps to reproduce

1. Go to '...'
2. Tap on '...'
3. Scroll down to '...'
...

Which packages are you using?

No response

Which SDK version are you using?

4.76.0

Which iOS version is the issue reproducible?

iOS 18.4

Which iPhone Device is the issue reproducible?

iPad simulator

Which Xcode version are you using?

Xcode 16.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions