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

iOS: TabView > UITableViewController > UIHostingController > Compose Configuration Causes Recompose and Horizontal Scroll Issues #3879

Open
75py opened this issue Oct 29, 2023 · 4 comments
Assignees
Labels
bug Something isn't working ios reproduced

Comments

@75py
Copy link

75py commented Oct 29, 2023

Describe the bug
When integrating Compose Multiplatform within an iOS project that uses TabView (SwiftUI), UITableViewController, and UIHostingController, I experience the following issues:

  1. Recomposition does not occur when pressing a button to change text in a Compose view. However, recomposition happens when I scroll the UITableView.
  2. Horizontal scrolling is disabled in Compose views.

Affected platforms

  • iOS

Versions

  • Kotlin version*: 1.9.10
  • Compose Multiplatform version*: 1.5.3, 1.5.10-rc02
  • OS version(s)*: iOS 17
  • OS architecture: arm64

To Reproduce

  1. Clone the minimum project at https://github.com/75py/Multiplatform-Sandbox
  2. Navigate to the tab containing the UITableView.
  3. Try clicking on a button inside the Compose view; observe that the text doesn't change.
  4. Try scrolling horizontally; observe that horizontal scrolling is disabled.
  5. Scroll the UITableView; observe that recomposition happens.

Main Code Files

Expected behavior

  1. The Compose view should recompose when pressing a button to change text.
  2. Horizontal scrolling should work as expected in Compose views.

Screenshots

2023-10-29.20-36-36.mp4

Additional context
The issue seems to occur only when using this specific configuration of TabView, UITableViewController, and UIHostingController.

@75py 75py added bug Something isn't working submitted labels Oct 29, 2023
@m-sasha
Copy link
Contributor

m-sasha commented Oct 29, 2023

LazyRow is already scrollable. You don't need to add a horizontalScroll modifier to it.

@75py
Copy link
Author

75py commented Oct 29, 2023

@m-sasha Thank you for the quick response. I've removed the horizontalScroll modifier from LazyRow as you suggested and pushed the changes. However, the issue still persists. Horizontal scrolling is not enabled in the Compose view.

Here is the commit where I made the changes: 75py/Multiplatform-Sandbox@f925bcd

Would appreciate any further guidance on this.

@75py
Copy link
Author

75py commented Feb 12, 2024

I've recently updated the Compose plugin to version 1.6.0-beta01, and I'd like to share some updates regarding the issues previously reported:

  1. The issue where the Compose view did not recompose when pressing a button to change text has been resolved with this update. This fix significantly improves the user interaction within Compose views on iOS.

  2. Unfortunately, the problem with horizontal scrolling being disabled in Compose views remains unresolved. This continues to affect the usability of horizontally scrollable components in our iOS application.

You can view the changes made in this update here: Tag Link.

I hope this information helps in tracking the progress of these issues. Looking forward to any suggestions or further updates on the unresolved matter.

2024-02-12.12-07-52.mp4

@tipsypotato
Copy link

Same here, looking forward to any workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ios reproduced
Projects
None yet
Development

No branches or pull requests

4 participants