Skip to content

Commit b7fd474

Browse files
committed
chore: format code and fix lint issues
1 parent a69dfed commit b7fd474

3 files changed

Lines changed: 29 additions & 20 deletions

File tree

app/containers/MediaCallHeader/MediaCallHeader.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,11 @@ const MediaCallHeader = () => {
4848

4949
return (
5050
<Animated.View
51-
style={[styles.header, { ...defaultHeaderStyle, borderBottomColor: colors.strokeLight, paddingTop: insets.top + 12 }, animatedStyle]}
51+
style={[
52+
styles.header,
53+
{ ...defaultHeaderStyle, borderBottomColor: colors.strokeLight, paddingTop: insets.top + 12 },
54+
animatedStyle
55+
]}
5256
pointerEvents={shouldHide ? 'none' : 'auto'}
5357
testID='media-call-header'>
5458
<Collapse />

app/views/CallView/components/CallButtons.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ export const CallButtons = () => {
5252
<Animated.View
5353
style={[styles.buttonsContainer, { borderTopColor: colors.strokeExtraLight }, containerStyle]}
5454
pointerEvents={controlsVisible ? 'auto' : 'none'}
55-
testID='call-buttons'
56-
>
55+
testID='call-buttons'>
5756
<View style={styles.buttonsRow}>
5857
<CallActionButton
5958
icon={isSpeakerOn ? 'audio' : 'audio-disabled'}

progress-controls-animation.md

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
Each slice is independently demoable and builds on the previous one.
66

7-
| Order | Title | Type | Blocked by | Status |
8-
|-------|-------|------|------------|--------|
9-
| 1 | feat: add `controlsVisible` state and actions to call store | AFK | None | [x] |
10-
| 2 | feat: tap CallerInfo to toggle controls visibility | AFK | #1 | [x] |
11-
| 3 | feat: animate CallButtons slide-down + fade on toggle | AFK | #2 | [x] |
12-
| 4 | feat: animate MediaCallHeader slide-up + fade on toggle | AFK | #2 | [x] |
13-
| 5 | feat: auto-show controls on call state changes | AFK | #1 | [x] |
14-
| 6 | chore: update tests and snapshots for controls animation | AFK | #2, #3, #4 | [x] |
7+
| Order | Title | Type | Blocked by | Status |
8+
| ----- | ----------------------------------------------------------- | ---- | ---------- | ------ |
9+
| 1 | feat: add `controlsVisible` state and actions to call store | AFK | None | [x] |
10+
| 2 | feat: tap CallerInfo to toggle controls visibility | AFK | #1 | [x] |
11+
| 3 | feat: animate CallButtons slide-down + fade on toggle | AFK | #2 | [x] |
12+
| 4 | feat: animate MediaCallHeader slide-up + fade on toggle | AFK | #2 | [x] |
13+
| 5 | feat: auto-show controls on call state changes | AFK | #1 | [x] |
14+
| 6 | chore: update tests and snapshots for controls animation | AFK | #2, #3, #4 | [x] |
1515

1616
---
1717

@@ -20,6 +20,7 @@ Each slice is independently demoable and builds on the previous one.
2020
**User stories:** 1, 2, 8
2121

2222
**What to do:**
23+
2324
- Add `controlsVisible: boolean` (default `true`) to `CallStoreState` in useCallStore
2425
- Add `toggleControlsVisible()` action — flips the boolean
2526
- Add `showControls()` action — sets `controlsVisible: true`
@@ -35,6 +36,7 @@ Each slice is independently demoable and builds on the previous one.
3536
**User stories:** 1, 2, 6, 7
3637

3738
**What to do:**
39+
3840
- Wrap CallerInfo outer `<View>` with `<Pressable onPress={toggleControlsVisible} testID='caller-info-toggle'>`
3941
- Wrap caller name `callerRow` in `<Animated.View>` with fade + slight slide animation driven by `controlsVisible`
4042
- Avatar stays unwrapped — always visible and centered
@@ -49,6 +51,7 @@ Each slice is independently demoable and builds on the previous one.
4951
**User stories:** 1, 2, 5, 10
5052

5153
**What to do:**
54+
5255
- Replace outer `<View>` in CallButtons with `<Animated.View>`
5356
- Add `useAnimatedStyle` for opacity (1→0) and translateY (0→100) driven by `controlsVisible`
5457
- Set `pointerEvents={controlsVisible ? 'auto' : 'none'}` to block ghost taps
@@ -62,6 +65,7 @@ Each slice is independently demoable and builds on the previous one.
6265
**User stories:** 1, 2, 5, 11
6366

6467
**What to do:**
68+
6569
- Replace call-active `<View>` in MediaCallHeader with `<Animated.View>`
6670
- Add `useAnimatedStyle` for opacity (1→0) and translateY (0→-100) driven by `controlsVisible`
6771
- Guard: only animate when `focused === true`. When `focused === false` (collapsed header bar), always show.
@@ -76,6 +80,7 @@ Each slice is independently demoable and builds on the previous one.
7680
**User stories:** 3, 4, 8, 9
7781

7882
**What to do:**
83+
7984
- In `handleStateChange` (inside `setCall`): add `set({ controlsVisible: true })`
8085
- In `handleTrackStateChange` (inside `setCall`): add `set({ controlsVisible: true })`
8186
- In `toggleFocus`: set `controlsVisible: true` when toggling (always reveal on focus change)
@@ -90,6 +95,7 @@ Each slice is independently demoable and builds on the previous one.
9095
**User stories:** All (verification)
9196

9297
**What to do:**
98+
9399
- **Store tests:** `toggleControlsVisible` flips value, `showControls` sets true, auto-show on stateChange/trackStateChange, reset restores true, toggleFocus sets true
94100
- **CallerInfo tests:** pressing `caller-info-toggle` calls `toggleControlsVisible`, snapshot update
95101
- **CallButtons tests:** `pointerEvents='none'` when `controlsVisible=false`, snapshot update
@@ -101,15 +107,15 @@ Each slice is independently demoable and builds on the previous one.
101107

102108
## Design Decisions Log
103109

104-
| Question | Decision |
105-
|----------|----------|
106-
| What hides? | Everything except avatar — header, buttons, caller name/text |
107-
| Auto-hide timer? | No — explicit tap only |
108-
| Animation style? | Slide + fade, ~300ms with `withTiming` |
109-
| Auto-show on state changes? | Yes — stateChange + trackStateChange events |
110-
| New state or reuse `focused`? | New `controlsVisible` boolean, orthogonal to `focused` |
111-
| MediaCallHeader location? | Stays at app root, subscribes to store independently |
112-
| Tap target? | Center CallerInfo area only (not buttons) |
110+
| Question | Decision |
111+
| ----------------------------- | ------------------------------------------------------------ |
112+
| What hides? | Everything except avatar — header, buttons, caller name/text |
113+
| Auto-hide timer? | No — explicit tap only |
114+
| Animation style? | Slide + fade, ~300ms with `withTiming` |
115+
| Auto-show on state changes? | Yes — stateChange + trackStateChange events |
116+
| New state or reuse `focused`? | New `controlsVisible` boolean, orthogonal to `focused` |
117+
| MediaCallHeader location? | Stays at app root, subscribes to store independently |
118+
| Tap target? | Center CallerInfo area only (not buttons) |
113119

114120
## References
115121

0 commit comments

Comments
 (0)