Skip to content

Commit fabc725

Browse files
committed
Added help popover
1 parent e5d6516 commit fabc725

26 files changed

+173
-39
lines changed
Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
'use client'
2+
3+
import React from 'react'
4+
import { HelpCircle, ExternalLink, Mail } from 'lucide-react'
5+
import IconPopover from '@/components/common/IconPopover'
6+
import { CLS } from '@/lib/utils/styles'
7+
import { Separator } from '@/components/ui/separator'
8+
9+
export default function HelpPopover() {
10+
const sections = [
11+
{
12+
title: 'Help',
13+
links: [
14+
{
15+
label: 'Read docs',
16+
url: 'https://smoosense.ai/docs',
17+
icon: <ExternalLink className="h-3 w-3" />
18+
},
19+
{
20+
label: 'Consult tailored solution',
21+
url: 'mailto:[email protected]',
22+
icon: <Mail className="h-3 w-3" />
23+
}
24+
]
25+
},
26+
{
27+
title: 'GitHub',
28+
links: [
29+
{
30+
label: 'Report bugs or feature request',
31+
url: 'https://github.com/SmooSenseAI/smoosense/issues/new',
32+
icon: <ExternalLink className="h-3 w-3" />
33+
}
34+
],
35+
badges: [
36+
{
37+
alt: 'License',
38+
src: 'https://img.shields.io/github/license/SmooSenseAI/smoosense',
39+
url: 'https://github.com/SmooSenseAI/smoosense/blob/main/LICENSE'
40+
},
41+
{
42+
alt: 'CI Status',
43+
src: 'https://github.com/SmooSenseAI/smoosense/actions/workflows/ci.yml/badge.svg',
44+
url: 'https://github.com/SmooSenseAI/smoosense/actions/workflows/ci.yml'
45+
},
46+
{
47+
alt: 'Issues',
48+
src: 'https://img.shields.io/github/issues/SmooSenseAI/smoosense',
49+
url: 'https://github.com/SmooSenseAI/smoosense/issues'
50+
}
51+
]
52+
},
53+
{
54+
title: 'Try SmooSense with your data',
55+
links: [
56+
{
57+
label: 'Get started',
58+
url: 'https://smoosense.ai/start',
59+
icon: <ExternalLink className="h-3 w-3" />
60+
}
61+
],
62+
badges: [
63+
{
64+
alt: 'Latest version',
65+
src: 'https://img.shields.io/pypi/v/smoosense?label=pypi-latest',
66+
url: 'https://pypi.org/project/smoosense/'
67+
},
68+
{
69+
alt: 'Downloads',
70+
src: 'https://static.pepy.tech/personalized-badge/smoosense?period=total&units=international_system&left_color=black&right_color=MAGENTA&left_text=downloads',
71+
url: 'https://pepy.tech/project/smoosense'
72+
}
73+
]
74+
}
75+
]
76+
77+
return (
78+
<IconPopover
79+
icon={<HelpCircle className="h-4 w-4" />}
80+
tooltip="Help & Resources"
81+
contentClassName="w-auto p-3"
82+
align="end"
83+
>
84+
<div className="min-w-[240px]">
85+
{sections.map((section, sectionIndex) => (
86+
<React.Fragment key={sectionIndex}>
87+
{sectionIndex > 0 && <Separator className="my-3" />}
88+
<div>
89+
<h4 className="text-sm font-semibold text-muted-foreground mb-1.5">
90+
{section.title}
91+
</h4>
92+
{section.badges && (
93+
<div className="flex flex-wrap gap-1.5 mb-2">
94+
{section.badges.map((badge, badgeIndex) => (
95+
<a
96+
key={badgeIndex}
97+
href={badge.url}
98+
target="_blank"
99+
rel="noopener noreferrer"
100+
>
101+
<img
102+
src={badge.src}
103+
alt={badge.alt}
104+
className="h-6 mx-1"
105+
/>
106+
</a>
107+
))}
108+
</div>
109+
)}
110+
<div className="space-y-1">
111+
{section.links.map((link, linkIndex) => (
112+
<a
113+
key={linkIndex}
114+
href={link.url}
115+
target="_blank"
116+
rel="noopener noreferrer"
117+
className={`flex items-center justify-between gap-2 text-sm ${CLS.HYPERLINK} py-1`}
118+
>
119+
<span>{link.label}</span>
120+
{link.icon}
121+
</a>
122+
))}
123+
</div>
124+
</div>
125+
</React.Fragment>
126+
))}
127+
</div>
128+
</IconPopover>
129+
)
130+
}

smoosense-gui/src/components/layout/MiniTableTopBar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { Button } from '@/components/ui/button'
55
import Logo from '@/components/common/Logo'
66
import FilterStatusChips from '@/components/common/FilterStatusChips'
77
import GlobalSettingsDropdown from '@/components/settings/GlobalSettings'
8+
import HelpPopover from '@/components/common/HelpPopover'
89

910
export default function MiniTableTopBar() {
1011
const handleOpenFullView = () => {
@@ -36,6 +37,7 @@ export default function MiniTableTopBar() {
3637
<ExternalLink className="h-4 w-4" />
3738
</Button>
3839

40+
<HelpPopover />
3941
<GlobalSettingsDropdown context="MiniTable" />
4042
</div>
4143
</div>

smoosense-gui/src/components/layout/NavbarSkeleton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { useEffect, ReactNode } from 'react'
55
import React from 'react'
66
import Logo from '@/components/common/Logo'
77
import GlobalSettingsDropdown from '@/components/settings/GlobalSettings'
8+
import HelpPopover from '@/components/common/HelpPopover'
89

910
interface NavbarSkeletonProps {
1011
className?: string
@@ -45,11 +46,12 @@ export default function NavbarSkeleton({
4546
<div className="flex-1" />
4647
)}
4748

48-
{/* Icon buttons + Global Settings - rightmost */}
49+
{/* Icon buttons + Help + Global Settings - rightmost */}
4950
<div className="flex items-center space-x-2">
5051
{iconButtons.map((button, index) => (
5152
<React.Fragment key={index}>{button}</React.Fragment>
5253
))}
54+
<HelpPopover />
5355
<GlobalSettingsDropdown context={globalSettingsContext} />
5456
</div>
5557
</div>
984 Bytes
Loading
1010 Bytes
Loading
976 Bytes
Loading
912 Bytes
Loading

smoosense-py/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "smoosense"
3-
version = "0.0.1rc29"
3+
version = "0.0.1rc30"
44
description = "Smoothly make sense of your large multi-modal datasets"
55
readme = "README.md"
66
requires-python = ">=3.9"

smoosense-py/smoosense/statics/404.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

smoosense-py/smoosense/statics/FolderBrowser.html

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)