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

Desktop Compose support #136

Closed
joreilly opened this issue Nov 5, 2020 · 6 comments
Closed

Desktop Compose support #136

joreilly opened this issue Nov 5, 2020 · 6 comments
Labels
wontfix This will not be worked on

Comments

@joreilly
Copy link

joreilly commented Nov 5, 2020

Checking just in case there's any plans to create version that works with new Compose for Desktop release (or has this dependency on running on Android)?

@chrisbanes
Copy link
Contributor

Likely not unfortunately. All of the image loading libraries we support have a dependency on Android.

I wonder if Coil could be refactored with a Kotlin only base lib? @colinrtwhite

The new insets support is very dependent on Android too.

@colinrtwhite
Copy link

colinrtwhite commented Nov 5, 2020

Hmm I wouldn't rule it out entirely, but it probably not. Off the top of my head here are some hurdles:

  • Okio and Coroutines are multiplatform, but OkHttp isn't. Not sure if they plan to support multiplatform, but if not we would have to add hooks to use other networking libraries (and maybe write our own disk cache).
  • Coil is very coupled with Bitmap. I'm not sure if BufferedImage or another Swing class supports everything we use.
  • Coil is very coupled with BitmapFactory. Coil's GIF, SVG, and video frame support all also depends on Java-only/Android libraries. Supporting all of Coil's functionality using Swing's APIs would be a lot of effort.
  • There's probably more as well...

@chrisbanes chrisbanes added the wontfix This will not be worked on label Nov 6, 2020
@chrisbanes
Copy link
Contributor

Makes sense to me @colinrtwhite. Marking this as 'wontfix' for now.

@outadoc
Copy link

outadoc commented May 6, 2021

I'm experimenting with Compose Desktop, and thinking of using accompanist-insets in the common code. For a lib like this one, it could make sense to provide no-ops for platforms other than Android, e.g. a function like Modifier.navigationBarsPadding() provides 0.dp on desktop.

There might be issues I haven't considered but it would be very useful not to have to provide a multiplatform wrapper myself.

@mcpiroman
Copy link

What about simple components like flowlayout which don't use any dependency on android? For now I have to copy paste the code into my compose-desktop project.

@mcpiroman
Copy link

Ok, I see there is #393

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

5 participants