BlueGit

ict rusty-teams

fix(agents): proposal card readable in channels

- Gap above the card in the channel feed
- Body scrolls up to 12 lines instead of clipping at 4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

metis Daniel Däschle · pushed by metis

Authored 2026-11-11 · 2 weeks ago

Hash
d4d204e5d452158dd755b42cfbe48f50de8a0bd1
Parent
96453e0a
2 files changed +6 −3
crates/app/src/views/conversation/feed.rs +4 −1
@@ -18,6 +18,7 @@ use crate::views::channel_tabs::ChannelPane;
18 18 use crate::views::composer::{Composer, ComposerEvent, ReplyPreview};
19 19 use crate::views::post_card::{PostAction, post_in_channel_card};
20 20
21 const FEED_CARD_TOP: f32 = 12.;
21 22 const REPLY_PLACEHOLDER: &str = "Reply in thread";
22 23
23 24 pub(super) struct FeedStash {
@@ -279,7 +280,9 @@ impl ConversationView {
279 280 if !self.in_feed() || self.pane != ChannelPane::Posts {
280 281 return None;
281 282 }
282 let proposal_card = self.render_proposal_card(cx);
283 let proposal_card = self
284 .render_proposal_card(cx)
285 .map(|card| div().w_full().pt(px(FEED_CARD_TOP)).child(card));
283 286 if !self.new_post_open {
284 287 let view = cx.entity().downgrade();
285 288 let announce_view = view.clone();
@@ -18,6 +18,7 @@ use crate::views::channel_tabs::ChannelPane;
18use crate::views::composer::{Composer, ComposerEvent, ReplyPreview};
18use crate::views::composer::{Composer, ComposerEvent, ReplyPreview};
19use crate::views::post_card::{PostAction, post_in_channel_card};
19use crate::views::post_card::{PostAction, post_in_channel_card};
20
20
21const FEED_CARD_TOP: f32 = 12.;
21const REPLY_PLACEHOLDER: &str = "Reply in thread";
22const REPLY_PLACEHOLDER: &str = "Reply in thread";
22
23
23pub(super) struct FeedStash {
24pub(super) struct FeedStash {
@@ -279,7 +280,9 @@ impl ConversationView {
279 if !self.in_feed() || self.pane != ChannelPane::Posts {
280 if !self.in_feed() || self.pane != ChannelPane::Posts {
280 return None;
281 return None;
281 }
282 }
282 let proposal_card = self.render_proposal_card(cx);
283 let proposal_card = self
284 .render_proposal_card(cx)
285 .map(|card| div().w_full().pt(px(FEED_CARD_TOP)).child(card));
283 if !self.new_post_open {
286 if !self.new_post_open {
284 let view = cx.entity().downgrade();
287 let view = cx.entity().downgrade();
285 let announce_view = view.clone();
288 let announce_view = view.clone();
crates/app/src/views/proposal_card.rs +2 −2
@@ -25,7 +25,7 @@ const CARD_GAP: f32 = 8.;
25 25 const BUTTON_HEIGHT: f32 = 28.;
26 26 const BUTTON_RADIUS: f32 = 7.;
27 27 const BODY_LINE_HEIGHT: f32 = 20.;
28 const BODY_MAX_LINES: f32 = 4.;
28 const BODY_MAX_LINES: f32 = 12.;
29 29 const QUOTE_BAR_WIDTH: f32 = 2.;
30 30 const THUMBNAIL_HEIGHT: f32 = 48.;
31 31 const THUMBNAIL_MAX_WIDTH: f32 = 120.;
@@ -275,7 +275,7 @@ pub fn render(
275 275 .id("proposal-text")
276 276 .w_full()
277 277 .max_h(px(BODY_LINE_HEIGHT * BODY_MAX_LINES))
278 .overflow_hidden()
278 .overflow_y_scroll()
279 279 .text_size(px(14.))
280 280 .line_height(px(BODY_LINE_HEIGHT))
281 281 .when(stale, |body| body.opacity(0.6))
@@ -25,7 +25,7 @@ const CARD_GAP: f32 = 8.;
25const BUTTON_HEIGHT: f32 = 28.;
25const BUTTON_HEIGHT: f32 = 28.;
26const BUTTON_RADIUS: f32 = 7.;
26const BUTTON_RADIUS: f32 = 7.;
27const BODY_LINE_HEIGHT: f32 = 20.;
27const BODY_LINE_HEIGHT: f32 = 20.;
28const BODY_MAX_LINES: f32 = 4.;
28const BODY_MAX_LINES: f32 = 12.;
29const QUOTE_BAR_WIDTH: f32 = 2.;
29const QUOTE_BAR_WIDTH: f32 = 2.;
30const THUMBNAIL_HEIGHT: f32 = 48.;
30const THUMBNAIL_HEIGHT: f32 = 48.;
31const THUMBNAIL_MAX_WIDTH: f32 = 120.;
31const THUMBNAIL_MAX_WIDTH: f32 = 120.;
@@ -275,7 +275,7 @@ pub fn render(
275 .id("proposal-text")
275 .id("proposal-text")
276 .w_full()
276 .w_full()
277 .max_h(px(BODY_LINE_HEIGHT * BODY_MAX_LINES))
277 .max_h(px(BODY_LINE_HEIGHT * BODY_MAX_LINES))
278 .overflow_hidden()
278 .overflow_y_scroll()
279 .text_size(px(14.))
279 .text_size(px(14.))
280 .line_height(px(BODY_LINE_HEIGHT))
280 .line_height(px(BODY_LINE_HEIGHT))
281 .when(stale, |body| body.opacity(0.6))
281 .when(stale, |body| body.opacity(0.6))