Skip to content

Commit 16e800c

Browse files
committed
docs: add sheet preview and figma rules
1 parent d909b77 commit 16e800c

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ suspend fun getData(): Result<Data> = withContext(Dispatchers.IO) {
184184
- ALWAYS ensure a method exist before calling it
185185
- ALWAYS remove unused code after refactors
186186
- ALWAYS follow Material3 design guidelines for UI components
187+
- When building from a Figma frame, reuse only scaffolding (sheet host, `SheetTopBar`, buttons, typography); NEVER swap a design-specific illustration/animation for a lookalike. Export the frame's assets via the Figma MCP and read animation timing/easing/direction from prototype reactions (`use_figma``node.reactions`)
187188
- ALWAYS ensure proper error handling in coroutines
188189
- ALWAYS acknowledge datastore async operations run synchronously in a suspend context
189190
- NEVER use `runBlocking` in suspend functions
@@ -218,6 +219,7 @@ suspend fun getData(): Result<Data> = withContext(Dispatchers.IO) {
218219
- ALWAYS follow the patterns of the existing code in `app/src/test` when writing new unit tests
219220
- ALWAYS be mindful of thread safety when working with mutable lists & state
220221
- ALWAYS split screen composables into parent accepting viewmodel + inner private child accepting state and callbacks `Content()`
222+
- ALWAYS preview an in-sheet screen as `BottomSheetPreview { Content(modifier = Modifier.sheetHeight()) }` (see `SendErrorScreen.kt`); `Content` uses `modifier.fillMaxSize()` and never hardcodes a `SheetSize`
221223
- ALWAYS name lambda parameters in a composable function using present tense, NEVER use past tense
222224
- ALWAYS use `whenever { mock.suspendCall() }` for suspend stubs if not inside `test{}` fn blocks
223225
- ALWAYS use `whenever(mock.call())` for non-suspend stubs and for suspend stubs if inside `test{}` fn blocks

0 commit comments

Comments
 (0)