Skip to content

Commit d2aaedd

Browse files
Updates to the Dashboard based on UX designs
Signed-off-by: Jeffrey Phillips <[email protected]>
1 parent 2e69642 commit d2aaedd

File tree

96 files changed

+4052
-2091
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+4052
-2091
lines changed

.env.github.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,11 @@ IL_ENABLE_DEV_MODE=false
2121
# (Optional) Enable document conversion. Any non-markdown file will be converted to markdown file
2222
# Default: false
2323
IL_ENABLE_DOC_CONVERSION=false
24+
25+
# (Optional) Enable this option if you want to enable UI features that allow Skills contributions
26+
# Default: false
27+
IL_ENABLE_SKILLS_FEATURES=true
28+
29+
# (Optional) Enable this option if you want to enable UI playground features (Chat with a model, Custom model endpoints)
30+
# Default: false
31+
IL_ENABLE_PLAYGROUND_FEATURES=true

.env.native.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,11 @@ NEXT_PUBLIC_EXPERIMENTAL_FEATURES=false
2727
# (Optional) Uncomment and point to the URL the api-server is running on. Native mode only and needs
2828
# to be running on the same host as the UI.
2929
# NEXT_PUBLIC_API_SERVER=http://localhost:8080
30+
31+
# (Optional) Enable this option if you want to enable UI features that allow Skills contributions
32+
# Default: false
33+
IL_ENABLE_SKILLS_FEATURES=true
34+
35+
# (Optional) Enable this option if you want to enable UI playground features (Chat with a model, Custom model endpoints)
36+
# Default: false
37+
IL_ENABLE_PLAYGROUND_FEATURES=true
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// src/app/contribute/knowledge/edit/github/[...slug]/page.tsx
2+
import * as React from 'react';
3+
import { AppLayout } from '@/components/AppLayout';
4+
import EditKnowledge from '@/components/Contribute/Knowledge/Edit/github/EditKnowledge';
5+
6+
type PageProps = {
7+
params: Promise<{ slug: string[] }>;
8+
};
9+
10+
const EditKnowledgeGithubPage = async ({ params }: PageProps) => {
11+
const resolvedParams = await params;
12+
13+
return (
14+
<AppLayout className="contribute-page">
15+
<EditKnowledge branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] === 'isDraft'} />
16+
</AppLayout>
17+
);
18+
};
19+
20+
export default EditKnowledgeGithubPage;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// src/app/contribute/knowledge/edit/native/[...slug]/page.tsx
2+
import * as React from 'react';
3+
import { AppLayout } from '@/components/AppLayout';
4+
import EditKnowledge from '@/components/Contribute/Knowledge/Edit/native/EditKnowledge';
5+
6+
type PageProps = {
7+
params: Promise<{ slug: string[] }>;
8+
};
9+
10+
const EditKnowledgeNativePage = async ({ params }: PageProps) => {
11+
const resolvedParams = await params;
12+
13+
return (
14+
<AppLayout className="contribute-page">
15+
<EditKnowledge branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] === 'isDraft'} />
16+
</AppLayout>
17+
);
18+
};
19+
20+
export default EditKnowledgeNativePage;
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// src/app/contribute/knowledge/github/[...slug]/page.tsx
22
import * as React from 'react';
33
import { AppLayout } from '@/components/AppLayout';
4-
import EditKnowledge from '@/components/Contribute/EditKnowledge/github/EditKnowledge';
4+
import ViewKnowledgePage from '@/components/Contribute/Knowledge/View/github/ViewKnowledgePage';
55

66
type PageProps = {
77
params: Promise<{ slug: string[] }>;
88
};
99

10-
const EditKnowledgePage = async ({ params }: PageProps) => {
10+
const KnowledgeGithubPage = async ({ params }: PageProps) => {
1111
const resolvedParams = await params;
1212

1313
return (
1414
<AppLayout className="contribute-page">
15-
<EditKnowledge prNumber={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] != null ? true : false} />
15+
<ViewKnowledgePage branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] === 'isDraft'} />
1616
</AppLayout>
1717
);
1818
};
1919

20-
export default EditKnowledgePage;
20+
export default KnowledgeGithubPage;
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
// src/app/contribute/knowledge/github/[...slug]/page.tsx
1+
// src/app/contribute/knowledge/native/[...slug]/page.tsx
22
import * as React from 'react';
33
import { AppLayout } from '@/components/AppLayout';
4-
import EditKnowledge from '@/components/Contribute/EditKnowledge/native/EditKnowledge';
4+
import ViewKnowledgePage from '@/components/Contribute/Knowledge/View/native/ViewKnowledgePage';
55

