Commit Graph

2 Commits

Author SHA1 Message Date
Diem Nguyen
133c883b8c fix(mobile): confirm before starting a Huddle from the header (#9155)
Tapping the headphones button in a channel header used to start a Huddle
straight away, which turned on the microphone and posted "Huddle
started" to the channel. The button is easy to hit by accident. Now,
when no Huddle is running there, the button asks "Start a Huddle?"
first, with Cancel and Start Huddle.

- `showConfirmation` in `shared/widgets/confirmation_dialog.dart` adds a
non-destructive mode to the shared confirm helper.
`showDestructiveConfirmation` now calls it with `destructive: true`, so
existing callers behave the same. On iOS the native UIKit alert reads a
new `destructive` argument and uses `.default` style instead of
`.destructive` when it's false. On other platforms the confirm button
keeps the default `FilledButton` style instead of the error color.
- `_huddleNavigationAction` asks before calling `start`. That covers
both the Material header button and the iOS native navigation action.
Opening or joining a Huddle that's already running stays one tap, and so
do the explicit "Start new" buttons inside the Huddle sheets.

Companion to block/buzz-app#2687, which adds the same confirmation on
desktop. buzz-app#2660 also moves the desktop button away from the
members button, but there's no equivalent move on mobile: the headphones
is the only action in the header.

### Screenshots

Rendered by a scratch widget test from the real `ChannelDetailPage`
(Android/Material path, Inter loaded) at 390×844. The scratch test has
been removed. On iOS, the same confirmation shows as a native UIKit
alert, which isn't captured here because this machine has no iOS
Simulator.

Before: tapping the headphones goes straight into a call.

<img
src="https://github.com/user-attachments/assets/adced280-2abd-44ad-a079-1c83749892a0"
width="300" alt="Before">

After, light and dark, cropped to the new dialog:

| Light | Dark |
| --- | --- |
| ![After,
light](https://github.com/user-attachments/assets/2e7c5bc3-ebd9-451b-9b20-5d916947722c)
| ![After,
dark](https://github.com/user-attachments/assets/999c1798-9d91-4b83-b8c2-eb8490da6bf0)
|

### Validation

- The existing journey "community transition cancels and awaits an
in-flight Huddle start" now taps the button and checks that the dialog
appears, that Cancel closes it without publishing anything, and that
tapping again and choosing Start Huddle starts the call. With the
confirm removed, this test fails.
- `channel_member_profile_actions_test` checks that destructive
confirmations still send `destructive: true` to the iOS bridge.
- Full `flutter test`: 4,508 passed. `flutter analyze` and `dart format`
are clean.
- Not yet checked: the iOS native alert on a device or simulator, and a
human trying it.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Signed-off-by: Diem Nguyen <diem@squareup.com>
Co-authored-by: Fizz <6be7be23ec5bba868f3e1db5ec86013d76bd1a293dce5b435a192158fec13641@buzz.block.builderlab.xyz>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-05 16:33:07 -08:00
klopez4212
d2da104d94 feat(mobile): add animated community switcher (#8076)
## Summary

Replace the community switch sheet with a two-column picker. Selection
enlarges the avatar, waits with the voice-note loader for destination
channel content and layout to settle, then follows a curved path into
the header.

Cache raster icons at a maximum 512-pixel size and accept only
resource-free emoji SVGs. Cancel timed-out or disposed downloads without
delaying content readiness. Animate Edit badges in place, and open Add
Community on the pairing welcome page. Community removal lives only in
the switcher’s Edit mode. Keep the flow shared across Android/iOS, with
native iOS controls and removal confirmation, and clear navigation
backgrounds at rest.

### Related issue

Related to #8070 (community icon refresh/caching).

### Testing

- 122 focused Flutter regression tests and seven native iOS tests passed
after merging the latest navigation changes from `main`. Earlier feature
build installed and launched on a physical iPhone.
- Full mobile pre-push checks passed; regression coverage includes
gradient rendering, rejected/oversized icons, bounded persisted raster
decoding, SVG resource rejection and cache migration, timeout/disposal
cancellation, disconnected destination channels, degraded unread-history
settlement, and switching while icons refresh. Full `just ci` stopped
during Rust checks for low disk space. Hosted CI remains required.
- [Grid and Edit
previews](https://github.com/block/buzz/pull/8076#issuecomment-5977838957).

---------

Signed-off-by: kenny lopez <klopez4212@gmail.com>
2026-10-04 14:11:39 +01:00