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

draft: resources-ktx: Make Text compatible with compose #49

Closed
wants to merge 10 commits into from

Conversation

osipxd
Copy link
Member

@osipxd osipxd commented Mar 26, 2022

  • Text renamed to TextValue to remove conflict with Text composable
  • Splitted module to resources-ktx and resources-common
  • get(Context) replaced with get(Resources)
  • Added Resources.getString(TextValue) function
  • Added stringResource(TextValue) composable to get string in composable functions
  • Added deprecated typealias and functions for backward compatibility
  • Added constructor-like functions TextValue(...) to simplify text value creation

Better to review commit-by-commit.

Closes #47

@osipxd osipxd self-assigned this Mar 26, 2022
@osipxd osipxd force-pushed the feature/resources-compose-compat branch from d63d844 to 0a38d78 Compare March 26, 2022 20:43
@osipxd osipxd requested review from Zestxx and sonulen March 26, 2022 20:43
@osipxd osipxd changed the title Make Text compatible with compose resources-ktx: Make Text compatible with compose Mar 26, 2022
@osipxd osipxd force-pushed the feature/resources-compose-compat branch from 0a38d78 to 685ef79 Compare March 27, 2022 09:25
@osipxd osipxd force-pushed the feature/resources-compose-compat branch from bec1260 to 68ec3e3 Compare March 27, 2022 10:11
@osipxd osipxd force-pushed the feature/resources-compose-compat branch from 68ec3e3 to 6378839 Compare March 27, 2022 14:24
Copy link
Collaborator

@sonulen sonulen left a comment

Choose a reason for hiding this comment

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

👍

@sonulen
Copy link
Collaborator

sonulen commented Apr 9, 2024

Check is Stable/Immutable needed

@osipxd osipxd assigned sonulen and osipxd and unassigned osipxd Apr 10, 2024
buildSrc/src/main/kotlin/dependencies.kt Show resolved Hide resolved
resources/README.md Outdated Show resolved Hide resolved
resources/README.md Outdated Show resolved Hide resolved
resources/resources-ktx/src/main/AndroidManifest.xml Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
<manifest />
Copy link
Member Author

Choose a reason for hiding this comment

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

And this one

resources/resources-common/src/main/AndroidManifest.xml Outdated Show resolved Hide resolved
resources/README.md Outdated Show resolved Hide resolved
@osipxd osipxd removed their assignment Apr 16, 2024
@osipxd
Copy link
Member Author

osipxd commented Apr 16, 2024

@sonulen, it would be great to add some notes about this change to CHANGELOG.md

@sonulen sonulen removed the request for review from silverxcoins April 16, 2024 13:54
sonulen and others added 2 commits April 16, 2024 19:35
Also updated Readme

Co-authored-by: Osip Fatkullin <o.fatkullin@redmadrobot.com>
Also update changelog and readme
@sonulen sonulen force-pushed the feature/resources-compose-compat branch from 78367c0 to 5dbebb4 Compare April 16, 2024 18:28
dependencies {
api(jetbrains.kotlin.stdlib)
api(androidx.annotation)
api(projects.textvalue)
Copy link
Collaborator

Choose a reason for hiding this comment

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

@osipxd this dependency is not nice.

and even if we delete the Replace's, it will still remain because of Fragment.getString(text: TextValue).
maybe make a textvalue-ktx module for views? 😔

Copy link
Member Author

Choose a reason for hiding this comment

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

I think it's totaly OK

@sonulen sonulen changed the title resources-ktx: Make Text compatible with compose draft: resources-ktx: Make Text compatible with compose Apr 24, 2024
@osipxd osipxd marked this pull request as draft April 26, 2024 15:33
@sonulen
Copy link
Collaborator

sonulen commented Apr 26, 2024

No longer relevant.
MR will be broken into subtasks: refactoring, library removal.

@sonulen sonulen closed this Apr 26, 2024
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.

resources: Make Text compatible with compose
3 participants