Skip to content

Commit

Permalink
Merge branch 'develop' into improve/hamburger-menu-blur
Browse files Browse the repository at this point in the history
  • Loading branch information
desperado1802 committed Oct 20, 2023
2 parents 553977e + 6e51a50 commit 1d747c2
Show file tree
Hide file tree
Showing 10 changed files with 45 additions and 13 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/app/components/HamburgerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const HamburgerMenu = observer((props: any) => {
marginTop: 4,
}}
>
{user?.email}s
{user?.email}
</Text>
{activeTeam ? (
<DropDown
Expand Down
8 changes: 6 additions & 2 deletions apps/mobile/app/components/TaskPriority.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TaskPriority: FC<TaskPriorityProps> = observer(
return (
<>
<TaskPriorityPopup
priorityName={task?.priority}
priorityName={task ? task?.priority : priority}
visible={openModal}
setSelectedPriority={(e) => onChangePriority(e.value)}
onDismiss={() => setOpenModal(false)}
Expand Down Expand Up @@ -81,7 +81,11 @@ const TaskPriority: FC<TaskPriorityProps> = observer(
</Text>
</View>
)}
<AntDesign name="down" size={14} color={colors.primary} />
<AntDesign
name="down"
size={14}
color={task?.priority || priority ? "#000000" : colors.primary}
/>
</View>
</TouchableOpacity>
</>
Expand Down
6 changes: 5 additions & 1 deletion apps/mobile/app/components/TaskSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ const TaskSize: FC<TaskSizeProps> = observer(({ task, containerStyle, setSize, s
</Text>
</View>
)}
<AntDesign name="down" size={14} color={colors.primary} />
<AntDesign
name="down"
size={14}
color={task?.size || size ? "#000000" : colors.primary}
/>
</View>
</TouchableOpacity>
</>
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/app/components/TaskSizePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ interface ItemProps {
const Item: FC<ItemProps> = ({ currentSizeName, size, onSizeSelected }) => {
const { colors } = useAppTheme()
const selected = size.value === currentSizeName

return (
<TouchableOpacity onPress={() => onSizeSelected(size)}>
<View style={{ ...styles.wrapperItem, borderColor: colors.border }}>
Expand Down
8 changes: 6 additions & 2 deletions apps/mobile/app/components/TaskStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const TaskStatus: FC<TaskStatusProps> = observer(
return (
<>
<TaskStatusPopup
statusName={task?.status}
statusName={task ? task?.status : status}
visible={openModal}
setSelectedStatus={(e) => onChangeStatus(e)}
onDismiss={() => setOpenModal(false)}
Expand Down Expand Up @@ -90,7 +90,11 @@ const TaskStatus: FC<TaskStatusProps> = observer(
)}
</Text>
)}
<AntDesign name="down" size={14} color={colors.primary} />
<AntDesign
name="down"
size={14}
color={task?.status || status ? "#000000" : colors.primary}
/>
</View>
</TouchableOpacity>
</>
Expand Down
8 changes: 7 additions & 1 deletion apps/mobile/app/components/TeamDropdown/DropDownSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,13 @@ const DropDownSection: FC<Props> = observer(function DropDownSection({
data={others}
scrollEnabled={false}
renderItem={({ item, index }) => (
<View style={{ width: "100%", justifyContent: "center", alignItems: "center" }}>
<View
style={{
width: resized ? "100%" : "90%",
justifyContent: "center",
alignItems: "center",
}}
>
<DropItem
key={index}
team={item}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const ListCardItem: React.FC<Props> = (props) => {
return (
<Card
style={[
{ borderRadius: 14, ...GS.shadow },
styles.cardContainer,
!dark && activeAuthTask && { borderColor: "#8C7AE4", borderWidth: 3 },
]}
>
Expand All @@ -285,6 +285,14 @@ const ListCardItem: React.FC<Props> = (props) => {
export default ListCardItem

const styles = StyleSheet.create({
cardContainer: {
borderRadius: 14,
elevation: 24,
shadowColor: "#000",
shadowOffset: { width: 0, height: 12 },
shadowOpacity: 0.05,
shadowRadius: 5,
},
dropdownTxt: {
color: "#282048",
fontFamily: typography.primary.semiBold,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const styles = StyleSheet.create({
shadowTimerNotRunning: {
elevation: 10,
shadowColor: "#3826A6",
shadowOffset: { width: 0, height: 10 },
shadowOffset: { width: 0, height: 8 },
shadowOpacity: 0.5,
shadowRadius: 10,
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable camelcase */
/* eslint-disable react-native/no-inline-styles */
/* eslint-disable react-native/no-color-literals */
import React, { FC } from "react"
import React, { FC, useState } from "react"
import { Text } from "react-native-paper"
import { View, StyleSheet, TouchableWithoutFeedback, Pressable, FlatList } from "react-native"
import { Ionicons } from "@expo/vector-icons"
Expand All @@ -20,6 +20,7 @@ export interface Props {

const ComboBox: FC<Props> = observer(function ComboBox({ tasksHandler, closeCombo, setEditMode }) {
const { colors } = useAppTheme()
const [isScrolling, setIsScrolling] = useState<boolean>(false)

return (
<TouchableWithoutFeedback>
Expand Down Expand Up @@ -54,13 +55,16 @@ const ComboBox: FC<Props> = observer(function ComboBox({ tasksHandler, closeComb
</View>
<View style={{ maxHeight: 315 }}>
<FlatList
onScrollBeginDrag={() => setIsScrolling(true)}
onScrollEndDrag={() => setIsScrolling(false)}
showsVerticalScrollIndicator={false}
data={tasksHandler.filteredTasks}
renderItem={({ item, index }) => (
<IndividualTask
key={index}
onReopenTask={() => tasksHandler.handleReopenTask(item)}
task={item}
isScrolling={isScrolling}
handleActiveTask={tasksHandler.setActiveTeamTask}
closeCombo={closeCombo}
setEditMode={setEditMode}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ export interface Props {
closeCombo?: () => unknown
onReopenTask: () => unknown
setEditMode: (val: boolean) => void
isScrolling: boolean
}

const IndividualTask: FC<Props> = observer(
({ task, handleActiveTask, closeCombo, onReopenTask, setEditMode }) => {
({ task, handleActiveTask, closeCombo, onReopenTask, setEditMode, isScrolling }) => {
const { colors } = useAppTheme()
const [showDel, setShowDel] = useState(false)
const { updateTask } = useTeamTasks()
Expand Down Expand Up @@ -54,7 +55,7 @@ const IndividualTask: FC<Props> = observer(
>
<View
onTouchEnd={() => {
handleActiveTask(task)
!isScrolling && handleActiveTask(task)
}} // added it here because doesn't work when assigned to the parent
style={{
flexDirection: "row",
Expand All @@ -76,7 +77,7 @@ const IndividualTask: FC<Props> = observer(
</View>
<View
onTouchEnd={() => {
handleActiveTask(task)
!isScrolling && handleActiveTask(task)
}} // added it here because doesn't work when assigned to the parent
style={{
flexDirection: "row",
Expand Down

0 comments on commit 1d747c2

Please sign in to comment.