mirror of
https://github.com/block/buzz.git
synced 2026-11-24 18:21:59 +00:00
## Summary Refresh mobile conversations with left-aligned grouped bubbles without tails, tighter consecutive-message spacing, distinct sender colors, theme-aware incoming backgrounds, and compact overlapping reaction trays. Attach reply counts beside reactions with up to three participant avatars; keep outgoing mentions and links readable in both themes. Coordinate a 500 ms composer-to-message transition with spring contraction and an anchored avatar. Message ownership follows the signing identity so profile reloads cannot recolor outgoing bubbles. Center channel activities without timestamps or icons, keep names tappable, and show two affected members plus a **See all** sheet. Hide legacy purpose activities, match media corners to bubble groups, and add iOS status-bar scroll-to-top. This is an independent mobile PR; no desktop changes or color picker. ## Validation - Full `just mobile-check` passed; `just mobile-test` passed 3,275 tests with 4 skips, plus 3 unconfigured-gateway checks. - Fixed message-widget lint warnings and a stale notification fixture that blocked analysis. Made the video-controller disposal test wait for lifecycle events instead of fixed delays. Mobile pre-push checks are enabled. - Physical iPhone previews were installed throughout development. The latest bubble, reply-avatar, contrast, and spacing updates were installed and launched on the physical iPhone. Final motion and status-bar behavior still need device visual verification; Android has automated coverage but no physical-device verification. --------- Signed-off-by: kenny lopez <klopez4212@gmail.com>
81 lines
2.5 KiB
Dart
81 lines
2.5 KiB
Dart
import 'package:flutter/rendering.dart';
|
|
import 'package:flutter/widgets.dart';
|
|
|
|
/// Grows a message row upward while keeping the child's bottom anchored.
|
|
class LocalSendRow extends SingleChildRenderObjectWidget {
|
|
/// Creates a row driven by the same progress as its bubble entrance.
|
|
const LocalSendRow({super.key, required this.progress, required super.child});
|
|
|
|
/// Fraction of the final row height allocated in the conversation.
|
|
final double progress;
|
|
@override
|
|
RenderObject createRenderObject(BuildContext context) =>
|
|
_RenderSendRow(progress);
|
|
@override
|
|
void updateRenderObject(
|
|
BuildContext context,
|
|
covariant RenderProxyBox renderObject,
|
|
) {
|
|
(renderObject as _RenderSendRow).setProgress(progress);
|
|
}
|
|
}
|
|
|
|
class _RenderSendRow extends RenderProxyBox {
|
|
_RenderSendRow(this.progress);
|
|
double progress;
|
|
void setProgress(double value) {
|
|
if (progress == value) return;
|
|
progress = value;
|
|
markNeedsLayout();
|
|
markNeedsSemanticsUpdate();
|
|
}
|
|
|
|
Offset get childOffset => Offset(0, size.height - (child?.size.height ?? 0));
|
|
@override
|
|
void performLayout() {
|
|
child?.layout(constraints, parentUsesSize: true);
|
|
// A zero-extent item can be culled by the indexed list before the lift
|
|
// begins, briefly removing its avatar. Keep it laid out from the first frame.
|
|
size = constraints.constrain(
|
|
Size(
|
|
child?.size.width ?? 0,
|
|
(child?.size.height ?? 0) * progress.clamp(0.0001, 1.0),
|
|
),
|
|
);
|
|
}
|
|
|
|
@override
|
|
Rect get paintBounds => super.paintBounds.expandToInclude(
|
|
child?.paintBounds.shift(childOffset) ?? Rect.zero,
|
|
);
|
|
|
|
@override
|
|
void paint(PaintingContext context, Offset offset) {
|
|
if (child case final child?) {
|
|
context.paintChild(child, offset + childOffset);
|
|
}
|
|
}
|
|
|
|
@override
|
|
void applyPaintTransform(RenderBox child, Matrix4 transform) {
|
|
transform.translateByDouble(childOffset.dx, childOffset.dy, 0, 1);
|
|
}
|
|
|
|
@override
|
|
bool hitTest(BoxHitTestResult result, {required Offset position}) {
|
|
if (!paintBounds.contains(position)) return false;
|
|
if (!hitTestChildren(result, position: position)) return false;
|
|
result.add(BoxHitTestEntry(this, position));
|
|
return true;
|
|
}
|
|
|
|
@override
|
|
bool hitTestChildren(BoxHitTestResult result, {required Offset position}) =>
|
|
result.addWithPaintOffset(
|
|
offset: childOffset,
|
|
position: position,
|
|
hitTest: (result, position) =>
|
|
child?.hitTest(result, position: position) ?? false,
|
|
);
|
|
}
|