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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt at a more natural Placeholder API #2274

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

yschimke
Copy link
Collaborator

WHAT

Attempt at a more natural Placeholder API. Use Chip with empty strings instead of PlaceholderChip.

WHY

Use the PlaceholderState API as John intended.

HOW

Checklist 馃搵

  • Add explicit visibility modifier and explicit return types for public declarations
  • Run spotless check
  • Run tests
  • Update metalava's signature text files

@yschimke yschimke requested a review from garanj June 21, 2024 08:11
Copy link
Collaborator

@garanj garanj left a comment

Choose a reason for hiding this comment

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

Looks good!

@@ -360,6 +380,34 @@ public fun Chip(
}
}

@Composable
fun Modifier.placeholderIf(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Cool!

@yschimke
Copy link
Collaborator Author

@garanj I'll add it to all the material Composables, and then circulate the screenshots.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fix before landing

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.

None yet

2 participants