Skip to content

refactor(ui): common-ui module + reusable ChatListRow + MediaItem rendition fallback - #1119

Merged
bmc08gt merged 1 commit into
code/cashfrom
refactor/common-ui-chat-row
Jul 22, 2026
Merged

refactor(ui): common-ui module + reusable ChatListRow + MediaItem rendition fallback#1119
bmc08gt merged 1 commit into
code/cashfrom
refactor/common-ui-chat-row

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Foundational chat/contact UI refactor — no user-facing behavior change. First of a small series toward the tipping feature.

Changes

  • common-ui module: extract ContactAvatar out of contacts into a new shared common-ui module, and add a UserProfile overload (uses the new MediaItem accessor for its rendition).
  • chat-ui models split: move ChatAction / ChatListItem / SeparatorConfig out of the ui package into chat/models (pure moves).
  • Reusable row primitives: add a slot-based ChatListRow (avatar / title / subtitle / trailing) plus ChatRowContent (ChatRowTrailing, ChatRowSubtitle, SubtitleText) so conversation rows (contacts, and tip chats later) share the timestamp / unread-badge / preview logic. Migrate direct-send's contact row and the messenger consumers onto them.
  • MediaItem.rendition(role) / url(role): request a rendition and gracefully fall back down the quality ladder (ORIGINAL → DISPLAY → THUMBNAIL → null), skipping renditions whose blob isn't ready (+ unit test).
  • CircularIconButton: add imageSize / buttonSize overrides (backward-compatible defaults).

Testing

  • ./gradlew :apps:flipcash:app:assembleDebug — BUILD SUCCESSFUL (built standalone off code/cash)
  • :services:flipcash MediaItemTest passes

…dition fallback

- Move ContactAvatar into a new shared common-ui module (adds a UserProfile overload).
- Split chat-ui models (ChatAction/ChatListItem/SeparatorConfig) out of the ui package
  into chat/models.
- Add a slot-based ChatListRow primitive plus reusable ChatRowTrailing/ChatRowSubtitle
  (ChatRowContent); migrate ContactList and messenger onto them.
- Add MediaItem.rendition/url with graceful rendition fallback (+ MediaItemTest).
- CircularIconButton: add imageSize/buttonSize overrides.
@github-actions github-actions Bot added type: refactor Code restructuring, no behavior change area: ui Compose UI, theme, components, resources area: network gRPC, connectivity, API, exchange rates area: build-system Gradle, convention plugins, build-logic and removed type: refactor Code restructuring, no behavior change labels Jul 22, 2026
@bmc08gt
bmc08gt merged commit c036f62 into code/cash Jul 22, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the refactor/common-ui-chat-row branch July 22, 2026 17:07
bmc08gt added a commit that referenced this pull request Jul 24, 2026
…dition fallback (#1119)

- Move ContactAvatar into a new shared common-ui module (adds a UserProfile overload).
- Split chat-ui models (ChatAction/ChatListItem/SeparatorConfig) out of the ui package
  into chat/models.
- Add a slot-based ChatListRow primitive plus reusable ChatRowTrailing/ChatRowSubtitle
  (ChatRowContent); migrate ContactList and messenger onto them.
- Add MediaItem.rendition/url with graceful rendition fallback (+ MediaItemTest).
- CircularIconButton: add imageSize/buttonSize overrides.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: build-system Gradle, convention plugins, build-logic area: network gRPC, connectivity, API, exchange rates area: ui Compose UI, theme, components, resources

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant