+
@@ -28,7 +28,7 @@ const Tabs = (): JSX.Element => {
onClick={() => setActiveTab('closed')}
>
1012 Closed
diff --git a/apps/website/src/components/table-issues/table-issues.tsx b/apps/website/src/components/table-issues/table-issues.tsx
index c616d713..458e54ef 100644
--- a/apps/website/src/components/table-issues/table-issues.tsx
+++ b/apps/website/src/components/table-issues/table-issues.tsx
@@ -1,12 +1,15 @@
import { useRef, useState } from 'react'
import { Avatar, Button, Input, Tag, Text } from '@status-im/components'
-import { SearchIcon } from '@status-im/icons'
+import { ProfileIcon, SearchIcon } from '@status-im/icons'
import Link from 'next/link'
-import { FilterWithCheckboxes, Tabs } from './filters'
+import { useCurrentBreakpoint } from '@/hooks/use-current-breakpoint'
+
+import { FilterWithCheckboxes, Sort, Tabs } from './filters'
import type { FilterWithCheckboxesProps } from './filters/filter-with-checkboxes'
+import type { SortProps } from './filters/sort'
import type { TextInput } from 'react-native'
const issues = [
@@ -121,33 +124,135 @@ const labels: FilterWithCheckboxesProps['data'] = [
},
]
-export const TableIssues = () => {
+const assignees: FilterWithCheckboxesProps['data'] = [
+ {
+ id: 1,
+ name: 'Unassigned',
+ avatar:
,
+ },
+ {
+ id: 4,
+ name: 'marcelines',
+ avatar: 'https://avatars.githubusercontent.com/u/29401404?v=4',
+ },
+ {
+ id: 5,
+ name: 'prichodko',
+ avatar: 'https://avatars.githubusercontent.com/u/14926950?v=4',
+ },
+ {
+ id: 6,
+ name: 'felicio',
+ avatar: 'https://avatars.githubusercontent.com/u/13265126?v=4',
+ },
+ {
+ id: 7,
+ name: 'jkbktl',
+ avatar: 'https://avatars.githubusercontent.com/u/520927?v=4',
+ },
+]
+
+const repositories: FilterWithCheckboxesProps['data'] = [
+ {
+ id: 1,
+ name: 'status-mobile',
+ },
+ {
+ id: 2,
+ name: 'status-desktop',
+ },
+ {
+ id: 3,
+ name: 'status-web',
+ },
+ {
+ id: 4,
+ name: 'status-go',
+ },
+ {
+ id: 5,
+ name: 'nwaku',
+ },
+ {
+ id: 6,
+ name: 'go-waku',
+ },
+ {
+ id: 7,
+ name: 'js-waku',
+ },
+ {
+ id: 8,
+ name: 'nimbus-eth2',
+ },
+ {
+ id: 9,
+ name: 'help.status.im',
+ },
+]
+
+const sortOptions: SortProps['data'] = [
+ {
+ id: 1,
+ name: 'Default',
+ },
+ {
+ id: 2,
+ name: 'Alphabetical',
+ },
+ {
+ id: 3,
+ name: 'Creation date',
+ },
+ {
+ id: 4,
+ name: 'Updated',
+ },
+ {
+ id: 5,
+ name: 'Completion',
+ },
+]
+
+const TableIssues = () => {
const [issuesSearchText, setIssuesSearchText] = useState('')
const inputRef = useRef
(null)
const [isMinimized, setIsMinimized] = useState(true)
+ const currentBreakpoint = useCurrentBreakpoint()
+
return (
-
-
-
-
-
}
- size={32}
- value={issuesSearchText}
- onChangeText={setIssuesSearchText}
- onHandleMinimized={() => setIsMinimized(!isMinimized)}
- minimized={isMinimized}
- direction="rtl"
- ref={inputRef}
- />
+
+
+
+
+
+
+
+ }
+ size={32}
+ value={issuesSearchText}
+ onChangeText={setIssuesSearchText}
+ onHandleMinimized={() => setIsMinimized(!isMinimized)}
+ minimized={isMinimized}
+ direction={currentBreakpoint === '2xl' ? 'rtl' : 'ltr'}
+ ref={inputRef}
+ />
+
+
+
+
+
+
+
+
+
+
-
-
-
@@ -197,3 +302,5 @@ export const TableIssues = () => {
)
}
+
+export { TableIssues }
diff --git a/apps/website/src/hooks/use-current-breakpoint.ts b/apps/website/src/hooks/use-current-breakpoint.ts
new file mode 100644
index 00000000..66b6ee9e
--- /dev/null
+++ b/apps/website/src/hooks/use-current-breakpoint.ts
@@ -0,0 +1,43 @@
+import { useEffect, useState } from 'react'
+
+import defaultTheme from 'tailwindcss/defaultTheme'
+
+// If we had custom breakpoints, we could use this to get the current breakpoint but we will use the default breakpoints for now
+// import resolveConfig from 'tailwindcss/resolveConfig'
+// import tailwindConfig from '../../tailwind.config'
+
+// const fullConfig = resolveConfig(tailwindConfig)
+
+export function useCurrentBreakpoint() {
+ const [currentBreakpoint, setCurrentBreakpoint] = useState('')
+
+ useEffect(() => {
+ const handleResize = () => {
+ const screenWidth = window.innerWidth
+ const breakpoints = defaultTheme.screens
+ ? Object.entries(defaultTheme.screens)
+ : []
+
+ for (let i = breakpoints.length - 1; i >= 0; i--) {
+ const [breakpoint, minWidth] = breakpoints[i]
+
+ const convertedMinWidth = parseInt(minWidth, 10)
+
+ if (screenWidth >= convertedMinWidth) {
+ setCurrentBreakpoint(breakpoint)
+ break
+ }
+ }
+ }
+
+ handleResize()
+
+ window.addEventListener('resize', handleResize)
+
+ return () => {
+ window.removeEventListener('resize', handleResize)
+ }
+ }, [])
+
+ return currentBreakpoint || 'sm' // Default breakpoint if none matches or during SSR
+}
diff --git a/packages/components/src/dropdown-menu/dropdown-menu.tsx b/packages/components/src/dropdown-menu/dropdown-menu.tsx
index 32c4f454..d9625162 100644
--- a/packages/components/src/dropdown-menu/dropdown-menu.tsx
+++ b/packages/components/src/dropdown-menu/dropdown-menu.tsx
@@ -9,6 +9,7 @@ import {
Root,
Trigger,
} from '@radix-ui/react-dropdown-menu'
+import { CheckIcon } from '@status-im/icons'
import { Stack, styled } from '@tamagui/core'
import { Checkbox } from '../selectors'
@@ -34,7 +35,7 @@ const DropdownMenu = (props: Props) => {
}
interface DropdownMenuItemProps {
- icon: React.ReactElement
+ icon?: React.ReactElement
label: string
onSelect: () => void
selected?: boolean
@@ -42,23 +43,26 @@ interface DropdownMenuItemProps {
}
const MenuItem = (props: DropdownMenuItemProps) => {
- const { icon, label, onSelect, danger } = props
+ const { icon, label, onSelect, danger, selected } = props
const iconColor = danger ? '$danger-50' : '$neutral-50'
const textColor = danger ? '$danger-50' : '$neutral-100'
return (
- {cloneElement(icon, { color: iconColor })}
-
- {label}
-
+
+ {icon && cloneElement(icon, { color: iconColor })}
+
+ {label}
+
+
+ {selected && }
)
}
interface DropdownMenuCheckboxItemProps {
- icon: React.ReactElement
+ icon?: React.ReactElement
label: string
onSelect: () => void
checked?: boolean
@@ -79,7 +83,7 @@ const DropdownMenuCheckboxItem = forwardRef<
return (
- {cloneElement(icon)}
+ {icon && cloneElement(icon)}
{label}
@@ -109,6 +113,8 @@ const ItemBase = styled(DropdownMenuItem, {
display: 'flex',
alignItems: 'center',
+ justifyContent: 'space-between',
+
height: 32,
paddingHorizontal: 8,
borderRadius: '$10',
diff --git a/packages/components/src/icon-button/icon-button.tsx b/packages/components/src/icon-button/icon-button.tsx
index 24bbed19..994c2ab9 100644
--- a/packages/components/src/icon-button/icon-button.tsx
+++ b/packages/components/src/icon-button/icon-button.tsx
@@ -93,8 +93,8 @@ const Base = styled(Stack, {
outline: {
backgroundColor: 'transparent',
- borderColor: '$neutral-20',
- hoverStyle: { borderColor: '$neutral-30' },
+ borderColor: '$neutral-30',
+ hoverStyle: { borderColor: '$neutral-40' },
pressStyle: {
borderColor: '$neutral-20',
backgroundColor: '$neutral-10',
diff --git a/packages/components/src/input/input.tsx b/packages/components/src/input/input.tsx
index 8194d191..9fe3141c 100644
--- a/packages/components/src/input/input.tsx
+++ b/packages/components/src/input/input.tsx
@@ -171,7 +171,7 @@ const InputContainer = styled(Stack, {
paddingHorizontal: 12,
- animation: 'medium',
+ animation: 'fast',
width: '100%',
hoverStyle: {