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

Warn if user declares a CssStyle / Keyframes instance anywhere but the top level #63

Open
bitspittle opened this issue Jan 27, 2025 · 0 comments
Labels
IDE: Action An IDE action (something a user might tie to a keyboard shortcut) IDE: Inspection Some information that should be surfaced to the user (tooltip, notification, lint warning)

Comments

@bitspittle
Copy link
Contributor

For example

@Page
@Composable
fun SomePage() {
   val ExampleStyle = CssStyle { ... }
}

Styles must be declared at the top level (or inside an object), but we can't detect and warn about this case because KSP doesn't give us insight into what is happening inside methods. So we can use the IDE plugin to capture these cases.

We might also provide an action to move these properties up to the top level.

@bitspittle bitspittle added IDE: Inspection Some information that should be surfaced to the user (tooltip, notification, lint warning) IDE: Action An IDE action (something a user might tie to a keyboard shortcut) labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDE: Action An IDE action (something a user might tie to a keyboard shortcut) IDE: Inspection Some information that should be surfaced to the user (tooltip, notification, lint warning)
Projects
None yet
Development

No branches or pull requests

1 participant