Task 20: message_list virtualised widget, message rows, composer #20

Closed
opened 2026-11-11 08:01:26 +00:00 by charles · 0 comments
Owner

Files:

  • Create: crates/fluxer-ui/src/widgets/{message_list.rs,message_row.rs,composer.rs,day_separator.rs}, crates/fluxer-ui/src/screens/main/messages.rs
  • Test: crates/fluxer-ui/tests/message_list.rs

Interfaces:

  • Consumes: timeline() selector (Task 10), rich_text (Task 19), avatar (Task 21).
  • Produces: message_list::MessageList — a custom iced Widget that lays out only visible rows: fn new(items: &[TimelineItem], measure: &dyn Fn(&TimelineItem, width) -> f32, render: &dyn Fn(&TimelineItem) -> Element) -> Self; keeps anchor: Option<(Snowflake, f32 offset)> so prepending older messages does not move content; on_reach_top: Message fired when scrolled within 600 px of the top; on_new_message_while_scrolled_up shows a "Jump to present" pill. Row heights cached by message id and width.
  • message_row::view(record, grouped, ctx): non-grouped row = 40 px avatar, name (role colour), timestamp HH:MM (tooltip full date), content; grouped row = hover timestamp in the gutter; Pending at 50 % opacity, Failed with red "Failed to send — Retry" (emits UserAction::RetrySend(nonce)); edited_timestamp adds "(edited)".
  • composer::view(draft, placeholder: "Message #channel"): multi-line text input growing to 50 % of the view; Enter sends (UserAction::SendDraft), Shift+Enter newline; emits DraftChanged on edit; typing indicator line below ("A is typing…", "A and B are typing…", "Several people are typing…").

Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 20")

**Files:** - Create: `crates/fluxer-ui/src/widgets/{message_list.rs,message_row.rs,composer.rs,day_separator.rs}`, `crates/fluxer-ui/src/screens/main/messages.rs` - Test: `crates/fluxer-ui/tests/message_list.rs` **Interfaces:** - Consumes: `timeline()` selector (Task 10), `rich_text` (Task 19), `avatar` (Task 21). - Produces: `message_list::MessageList` — a custom iced `Widget` that lays out only visible rows: `fn new(items: &[TimelineItem], measure: &dyn Fn(&TimelineItem, width) -> f32, render: &dyn Fn(&TimelineItem) -> Element) -> Self`; keeps `anchor: Option<(Snowflake, f32 offset)>` so prepending older messages does not move content; `on_reach_top: Message` fired when scrolled within 600 px of the top; `on_new_message_while_scrolled_up` shows a "Jump to present" pill. Row heights cached by message id and width. - `message_row::view(record, grouped, ctx)`: non-grouped row = 40 px avatar, name (role colour), timestamp `HH:MM` (tooltip full date), content; grouped row = hover timestamp in the gutter; `Pending` at 50 % opacity, `Failed` with red "Failed to send — Retry" (emits `UserAction::RetrySend(nonce)`); `edited_timestamp` adds "(edited)". - `composer::view(draft, placeholder: "Message #channel")`: multi-line text input growing to 50 % of the view; Enter sends (`UserAction::SendDraft`), Shift+Enter newline; emits `DraftChanged` on edit; typing indicator line below ("A is typing…", "A and B are typing…", "Several people are typing…"). --- Plan: https://git.forked.io/charles/fluxer-native/src/branch/foundation/docs/superpowers/plans/2026-11-11-foundation.md (section "Task 20")
charles added this to the Foundation milestone 2026-11-11 08:01:26 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/fluxer-native#20
No description provided.