Skip to content

Commit d522d32

Browse files
authored
Merge pull request #1555 from The-Commit-Company/add-animations-and-ui-improvements
Add animations and UI improvements
2 parents 6b02dfa + 3970dfc commit d522d32

33 files changed

Lines changed: 93 additions & 88 deletions

apps/mobile/app/[site_id]/(tabs)/home/browse-channels.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,15 @@ const ChannelFilter = ({ channel, setChannel }: { channel: string, setChannel: (
8989
const { colors } = useColorScheme()
9090
return <DropdownMenu.Root>
9191
<DropdownMenu.Trigger>
92-
<View className={`items-center p-2 border border-border rounded-md w-fit ${channel !== 'All' ? 'border-primary bg-primary/5' : ''}`}>
92+
<View className={`items-center p-2 border border-border rounded-lg w-fit ${channel !== 'All' ? 'border-primary bg-primary/5' : ''}`}>
9393
{
9494
channel === 'Public' ?
95-
<HashIcon fill={colors.icon} height={18} width={18} />
95+
<HashIcon fill={colors.icon} height={20} width={20} />
9696
: channel === 'Open' ?
97-
<GlobeIcon fill={colors.icon} height={18} width={18} />
97+
<GlobeIcon fill={colors.icon} height={20} width={20} />
9898
: channel === 'Private' ?
99-
<LockIcon fill={colors.icon} height={18} width={18} />
100-
: <FilterIcon color={colors.icon} height={18} width={18} />
99+
<LockIcon fill={colors.icon} height={20} width={20} />
100+
: <FilterIcon color={colors.icon} height={20} width={20} />
101101
}
102102
</View>
103103
</DropdownMenu.Trigger>

apps/mobile/app/[site_id]/chat/[id]/add-members.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import { ActivityIndicator } from '@components/nativewindui/ActivityIndicator';
1818
import SelectedMembers from '@components/features/channel-settings/Members/SelectedMembers';
1919
import MemberList from '@components/features/channel-settings/Members/MemberList';
2020
import { toast } from 'sonner-native';
21-
import { Divider } from '@components/layout/Divider';
2221
import SearchInput from '@components/common/SearchInput/SearchInput';
2322

2423
export default function AddNewChannelMembers() {
@@ -126,14 +125,12 @@ export default function AddNewChannelMembers() {
126125
},
127126
headerStyle: { backgroundColor: colors.background },
128127
}} />
129-
<View className='px-4 py-3'>
128+
<View className='px-4 pt-3'>
130129
<SearchInput
131130
onChangeText={setSearchQuery}
132131
value={searchQuery}
133132
/>
134133
</View>
135-
<Divider className='mx-0' prominent />
136-
137134
<KeyboardAwareScrollView
138135
bottomOffset={8}
139136
keyboardShouldPersistTaps="handled"

apps/mobile/app/[site_id]/chat/[id]/channel-members.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ const ChannelMembers = () => {
6262
value={searchQuery}
6363
/>
6464
</View>
65-
<Divider className='mx-0' prominent />
6665
<KeyboardAwareScrollView
6766
bottomOffset={8}
6867
keyboardShouldPersistTaps="handled"
@@ -82,7 +81,7 @@ const ChannelMembers = () => {
8281
showsVerticalScrollIndicator={false}
8382
ListEmptyComponent={!debouncedText.length ? () => {
8483
return (
85-
<View className="flex-1 items-center justify-center pt-10">
84+
<View className="flex-1 items-center justify-center">
8685
<Text className="text-[15px] text-center text-muted-foreground">
8786
No channel members found
8887
</Text>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { Pressable } from 'react-native'
2+
import { Text } from '@components/nativewindui/Text'
3+
import { ReactNode } from 'react'
4+
5+
interface ActionButtonLargeProps {
6+
icon: ReactNode
7+
text: string
8+
onPress: () => void
9+
}
10+
11+
export const ActionButtonLarge = ({ icon, text, onPress }: ActionButtonLargeProps) => {
12+
return (
13+
<Pressable
14+
onPress={onPress}
15+
className='flex-1 flex flex-col items-center gap-2 px-2 py-3.5 rounded-lg bg-card active:bg-linkColor'
16+
android_ripple={{ color: 'rgba(0,0,0,0.1)', borderless: false }}>
17+
{icon}
18+
<Text className='text-[15px] font-medium text-foreground/80'>{text}</Text>
19+
</Pressable>
20+
)
21+
}

apps/mobile/components/common/ErrorBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const ErrorBanner = ({ heading, message, error }: ErrorBannerProps) => {
6262
const messages = getErrorMessages(error)
6363
return (
6464
<View className="container">
65-
<View className="border-l-[5px] border-error-border bg-error-background flex w-full rounded-md px-6 py-3 md:p-9">
65+
<View className="border-l-[5px] border-error-border bg-error-background flex w-full rounded-lg px-6 py-3 md:p-9">
6666
<View className="w-full">
6767
{(heading || error) && (heading ?
6868
<Text className="mb-2 text-base font-semibold text-error-heading">

apps/mobile/components/features/auth/AddSite.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ const AddSite = (props: Props) => {
8585
<FormLabel className='text-base'>Site URL</FormLabel>
8686
</View>
8787
<TextInput
88-
className="w-full border py-3 text-[16px] border-border rounded-md px-3 text-foreground"
88+
className="w-full border py-3 text-[16px] border-border rounded-lg px-3 text-foreground"
8989
numberOfLines={1}
9090
inputMode='url'
9191
autoCapitalize='none'

apps/mobile/components/features/channel-settings/BaseDetails/EditChannelBaseDetailsForm.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const EditChannelBaseDetailsForm = () => {
6464
},
6565
}}
6666
render={({ field: { onBlur, value }, fieldState: { error } }) => (
67-
<View className={`mt-2.5 flex-row items-center rounded-md border ${error ? "border-red-600" : "border-border"}`}>
67+
<View className={`mt-2.5 flex-row items-center rounded-lg border ${error ? "border-red-600" : "border-border"}`}>
6868
<View className="ml-3 mr-1 items-center">
6969
<ChannelIcon type={channel?.channelData.type ?? ""} fill={colors.icon} />
7070
</View>
@@ -104,7 +104,7 @@ const EditChannelBaseDetailsForm = () => {
104104
required: "Please add a channel description",
105105
}}
106106
render={({ field: { onBlur, value, onChange }, fieldState: { error } }) => (
107-
<View className={`mt-2.5 flex-row items-center rounded-md border ${error ? "border-red-600" : "border-border"}`}>
107+
<View className={`mt-2.5 flex-row items-center rounded-lg border ${error ? "border-red-600" : "border-border"}`}>
108108
<View className="flex-1">
109109
<TextField
110110
className="px-3"

apps/mobile/components/features/channel-settings/Members/ChannelMemberRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const ChannelMemberRow = ({ member }: { member: Member }) => {
138138
rightThreshold={40}
139139
renderRightActions={(prog, drag) => RightAction(prog, drag, member)}>
140140
<View>
141-
<Pressable onLongPress={showActions} className='ios:active:bg-linkColor flex-row items-center justify-between rounded-md'>
141+
<Pressable onLongPress={showActions} className='ios:active:bg-linkColor flex-row items-center justify-between rounded-lg'>
142142
<View className='gap-3 px-4 py-3 flex-row items-center'>
143143
<UserAvatar
144144
src={member.user_image ?? ""}

apps/mobile/components/features/channel-settings/Members/MemberList.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ configureReanimatedLogger({
2323
})
2424

2525
const MemberList: React.FC<MemberListProps> = ({ filteredMembers, selectedMembers, handleSelectMember, debouncedText }) => {
26-
const { colors, isDarkColorScheme } = useColorScheme()
26+
const { isDarkColorScheme } = useColorScheme()
2727
return (
2828
<FlashList
2929
data={filteredMembers}
3030
renderItem={({ item }) => {
3131
const isMemberSelected = selectedMembers.find(member => member.name === item.name);
3232
return (
33-
<Pressable onPress={() => handleSelectMember(item as Member)} className='ios:active:bg-background dark:ios:active:bg-linkColor flex-row items-center justify-between rounded-md px-2.5'>
33+
<Pressable onPress={() => handleSelectMember(item as Member)} className='ios:active:bg-background dark:ios:active:bg-linkColor flex-row items-center justify-between rounded-lg px-2.5'>
3434
<View className='gap-3 px-2 py-2.5 flex-row items-center'>
3535
<View className='relative'>
3636
<UserAvatar

apps/mobile/components/features/channels/ChannelList/ChannelsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const ChannelListUI = ({ channels }: { channels: ChannelListItem[] }) =>
4040
<TouchableOpacity onPress={toggleAccordion} style={styles.header} activeOpacity={0.7}>
4141
<Text style={styles.headerText}>Channels</Text>
4242
<View className="flex-row items-center gap-1">
43-
<Pressable className='active:bg-card-background px-1.5 py-1 rounded-md'
43+
<Pressable className='active:bg-card-background px-1.5 py-1 rounded-lg'
4444
onPress={() => router.push('../home/create-channel', { relativeToDirectory: true })}>
4545
<PlusIcon fill={colors.icon} height={18} width={18} />
4646
</Pressable>

0 commit comments

Comments
 (0)