mirror of
https://github.com/block/buzz.git
synced 2026-11-24 10:12:19 +00:00
## Summary Selecting a chat or channel in the expanded conversation layout now switches immediately, while opening a deeper thread keeps its navigation animation. The selected chat reuses the native iOS header and blur surface so switching conversations does not flash; each conversation still owns its own editor and timeline state. Search and Activity now slide as opaque sheets over stationary native controls, revealing them progressively on dismissal. Activity keeps its existing title styling with Close in the Duo rail; expanded Search gains top spacing. Compact navigation and the transparent toast composition path are preserved. ## Validation - Final head `bd92c40e86`: full mobile suite 5,132 passed, 71 skipped; 27 crypto tests passed. Required push checks passed. - Native iOS suite: 115 passed. Formatting and analysis clean. - Header-retention regression fails with the retention key removed and passes after restoration. - Recorded repeated native-header switches in a wide iPad simulator fixture, plus Search/Activity transition checks in the Duo simulator. - Owner verified both sheet motion and chat switching on the physical Duo. The final ordinary-iPad Activity guard is covered separately by tests. ## Snapshots Synthetic chat fixture using the actual conversation-pane routes and UIKit header on an iPad simulator. These illustrate two consecutive selections; they are not screenshots of the owner's chats or the Duo rail geometry. Recorded transition frames were also inspected for continuous blur. | Design selected | Mobile selected | | --- | --- | |  |  | --------- Signed-off-by: kenny lopez <klopez4212@gmail.com> Co-authored-by: Terp <5856f6900e8e0a4e0ea1f4f8d2ee33e4753d2119bc122f94ecafc660b46c0511@buzz.block.builderlab.xyz>
48 lines
1.6 KiB
Dart
48 lines
1.6 KiB
Dart
import 'package:flutter/foundation.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:flutter/rendering.dart' show PlatformViewHitTestBehavior;
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
/// Starts an unclipped Flutter composition slice above preceding native views.
|
|
///
|
|
/// iOS applies a platform view's rounded clip to the Flutter overlay slice
|
|
/// painted after it. Start an unclipped native slice so a sheet's close button
|
|
/// cannot clip later sheet or toast content beneath earlier native views.
|
|
class IosCompositionLayer extends HookWidget {
|
|
const IosCompositionLayer({super.key, required this.child, this.color});
|
|
|
|
final Widget child;
|
|
|
|
/// An opaque native backing for a moving full-screen sheet.
|
|
final Color? color;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final ready = useState(false);
|
|
if (defaultTargetPlatform != TargetPlatform.iOS) return child;
|
|
final surface = ExcludeSemantics(
|
|
child: ExcludeFocus(
|
|
child: UiKitView(
|
|
key: ValueKey(color),
|
|
viewType: 'buzz/toast_layer',
|
|
hitTestBehavior: PlatformViewHitTestBehavior.transparent,
|
|
creationParams: {'color': color?.toARGB32()},
|
|
creationParamsCodec: const StandardMessageCodec(),
|
|
onPlatformViewCreated: (_) => ready.value = true,
|
|
),
|
|
),
|
|
);
|
|
return Stack(
|
|
fit: StackFit.expand,
|
|
children: [
|
|
if (color != null)
|
|
Positioned.fill(child: surface)
|
|
else
|
|
Positioned(top: 0, left: 0, width: 1, height: 1, child: surface),
|
|
if (color != null || ready.value) child,
|
|
],
|
|
);
|
|
}
|
|
}
|