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

Compose object imports #874

Merged
merged 4 commits into from
Jan 29, 2023

Conversation

giovannimartusciello
Copy link
Contributor

Issue #, if available: Selectively import on compose class was not available

Description of changes:
Added a formatHelper for import option + added map function in the compose template

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@cgal-capco
Copy link

This is amazing! It's exactly what I miss to convert to Android Compose objects

@martymiller
Copy link

Really need this. Is there a reason it was never merged?

@cjgaliana
Copy link

cjgaliana commented Jan 25, 2023

+1 @martymiller

Ideally the imports should be automatically imported from the classes and functions used on whether the applied transforms actually need.

However, at the moment the current code hardcodes 2 imports

import androidx.compose.ui.graphics.Color
import androidx.compose.ui.unit.*

I think this change, although it won't reach the desired goal, it will improve the current code allowing to import more than the 2 hardcoded imports.

@giovannimartusciello
Copy link
Contributor Author

@dbanksdesign can we request an approve for this? in order to integrate this feature?

@giovannimartusciello
Copy link
Contributor Author

Really need this. Is there a reason it was never merged?

Not really, we are waiting for an approve

Copy link
Member

@dbanksdesign dbanksdesign left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Apologies for the lateness of this review, been very busy, but trying to dig through PRs and issues now. Thank you for understanding.

@dbanksdesign dbanksdesign merged commit 8373721 into amzn:main Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants