Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Release v0.3.7 #2859

Merged
merged 21 commits into from
Feb 24, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
cc51d86
fix(mobile): auth redirect and 2fa support (#2829)
hyoban Feb 21, 2025
c0afb39
feat(mobile): render as read (#2835)
hyoban Feb 21, 2025
ac1332e
chore: fix bug where clicking the Dock icon cannot reopen the window …
songhanlin Feb 21, 2025
7cfa888
chore: fix bug where Follow window always stays on top (#2837)
songhanlin Feb 21, 2025
8dbb634
feat(mobile): add native iOS toast module with SPIndicator
Innei Feb 21, 2025
15e3e1c
refactor(entries): remove isArchived parameter from entry fetching lo…
hyoban Feb 21, 2025
c4c9ceb
refactor(mobile): simplify scroll-to-top implementation
Innei Feb 21, 2025
ae89d8d
refactor(mobile): simplify entry list rendering and context management
Innei Feb 21, 2025
48461f1
feat(mobile): add reusable MediaCarousel component
Innei Feb 21, 2025
577f07f
feat(mobile): enhance player UI with floating tab bar and control imp…
Innei Feb 21, 2025
38e8c6c
fix(modal): adjust modal header drag and resize behavior
Innei Feb 22, 2025
79631bb
fix(mobile): remove shadow from PlayerTabBar
Innei Feb 22, 2025
3b5fb5f
fix(mobile): disable scroll-to-top for timeline view selector
Innei Feb 23, 2025
5a3825e
refactor(mobile): remove legacy scroll-to-top (#2855)
lawvs Feb 23, 2025
2fc2056
chore: auto submit
DIYgod Feb 23, 2025
8a0049d
fix(mobile): revert ref bind for nav scroll view ref (#2856)
lawvs Feb 23, 2025
aeaa29b
feat: bring back lists in views
DIYgod Feb 23, 2025
6fe8dc9
fix: lists fetch
DIYgod Feb 24, 2025
d07ec23
feat: optional daily
DIYgod Feb 24, 2025
0aa0dac
chore(release): release v0.3.7
DIYgod Feb 24, 2025
2f5d6c2
docs: update changelog
DIYgod Feb 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(mobile): enhance player UI with floating tab bar and control imp…
…rovements

- Added PlayerTabBar component to display active track in the tab bar
- Replaced FloatingBar with PlayerTabBar for consistent player controls
- Improved play/pause button with animated transitions
- Updated progress bar text styling with tabular numbers
- Refined DismissIndicator styling in player screen

Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Feb 21, 2025
commit 577f07f85e3e7556cae5652a24317a8842c92316
4 changes: 3 additions & 1 deletion apps/mobile/src/components/ui/tabbar/Tabbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import { useSafeAreaInsets } from "react-native-safe-area-context"

import { SetBottomTabBarHeightContext } from "@/src/components/ui/tabbar/contexts/BottomTabBarHeightContext"
import { quickSpringPreset, softSpringPreset } from "@/src/constants/spring"
import { PlayerTabBar } from "@/src/modules/player/PlayerTabBar"
import { accentColor, useColor } from "@/src/theme/colors"

import { ThemedBlurView } from "../../common/ThemedBlurView"
Expand All @@ -42,7 +43,7 @@ export const Tabbar: FC<BottomTabBarProps> = (props) => {
return (
<Animated.View
accessibilityRole="tablist"
className="absolute inset-x-0 bottom-0 z-10 flex-row py-[7]"
className="absolute inset-x-0 bottom-0 z-10 py-[7]"
style={{
paddingBottom: insets.bottom,
transform: [{ translateY }],
Expand All @@ -52,6 +53,7 @@ export const Tabbar: FC<BottomTabBarProps> = (props) => {
}}
>
<TabBarBackground />
<PlayerTabBar />
<Grid columns={routes.length} gap={10}>
{routes.map((route, index) => {
const focused = index === state.index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
EntryContentWebView,
setWebViewEntry,
} from "@/src/components/native/webview/EntryContentWebView"
import { MediaCarousel } from "@/src/components/ui/carousel/Carousel"
import { MediaCarousel } from "@/src/components/ui/carousel/MediaCarousel"
import { RelativeDateTime } from "@/src/components/ui/datetime/RelativeDateTime"
import { FeedIcon } from "@/src/components/ui/icon/feed-icon"
import { PreviewImage } from "@/src/components/ui/image/PreviewImage"
Expand Down
47 changes: 0 additions & 47 deletions apps/mobile/src/modules/player/FloatingBar.tsx

This file was deleted.

48 changes: 48 additions & 0 deletions apps/mobile/src/modules/player/PlayerTabBar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import { cn } from "@follow/utils"
import { Image } from "expo-image"
import { router, usePathname } from "expo-router"
import { Pressable, Text, View } from "react-native"
import Animated, { SlideInDown, SlideOutDown } from "react-native-reanimated"

import { useActiveTrack } from "@/src/lib/player"

import { PlayPauseButton, SeekButton } from "./control"

const allowedRoutes = new Set(["/", "/subscriptions", "/player"])

export function PlayerTabBar({ className }: { className?: string }) {
const activeTrack = useActiveTrack()
const pathname = usePathname()
if (!activeTrack || !allowedRoutes.has(pathname)) {
return null
}

return (
<View className="mb-2 overflow-hidden">
<Animated.View
entering={SlideInDown}
exiting={SlideOutDown}
className={cn("border-opaque-separator/70 border-b px-2 shadow-md", className)}
>
<Pressable
onPress={() => {
router.push("/player")
}}
>
<View className="flex flex-row items-center gap-4 overflow-hidden rounded-2xl p-2">
<Image source={activeTrack.artwork} className="size-12 rounded-lg" />
<View className="flex-1 overflow-hidden">
<Text className="text-label text-lg font-semibold" numberOfLines={1}>
{activeTrack.title}
</Text>
</View>
<View className="mr-2 flex flex-row gap-4">
<PlayPauseButton />
<SeekButton />
</View>
</View>
</Pressable>
</Animated.View>
</View>
)
}
27 changes: 20 additions & 7 deletions apps/mobile/src/modules/player/control.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { cn } from "@follow/utils"
import { router } from "expo-router"
import { Text, TouchableOpacity, View } from "react-native"
import { StyleSheet, Text, TouchableOpacity, View } from "react-native"
import { Slider } from "react-native-awesome-slider"
import { useDerivedValue, useSharedValue } from "react-native-reanimated"
import { FadeOut, useDerivedValue, useSharedValue, ZoomIn } from "react-native-reanimated"
import * as DropdownMenu from "zeego/dropdown-menu"

import { ReAnimatedPressable } from "@/src/components/common/AnimatedComponents"
import { Back2CuteReIcon } from "@/src/icons/back_2_cute_re"
import { Forward2CuteReIcon } from "@/src/icons/forward_2_cute_re"
import { PauseCuteFiIcon } from "@/src/icons/pause_cute_fi"
Expand All @@ -31,7 +32,10 @@ export function PlayPauseButton({ size = 24, className, color }: ControlButtonPr
const label = useColor("label")
return (
<View className={className}>
<TouchableOpacity
<ReAnimatedPressable
entering={ZoomIn.springify().damping(10).stiffness(200).mass(1)}
exiting={FadeOut}
key={playing ? "pause" : "play"}
onPress={() => {
playing ? player.pause() : player.play()
}}
Expand All @@ -41,7 +45,7 @@ export function PlayPauseButton({ size = 24, className, color }: ControlButtonPr
) : (
<PlayCuteFiIcon color={color ?? label} width={size} height={size} />
)}
</TouchableOpacity>
</ReAnimatedPressable>
</View>
)
}
Expand Down Expand Up @@ -191,21 +195,24 @@ export function ProgressBar() {

<View className="mt-3 flex-row justify-between">
<Text
style={styles.text}
className={cn(
"font-mono text-xs font-medium tracking-wider opacity-75",
"font-mono text-xs font-medium opacity-75",
isBackgroundLight ? "text-black" : "text-white",
)}
>
{trackElapsedTime}
</Text>

<Text
style={styles.text}
className={cn(
"font-mono text-xs font-medium tracking-wider opacity-75",
"font-mono text-xs font-medium opacity-75",
isBackgroundLight ? "text-black" : "text-white",
)}
>
{"-"} {trackRemainingTime}
{"-"}
{trackRemainingTime}
</Text>
</View>
</View>
Expand Down Expand Up @@ -250,3 +257,9 @@ export function VolumeBar() {
</View>
)
}

const styles = StyleSheet.create({
text: {
fontVariant: ["tabular-nums"],
},
})
2 changes: 1 addition & 1 deletion apps/mobile/src/screens/player.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export default function PlaterScreen() {
function DismissIndicator() {
return (
<View className="absolute inset-x-0 flex items-center justify-center top-safe-offset-2">
<View className="h-[5] w-[40] rounded-full bg-white/45" />
<View className="bg-tertiary-label h-[5] w-[40] rounded-full" />
</View>
)
}
Loading