Skip to content

Compose workspace config #1450

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 19 commits into from
Feb 10, 2023

Conversation

millandavid
Copy link

For review by Rosário Fernandes

Created an option to use Config using Jetpack Compose.

Viewmodels is the next step to be implemented to this Quickstart rather than having the FirebaseActivity file.

In the MainComposeActivity file that was created, please review Composables to advise on whether to continue passing Lambdas or if a Context would be better suitable in this scenario to pass.

Added compose as an option to use Firebase
Added Firebase Config functionality
@thatfiredev thatfiredev self-requested a review January 24, 2023 18:26
Copy link
Member

@thatfiredev thatfiredev left a comment

Choose a reason for hiding this comment

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

@millandavid Thanks for your PR!

I've added some initial comments that I think we should address before going into the ViewModel step.

millandavid and others added 5 commits January 24, 2023 22:02
Added initial PR changes that Rosário  had mentioned.
Combined the text and button into the parent composable function
Updated the MainComposeActivity.kt to remove the wildcard imports and replaced with the appropriate ones
Corrected exceeded max line length error by putting the comment under the code. Corrected build.gradle code to have proper syntax
millandavid and others added 11 commits January 27, 2023 10:06
Updated MainComposeAcitvity.kt to correct lint error
A couples of things happened here:
- Renamed `fetchConfig()` to `fetchRemoteConfig()`
- Created ViewModel Factory to help inject VM dependencies
- Moved FirebaseRemoteConfig initialization to the ViewModel (The UI now calls these methods when the screen is created, through a DisposableEffect)
- The default value from the XML file is now shown when the screen is first shown
Restructured the UI by implementing Scaffold
Added scaffold and fillMaxWidth imports. Currently having issues with the Scaffold and the experimental wanting it to use wildcard statements
Migrated the code from Material 3 to 2. Also updated Gradle file to use Compose 1.3
Added snackbar when config button is pressed.
Copy link
Member

@thatfiredev thatfiredev left a comment

Choose a reason for hiding this comment

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

Thank you so much @millandavid !!

@thatfiredev thatfiredev merged commit 531aae6 into firebase:compose Feb 10, 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.

2 participants