Rules Hub
Coding Rules Library
← Back to all rules
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
mobile ruleP2stack specificStack: android
androidcomposepreviewconvention
Order @Preview before @Composable on preview functions
For preview functions, put @Preview above @Composable so previews are consistently annotated.
PR: profico-mining-2026-06Created: Jul 26, 2026
Bad example
Old codekotlin
| 1 | @Composable @Preview fun CardPreview() { ... } |
Explanation (EN)
Objašnjenje (HR)
Good example
New codekotlin
| 1 | @Preview @Composable fun CardPreview() { ... } |
Explanation (EN)
Objašnjenje (HR)