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

Use cardType property instead of theme, since the property is Deprecated #653

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

fumiya-kume
Copy link

Issue

  • close N/A

Overview (Required)

  • The theme property is Deprecated in ProfileCardJson, so replace it.

Links

Screenshot (Optional if screenshot test is present or unrelated to UI)

Before After

Movie (Optional)

Before After

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 19, 2024 14:36 Inactive
@takahirom
Copy link
Member

Thanks! We need the property for compatibility with older versions of the JSON, as you can see from the failing test. How about adding a comment like "This exists for compatibility" instead of removing it?

@fumiya-kume
Copy link
Author

@takahirom Thanks! I added again with explain comment.
How about this?

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 19, 2024 15:34 Inactive
Copy link

Detekt check failed. Please run ./gradlew detekt --auto-correct to fix the issues.

@@ -11,7 +11,10 @@ internal data class ProfileCardJson(
val occupation: String,
val link: String,
val image: String,
@Deprecated("Use cardType instead", replaceWith = ReplaceWith("cardType"))
@Deprecated(
"Let's use cardType, but keep it for compatibility.",
Copy link
Member

Choose a reason for hiding this comment

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

Thank you for adding this. This deprecation message will be shown when developers use this field, so personally the phrase 'keep it' might be a little difficult for developers to understand what they need to do. I recommend adding a separate comment to clarify.

Copy link
Author

Choose a reason for hiding this comment

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

Gotcha, let me update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants