Skip to content

Commit c6a2283

Browse files
authored
Merge pull request #25 from code-kern-ai/unlink-data
Cognition unlink data from wizard
2 parents f723738 + 10023d9 commit c6a2283

File tree

3 files changed

+46
-9
lines changed

3 files changed

+46
-9
lines changed

src/components/projects/SampleProjectsDropdown.tsx

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { selectAllProjects } from '@/src/reduxStore/states/project';
77
import { ModalButton, ModalEnum } from '@/src/types/shared/modal';
88
import { closeModal, openModal } from '@/src/reduxStore/states/modal';
99
import Modal from '../shared/modal/Modal';
10-
import { IconAlertTriangle, IconFishHook, IconMessageCircle, IconNews } from '@tabler/icons-react';
10+
import { IconAlertTriangle, IconFishHook, IconMessageCircle, IconNews, IconQuestionMark, IconScreenshot } from '@tabler/icons-react';
1111
import { setSearchGroupsStore } from '@/src/reduxStore/states/pages/data-browser';
1212
import { selectProjectIdSampleProject, setProjectIdSampleProject } from '@/src/reduxStore/states/tmp';
1313
import { createSampleProject } from '@/src/services/base/project';
@@ -93,7 +93,7 @@ export default function SampleProjectsDropdown() {
9393
leaveFrom="transform opacity-100 scale-100"
9494
leaveTo="transform opacity-0 scale-95"
9595
>
96-
<Menu.Items className="absolute w-max z-10 mt-2 origin-top-left rounded-md ml-6 bg-white shadow-sm ring-1 ring-black ring-opacity-5 focus:outline-none">
96+
<Menu.Items className="absolute w-max z-10 mt-2 small:max-h-72 small:overflow-y-auto origin-top-left rounded-md ml-6 bg-white shadow-sm ring-1 ring-black ring-opacity-5 focus:outline-none">
9797
<div className="py-1">
9898
<Menu.Item>
9999
{({ active }) => (
@@ -102,8 +102,10 @@ export default function SampleProjectsDropdown() {
102102
onClick={() => {
103103
importSampleProject("Clickbait", "Clickbait");
104104
}}>
105-
<IconFishHook className="h-5 w-5 inline-block" />
106-
<span className="ml-2">Clickbait</span>
105+
<div className="flex flex-row items-center">
106+
<IconFishHook className="h-5 w-5 inline-block" />
107+
<span className="ml-2">Clickbait</span>
108+
</div>
107109
<div className="mt-2">Binary classification for detecting nudging articles.</div>
108110
</a>
109111
)}
@@ -126,8 +128,10 @@ export default function SampleProjectsDropdown() {
126128
onClick={() => {
127129
importSampleProject("Conversational AI", "Conversational AI");
128130
}}>
129-
<IconMessageCircle className="h-5 w-5 inline-block" />
130-
<span className="ml-2">Conversational AI</span>
131+
<div className="flex flex-row items-center">
132+
<IconMessageCircle className="h-5 w-5 inline-block" />
133+
<span className="ml-2">Conversational AI</span>
134+
</div>
131135
<div className="mt-2">Detecting intent within conversational lines.</div>
132136
</a>
133137
)}
@@ -150,8 +154,10 @@ export default function SampleProjectsDropdown() {
150154
onClick={() => {
151155
importSampleProject("AG News", "AG News");
152156
}}>
153-
<IconNews className="h-5 w-5 inline-block" />
154-
<span className="ml-2">AG News</span>
157+
<div className="flex flex-row items-center">
158+
<IconNews className="h-5 w-5 inline-block" />
159+
<span className="ml-2">AG News</span>
160+
</div>
155161
<div className="mt-2">Modelling topics of headline news.</div>
156162
</a>
157163
)}
@@ -167,6 +173,36 @@ export default function SampleProjectsDropdown() {
167173
</a>
168174
)}
169175
</Menu.Item>
176+
<Menu.Item>
177+
{({ active }) => (
178+
<a key="sample-project-6" style={{ borderBottom: '1px dashed #e2e8f0' }}
179+
className={`opacity-100 cursor-pointer text-gray-900 block px-3 py-2 text-sm ${active ? "bg-kernindigo text-white" : ""}`}
180+
onClick={() => {
181+
importSampleProject("Global Guard [References]", "Global Guard [References]");
182+
}}>
183+
<div className="flex flex-row items-center">
184+
<IconScreenshot className="h-5 w-5 inline-block" />
185+
<span className="ml-2">DEV Global Guard [References]</span>
186+
</div>
187+
<div className="mt-2">References right after the wizard went through.</div>
188+
</a>
189+
)}
190+
</Menu.Item>
191+
<Menu.Item>
192+
{({ active }) => (
193+
<a key="sample-project-6" style={{ borderBottom: '1px solid #e2e8f0' }}
194+
className={`opacity-100 cursor-pointer text-gray-900 block px-3 py-2 text-sm ${active ? "bg-kernindigo text-white" : ""}`}
195+
onClick={() => {
196+
importSampleProject("Global Guard [Questions]", "Global Guard [Questions]");
197+
}}>
198+
<div className="flex flex-row items-center">
199+
<IconQuestionMark className="h-5 w-5 inline-block" />
200+
<span className="ml-2">DEV Global Guard [Questions]</span>
201+
</div>
202+
<div className="mt-2">Questions right after the wizard went through.</div>
203+
</a>
204+
)}
205+
</Menu.Item>
170206
<Menu.Item>
171207
{({ active }) => (
172208
<a key="sample-project-6"

submodules/react-components

tailwind.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ module.exports = {
6464
},
6565
screens: {
6666
"xs": "450px",
67+
'small': { 'raw': '(max-height: 1200px)' },
6768
...defaultTheme.screens,
6869
}
6970
},

0 commit comments

Comments
 (0)