Skip to content

dev#8

Merged
judahben149 merged 1 commit intomainfrom
dev
Jul 28, 2025
Merged

dev#8
judahben149 merged 1 commit intomainfrom
dev

Conversation

@judahben149
Copy link
Copy Markdown
Owner

No description provided.

This commit significantly refactors the chat screen UI and introduces several new components to improve user experience and code organization.

Key changes include:
- **`EclairApp.kt`**: Wrapped the `ChatScreen` with `Scaffold` for better layout structure.
- **`ChatScreen.kt`**:
    - Refactored `ChatScreen` into `ChatScreenContent` for better modularity and previewability.
    - Added `WindowInsets` padding for system bars and IME to handle keyboard overlap.
    - Set background color using `MaterialTheme.colorScheme.background`.
    - Integrated new components: `ChatHeader`, `ChatMessagesList`, and `MessageInputArea`.
    - Updated sample data in `ChatScreenPreview` to reflect new message structure and streaming state.
- **New Components:**
    - **`ChatHeader.kt`**: Created a `TopAppBar` component to display the chat title.
    - **`MessageBubble.kt`**: Introduced a reusable `Card` based component to display individual chat messages with customizable background, text color, and a streaming indicator (linear progress bar).
    - **`SenderMessage.kt`**: A component that utilizes `MessageBubble` to display messages sent by the user, aligned to the end.
    - **`ReceiverMessage.kt`**: A component that utilizes `MessageBubble` to display messages received from the assistant, aligned to the start, and includes a visual cue for streaming messages.
    - **`ChatMessagesList.kt`**: A `LazyColumn` component to display the list of chat messages, with auto-scrolling to the latest message.
    - **`MessageInputArea.kt`**: A `Card` based component containing an `OutlinedTextField` for message input and an `IconButton` to send messages. It handles keyboard actions and input validation.
- **Dependencies:** Added `compose.materialIconsExtended` to `build.gradle.kts` for access to more icons.

These changes provide a more polished and functional chat interface, with clear separation of concerns for UI elements.
@judahben149 judahben149 merged commit e808b7f into main Jul 28, 2025
1 check passed
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.

1 participant