66
type PageProps = {
77
params: Promise<{ slug: string[] }>;
88
};
99

10-
const EditKnowledgePage = async ({ params }: PageProps) => {
10+
const KnowledgeNativePage = async ({ params }: PageProps) => {
1111
const resolvedParams = await params;
1212

1313
return (
1414
<AppLayout className="contribute-page">
15-
<EditKnowledge branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] != null ? true : false} />
15+
<ViewKnowledgePage branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] === 'isDraft'} />
1616
</AppLayout>
1717
);
1818
};
1919

20-
export default EditKnowledgePage;
20+
export default KnowledgeNativePage;

src/app/contribute/knowledge/page.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ import React from 'react';
44
import { Flex, Spinner } from '@patternfly/react-core';
55
import { t_global_spacer_xl as XlSpacerSize } from '@patternfly/react-tokens';
66
import { AppLayout } from '@/components/AppLayout';
7-
import KnowledgeFormGithub from '@/components/Contribute/Knowledge/Github';
8-
import KnowledgeFormNative from '@/components/Contribute/Knowledge/Native';
97
import { useEnvConfig } from '@/context/EnvConfigContext';
8+
import KnowledgeWizard from '@/components/Contribute/Knowledge/KnowledgeWizard/KnowledgeWizard';
109

1110
const KnowledgeFormPage: React.FunctionComponent = () => {
1211
const {
@@ -17,7 +16,7 @@ const KnowledgeFormPage: React.FunctionComponent = () => {
1716
return (
1817
<AppLayout className="contribute-page">
1918
{loaded ? (
20-
<>{!isGithubMode ? <KnowledgeFormNative /> : <KnowledgeFormGithub />}</>
19+
<KnowledgeWizard isGithubMode={isGithubMode} />
2120
) : (
2221
<Flex alignItems={{ default: 'alignItemsCenter' }} justifyContent={{ default: 'justifyContentCenter' }} style={{ padding: XlSpacerSize.var }}>
2322
<Spinner size="xl" />
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// src/app/contribute/skill/edit/github/[...slug]/page.tsx
2+
import * as React from 'react';
3+
import { AppLayout } from '@/components/AppLayout';
4+
import EditSkill from '@/components/Contribute/Skill/Edit/github/EditSkill';
5+
6+
type PageProps = {
7+
params: Promise<{ slug: string[] }>;
8+
};
9+
10+
const EditSkillGithubPage = async ({ params }: PageProps) => {
11+
const resolvedParams = await params;
12+
13+
return (
14+
<AppLayout className="contribute-page">
15+
<EditSkill branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] === 'isDraft'} />
16+
</AppLayout>
17+
);
18+
};
19+
20+
export default EditSkillGithubPage;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// src/app/contribute/skill/edit/native/[...slug]/page.tsx
2+
import * as React from 'react';
3+
import { AppLayout } from '@/components/AppLayout';
4+
import EditSkill from '@/components/Contribute/Skill/Edit/native/EditSkill';
5+
6+
type PageProps = {
7+
params: Promise<{ slug: string[] }>;
8+
};
9+
10+
const EditSkillNativePage = async ({ params }: PageProps) => {
11+
const resolvedParams = await params;
12+
13+
return (
14+
<AppLayout className="contribute-page">
15+
<EditSkill branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] === 'isDraft'} />
16+
</AppLayout>
17+
);
18+
};
19+
20+
export default EditSkillNativePage;
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
// src/app/contribute/knowledge/github/[...slug]/page.tsx
1+
// src/app/contribute/skill/github/[...slug]/page.tsx
22
import * as React from 'react';
33
import { AppLayout } from '@/components/AppLayout';
4-
import EditSkill from '@/components/Contribute/EditSkill/github/EditSkill';
4+
import ViewSkillPage from '@/components/Contribute/Skill/View/github/ViewSkillPage';
55

66
type PageProps = {
77
params: Promise<{ slug: string[] }>;
88
};
99

10-
const EditKnowledgePage = async ({ params }: PageProps) => {
10+
const ViewSkillGithubPage = async ({ params }: PageProps) => {
1111
const resolvedParams = await params;
1212

1313
return (
1414
<AppLayout className="contribute-page">
15-
<EditSkill prNumber={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] != null ? true : false} />
15+
<ViewSkillPage branchName={resolvedParams.slug[0]} isDraft={resolvedParams.slug[1] === 'isDraft'} />
1616
</AppLayout>
1717
);
1818
};
1919

20-
export default EditKnowledgePage;
20+
export default ViewSkillGithubPage;

0 commit comments

Comments
 (0)