feat(samples): device switcher lobby - #1311
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v2 #1311 +/- ##
=====================================
Coverage ? 19.22%
=====================================
Files ? 342
Lines ? 26882
Branches ? 0
=====================================
Hits ? 5169
Misses ? 21713
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Converted to draft as the button specs changed: https://www.figma.com/design/W7pOBtNINkAh14XdCJQKuB/Video-SDK-Design?node-id=411-27303&m=dev#1894859878 |
The lobby pickers were outline buttons, which gave them pill corners and the button's hover treatment. Design has since specified a dedicated `Web / Select Input`, and the lobby uses it for exactly these two fields. Adds a dogfooding-local StreamSelectInput: the field only, so one field can still drive two selections the way the audio field picks a microphone and a speaker from a single menu. Density follows StreamTextInput rather than the denser web spec, so a select and a text input line up in a form. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
StreamSelectInput, StreamContextMenuAnchor, StreamContextMenuHeading and StreamRadioIndicator implement design-system components that stream_core_flutter does not ship yet. They were dogfooding-local; move them to src/widgets/design_system_candidates so the SDK and every sample can use them, and so there is one obvious place to lift them out of when they graduate to core. They now depend on stream_core_flutter directly rather than on the video barrel, and the select input gets a widget test covering its border and ring states, which cannot be exercised from the running app. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Adds golden tests for the widgets this branch introduces — StreamSelectInput (type by state matrix plus the focus ring), StreamContextMenuHeading and StreamRadioIndicator — in both brightnesses, plus widget tests for StreamContextMenuAnchor: that it opens on the field press, and that it sizes menu items to the design's row rather than the stream_core_flutter default. The setup they run on needed work first; every committed golden carried the debug banner over its corner. Following stream-chat-flutter: * TestWrapper now pins what a snapshot could otherwise pick up from the host: debugShowCheckedModeBanner off, TargetPlatform.android, the `en` locale, and both Stream themes as extensions. It also swaps its Scaffold for a Material, so a snapshot is the size of the widget and needs no constraints. * Stream text styles carry no font family, and one that replaces rather than merges into the ambient style (core's menu items, via TextButton) rendered as Ahem black bars. The test theme pins Roboto. * CI goldens are only compared on CI, as a local run cannot reproduce Linux-generated PNGs; platform goldens are only compared locally. * streamGoldenTest routes every snapshot through TestWrapper, dart_test.yaml declares the `golden` tag, and test/README.md documents the workflow. The CI variant keeps its text obscuring, so nothing painted into an Overlay can be snapshotted — that capture path drops it and the golden comes out blank instead of failing. Hence the menu panel gets metric assertions rather than a snapshot; test/README.md says so. No goldens/ci PNGs are committed here: the existing ones no longer match (the banner is gone) and the new tests have none yet. Dispatch the update_goldens workflow from this branch to generate all of them on Linux. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`melos run generate:all` was copied from the main workflow, which needs it to analyze the sample app (dogfooding's env.g.dart is gitignored). The golden run does not: `update:goldens` is scoped to packages depending on alchemist, which is stream_video_flutter alone, and that package has no generated sources — the OpenAPI models and freezed classes in stream_video are all committed. So the step spent a full build_runner pass over ~1,170 generated files to produce output already in the tree. Also drops `fetch-depth: 0`; the auto-commit action only needs the branch tip. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🎯 Goal
Fixes FLU-716
Make the device control selection closer to design: https://www.figma.com/design/W7pOBtNINkAh14XdCJQKuB/Video-SDK-Design?node-id=408-42575&m=dev
🛠 Implementation details
I've updated the call controls in the lobby screen.
On purpose I did not move anything to the SDK yet. The
StreamRadioIndicatorand theStreamContextMenuAnchorare candidates for core. TheLobbyDeviceControlscan move to the stream_video_flutter sdk. We should do that when we finalize the complete new lobby component.Also out of scope is the mic volume as that needs webrtc changes, see FLU-714

🎨 UI Changes
Add relevant screenshots