From 27d491f50323cc458f03091dec908bd0f2d8f4ad Mon Sep 17 00:00:00 2001 From: Ash Evans Date: Tue, 24 Sep 2024 11:01:16 +0100 Subject: [PATCH 01/52] removing the optional validation error fields from the auto fill examples Signed-off-by: Ash Evans Signed-off-by: Samarpita Bhaumik --- .../Contribute/Knowledge/AutoFill.ts | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/src/components/Contribute/Knowledge/AutoFill.ts b/src/components/Contribute/Knowledge/AutoFill.ts index 6aa3bca2..9e2aed12 100644 --- a/src/components/Contribute/Knowledge/AutoFill.ts +++ b/src/components/Contribute/Knowledge/AutoFill.ts @@ -6,29 +6,23 @@ const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ immutable: false, question: 'What is the brightest star in the Phoenix constellation called?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'Alpha Phoenicis or Ankaa is the brightest star in the Phoenix Constellation.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'Where did the Phoenix constellation first appear?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'The Phoenix constellation first appeared on a 35-cm diameter celestial globe published in 1597 (or 1598) in Amsterdam by Plancius with Jodocus Hondius.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: "What does 'The Bird Phoenix' symbolize?", isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: "'The Bird Phoenix' symbolizes the phoenix of classical mythology.", isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined } ]; @@ -37,30 +31,24 @@ const questionAndAnswerPairs2: QuestionAndAnswerPair[] = [ immutable: false, question: 'What are the characteristics of the Phoenix constellation?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'Phoenix is a small constellation bordered by Fornax and Sculptor to the north, Grus to the west, Tucana to the south, touching on the corner of Hydrus to the south, and Eridanus to the east and southeast. The bright star Achernar is nearby.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'When is the phoenix constellation most visible?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'Phoenix is most visible from locations such as Australia and South Africa during late Southern Hemisphere spring.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'What are the Phoenix Constellation boundaries?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'The official constellation boundaries for Phoenix, as set by Belgian astronomer Eugène Delporte in 1930, are defined by a polygon of 10 segments.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined } ]; @@ -69,31 +57,25 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ immutable: false, question: 'In the Phoenix constellation, how many stars have planets?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'In the Phoenix constellation, ten stars have been found to have planets to date, and four planetary systems have been discovered with the SuperWASP project.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'What is HD 142?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'HD 142 is a yellow giant that has an apparent magnitude of 5.7, and has a planet (HD 142 b) 1.36 times the mass of Jupiter which orbits every 328 days.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'Are WASP-4 and WASP-5 solar-type yellow stars?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'Yes, WASP-4 and WASP-5 are solar-type yellow stars around 1000 light years distant and of 13th magnitude, each with a single planet larger than Jupiter.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined } ]; @@ -102,28 +84,22 @@ const questionAndAnswerPairs4: QuestionAndAnswerPair[] = [ immutable: false, question: 'Is the Phoenix Constellation part of the Milky Way?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'The Phoenix constellation does not lie on the galactic plane of the Milky Way, and there are no prominent star clusters.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'How many light years away is NGC 625?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'NGC 625 is 24000 light years in diameter and is an outlying member of the Sculptor Group.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: "What is Robert's Quartet composed of?", isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: "Robert's Quartet is composed of the irregular galaxy NGC 87, and three spiral galaxies NGC 88, NGC 89 and NGC 92.", isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined } ]; @@ -132,28 +108,22 @@ const questionAndAnswerPairs5: QuestionAndAnswerPair[] = [ immutable: false, question: 'Do meteor showers originate from the Pheonix constellation?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'Phoenix is the radiant of two annual meteor showers.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'When were the first Phoenicids?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'The Phoenicids, also known as the December Phoenicids, were first observed on 3 December 1887.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined }, { immutable: false, question: 'When does the intensity of the Phoenicids peak?', isQuestionValid: ValidatedOptions.success, - questionValidationError: undefined, answer: 'It peaks around 4–5 December, though is not seen every year.', isAnswerValid: ValidatedOptions.success, - answerValidationError: undefined } ]; @@ -176,7 +146,6 @@ const seedExamples: SeedExample[] = [ [Pavo](Pavo_(constellation) "wikilink") and [Tucana](Tucana "wikilink"), are known as the Southern Birds.`, isContextValid: ValidatedOptions.success, - validationError: '', questionAndAnswers: questionAndAnswerPairs1 }, { @@ -209,7 +178,6 @@ const seedExamples: SeedExample[] = [ and [Beta Ceti](Beta_Ceti "wikilink")—Ankaa lies roughly in the centre of this.`, isContextValid: ValidatedOptions.success, - validationError: '', questionAndAnswers: questionAndAnswerPairs2 }, { @@ -234,7 +202,6 @@ const seedExamples: SeedExample[] = [ planetary companion of similar size and mass to Saturn. The planet completes an orbit every 3.9 days.`, isContextValid: ValidatedOptions.success, - validationError: '', questionAndAnswers: questionAndAnswerPairs3 }, { @@ -266,7 +233,6 @@ const seedExamples: SeedExample[] = [ [collision](Interacting_galaxy "wikilink") with ESO 243-49. Before its discovery, this class of black hole was only hypothesized.`, isContextValid: ValidatedOptions.success, - validationError: '', questionAndAnswers: questionAndAnswerPairs4 }, { @@ -280,7 +246,6 @@ const seedExamples: SeedExample[] = [ around July 14 with around one meteor an hour, though meteors can be seen anytime from July 3 to 18; this shower is referred to as the July Phoenicids.[59]`, isContextValid: ValidatedOptions.success, - validationError: '', questionAndAnswers: questionAndAnswerPairs5 } ]; @@ -289,7 +254,7 @@ export const autoFillKnowledgeFields: KnowledgeFormData = { email: 'helloworld@instructlab.com', name: 'juliadenham', submissionSummary: - 'Information about the Phoenix Constellation including the history, characteristics, and features of the stars in the constellation.', + 'Information about the Phoenix Constellation.', domain: 'astronomy', documentOutline: 'Information about the Phoenix Constellation including the history, characteristics, and features of the stars in the constellation.', From 9c30ef3d8ce558395ad05257716a07b4e68ca76c Mon Sep 17 00:00:00 2001 From: Ash Evans Date: Tue, 24 Sep 2024 11:05:45 +0100 Subject: [PATCH 02/52] sorting linting Signed-off-by: Ash Evans Signed-off-by: Samarpita Bhaumik --- .../Contribute/Knowledge/AutoFill.ts | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/components/Contribute/Knowledge/AutoFill.ts b/src/components/Contribute/Knowledge/AutoFill.ts index 9e2aed12..568db39b 100644 --- a/src/components/Contribute/Knowledge/AutoFill.ts +++ b/src/components/Contribute/Knowledge/AutoFill.ts @@ -7,7 +7,7 @@ const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ question: 'What is the brightest star in the Phoenix constellation called?', isQuestionValid: ValidatedOptions.success, answer: 'Alpha Phoenicis or Ankaa is the brightest star in the Phoenix Constellation.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -15,14 +15,14 @@ const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'The Phoenix constellation first appeared on a 35-cm diameter celestial globe published in 1597 (or 1598) in Amsterdam by Plancius with Jodocus Hondius.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: "What does 'The Bird Phoenix' symbolize?", isQuestionValid: ValidatedOptions.success, answer: "'The Bird Phoenix' symbolizes the phoenix of classical mythology.", - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -33,14 +33,14 @@ const questionAndAnswerPairs2: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is a small constellation bordered by Fornax and Sculptor to the north, Grus to the west, Tucana to the south, touching on the corner of Hydrus to the south, and Eridanus to the east and southeast. The bright star Achernar is nearby.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'When is the phoenix constellation most visible?', isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is most visible from locations such as Australia and South Africa during late Southern Hemisphere spring.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -48,7 +48,7 @@ const questionAndAnswerPairs2: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'The official constellation boundaries for Phoenix, as set by Belgian astronomer Eugène Delporte in 1930, are defined by a polygon of 10 segments.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -59,7 +59,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'In the Phoenix constellation, ten stars have been found to have planets to date, and four planetary systems have been discovered with the SuperWASP project.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -67,7 +67,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'HD 142 is a yellow giant that has an apparent magnitude of 5.7, and has a planet (HD 142 b) 1.36 times the mass of Jupiter which orbits every 328 days.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -75,7 +75,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'Yes, WASP-4 and WASP-5 are solar-type yellow stars around 1000 light years distant and of 13th magnitude, each with a single planet larger than Jupiter.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -85,21 +85,21 @@ const questionAndAnswerPairs4: QuestionAndAnswerPair[] = [ question: 'Is the Phoenix Constellation part of the Milky Way?', isQuestionValid: ValidatedOptions.success, answer: 'The Phoenix constellation does not lie on the galactic plane of the Milky Way, and there are no prominent star clusters.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'How many light years away is NGC 625?', isQuestionValid: ValidatedOptions.success, answer: 'NGC 625 is 24000 light years in diameter and is an outlying member of the Sculptor Group.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: "What is Robert's Quartet composed of?", isQuestionValid: ValidatedOptions.success, answer: "Robert's Quartet is composed of the irregular galaxy NGC 87, and three spiral galaxies NGC 88, NGC 89 and NGC 92.", - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -109,21 +109,21 @@ const questionAndAnswerPairs5: QuestionAndAnswerPair[] = [ question: 'Do meteor showers originate from the Pheonix constellation?', isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is the radiant of two annual meteor showers.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'When were the first Phoenicids?', isQuestionValid: ValidatedOptions.success, answer: 'The Phoenicids, also known as the December Phoenicids, were first observed on 3 December 1887.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'When does the intensity of the Phoenicids peak?', isQuestionValid: ValidatedOptions.success, answer: 'It peaks around 4–5 December, though is not seen every year.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -253,8 +253,7 @@ const seedExamples: SeedExample[] = [ export const autoFillKnowledgeFields: KnowledgeFormData = { email: 'helloworld@instructlab.com', name: 'juliadenham', - submissionSummary: - 'Information about the Phoenix Constellation.', + submissionSummary: 'Information about the Phoenix Constellation.', domain: 'astronomy', documentOutline: 'Information about the Phoenix Constellation including the history, characteristics, and features of the stars in the constellation.', From 9f5a3bb2699f6f96bf0ef841a421b39b30760070 Mon Sep 17 00:00:00 2001 From: Nathan Weinberg Date: Wed, 25 Sep 2024 14:16:51 -0400 Subject: [PATCH 03/52] docs: add workflow badges to README Signed-off-by: Nathan Weinberg Signed-off-by: Samarpita Bhaumik --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index aac56f50..04f9dc6c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # InstructLab UI +![Lint](https://github.com/instructlab/ui/actions/workflows/lint-ui.yml/badge.svg?branch=main) +![Image](https://github.com/instructlab/ui/actions/workflows/images.yml/badge.svg?branch=main) + Project aims to provide a UI based interface to the contributors and reviewers to submit and review contribution to [instructlab/taxonomy](https://github.com/instructlab/taxonomy). The intention is to simplify the process of contribution by providing a user friendly interface, that doesn't require the user to have a deep understanding of tools required to contribute skill and knowledge to the taxonomy. This project also aims to provide a platform for the reviewers to efficiently review the contributions and provide feedback to the contributors. From 7cef6ec87e1ab87855873dc8e9c720472111d02c Mon Sep 17 00:00:00 2001 From: Samarpita Bhaumik <54763781+samarpita-bhaumik@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:22:39 +0530 Subject: [PATCH 04/52] Enhance the responsiveness of the login experience I updated the githublogin.tsx by removing the Page and PageSection tags, replacing them with div tags. Additionally, I modified the githublogin.css to include both vertical and horizontal scrolling, ensuring the page adapts to any window size. Signed-off-by: Samarpita Bhaumik --- next-env.d.ts | 2 +- public/InstructLab-Background-Image.svg | 150 ++++++++++++++++++++++++ src/app/login/githublogin.css | 25 ++-- src/app/login/githublogin.tsx | 7 +- 4 files changed, 169 insertions(+), 15 deletions(-) create mode 100644 public/InstructLab-Background-Image.svg diff --git a/next-env.d.ts b/next-env.d.ts index 4f11a03d..40c3d680 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information. diff --git a/public/InstructLab-Background-Image.svg b/public/InstructLab-Background-Image.svg new file mode 100644 index 00000000..d75b9aac --- /dev/null +++ b/public/InstructLab-Background-Image.svg @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/app/login/githublogin.css b/src/app/login/githublogin.css index 6f230e5b..7fd63c32 100644 --- a/src/app/login/githublogin.css +++ b/src/app/login/githublogin.css @@ -1,28 +1,36 @@ a { - color: white; /* Change the text color to white */ - text-decoration: underline; /* Ensure the text is underlined */ + color: white; + text-decoration: underline; } .login-page-background { background-image: url('../../../public/InstructLab-Background-Image.png'); - /* Replace with your background image URL */ - background-size: cover; - background-position: center; - height: 100vh; + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; + + min-width: 100vh; + min-height: 100vh; + display: flex; align-items: center; justify-content: center; + + overflow-y: auto; + overflow-x: auto; } .login-container { text-align: center; + width: 100%; + max-width: 1200px; + padding: 20px; } .sign-in-text { margin-top: 1rem; color: white; padding: 20px; - text-align: center; font-size: xx-large; } @@ -32,14 +40,12 @@ a { padding-bottom: 50px; font-size: x-large; font-style: italic; - text-align: center; } .urls-text { margin-top: 1rem; color: white; padding: 20px; - text-align: center; font-size: large; } @@ -47,6 +53,5 @@ a { margin-top: 1rem; color: white; padding-top: 20px; - text-align: center; font-size: large; } diff --git a/src/app/login/githublogin.tsx b/src/app/login/githublogin.tsx index f658c2ef..931cb83d 100644 --- a/src/app/login/githublogin.tsx +++ b/src/app/login/githublogin.tsx @@ -16,8 +16,8 @@ const GithubLogin: React.FC = () => { }; return ( - - + +
@@ -67,8 +67,7 @@ const GithubLogin: React.FC = () => {
- - +
); }; From 4f231dd579098db873a379d4f8d1f969627a39a7 Mon Sep 17 00:00:00 2001 From: Patryk-Pierzchala1 Date: Thu, 19 Sep 2024 20:50:17 +0200 Subject: [PATCH 05/52] add about us modal Signed-off-by: Patryk-Pierzchala1 Signed-off-by: Samarpita Bhaumik --- public/InstructLab-About-Modal-Background.svg | 76 ++++++++++++++++ src/components/AboutModal/AboutModal.tsx | 64 +++++++++++++ .../AboutModal/about-modal.module.css | 79 ++++++++++++++++ src/components/AboutModal/data/linksData.ts | 18 ++++ src/components/HelpDropdown/HelpDropdown.tsx | 89 ++++++++++--------- 5 files changed, 286 insertions(+), 40 deletions(-) create mode 100644 public/InstructLab-About-Modal-Background.svg create mode 100644 src/components/AboutModal/AboutModal.tsx create mode 100644 src/components/AboutModal/about-modal.module.css create mode 100644 src/components/AboutModal/data/linksData.ts diff --git a/public/InstructLab-About-Modal-Background.svg b/public/InstructLab-About-Modal-Background.svg new file mode 100644 index 00000000..acc77852 --- /dev/null +++ b/public/InstructLab-About-Modal-Background.svg @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx new file mode 100644 index 00000000..da15be6a --- /dev/null +++ b/src/components/AboutModal/AboutModal.tsx @@ -0,0 +1,64 @@ +import { useCallback, type Dispatch, type SetStateAction } from 'react'; +import { AboutModal as PatternflyAboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; +import { Text, TextContent, TextVariants } from '@patternfly/react-core/dist/dynamic/components/Text'; +import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; +import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; +import InstructLabLogo from '../../../public/updated-logo.png'; +import InstructLabAboutUsBg from '../../../public/InstructLab-About-Modal-Background.svg'; +import styles from './about-modal.module.css'; +import { linksData } from './data/linksData'; + +const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { + const handleClose = useCallback(() => { + setIsOpen(false); + }, [setIsOpen]); + + return ( + +
+
+ + + About InstructLab + + + InstructLab is an open source AI project that allows you shape the future of Large Language Models. Join the community to start + contributing today. + + +
+
+ +
+
+ {linksData.map((link) => ( + + {link.name} + + ))} +
+ + + © InstructLab | Version 1.1 + + +
+
+ ); +}; + +type AboutModalProps = { + isOpen: boolean; + setIsOpen: Dispatch>; +}; + +export default AboutModal; diff --git a/src/components/AboutModal/about-modal.module.css b/src/components/AboutModal/about-modal.module.css new file mode 100644 index 00000000..9b99492b --- /dev/null +++ b/src/components/AboutModal/about-modal.module.css @@ -0,0 +1,79 @@ +.modal { + background-size: cover !important; + background-position: left !important; +} + +.modal > div:last-child > div { + display: flex; + flex-direction: column-reverse; + height: 100%; +} + +.modal > div:last-child > p { + display: none; +} + +.modalContent { + text-align: center; + height: 100% !important; +} + +/* hide brand img */ +.modal img { + visibility: hidden; +} + +.heading { + font-weight: 400 !important; +} + +.description { + width: 70% !important; + margin: auto; +} + +.joinCommunityButtonWrapper { + display: flex; + justify-content: center; + margin: 3rem 0; +} + +.joinCommunityButton { + background: rgb(46, 8, 17) !important; + background: linear-gradient(0deg, rgba(46, 8, 17, 1) 0%, rgba(42, 0, 0, 1) 100%) !important; + border-radius: 100px !important; + display: flex; + align-items: center; + gap: 1rem; +} + +.joinCommunityButton svg { + height: 2rem; + width: 2rem; +} + +.links { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: 0.5ch; + margin-bottom: 1rem; +} + +.link { + color: white !important; + font-weight: 300 !important; + text-decoration: underline !important; + border: none !important; +} + +.link:not(:last-of-type)::after { + content: '|'; + padding-left: 0.5ch; + position: static !important; + text-decoration: none !important; +} + +.version { + font-weight: 300 !important; +} diff --git a/src/components/AboutModal/data/linksData.ts b/src/components/AboutModal/data/linksData.ts new file mode 100644 index 00000000..5fa0de16 --- /dev/null +++ b/src/components/AboutModal/data/linksData.ts @@ -0,0 +1,18 @@ +export const linksData = [ + { + name: 'instructlab.ai', + href: 'https://instructlab.ai/' + }, + { + name: 'Collaborate', + href: 'https://github.com/instructlab/community/blob/main/Collaboration.md' + }, + { + name: 'Code of Conduct', + href: 'https://github.com/instructlab/community/blob/main/CODE_OF_CONDUCT.md' + }, + { + name: 'Sponsored by Red Hat', + href: 'https://www.redhat.com/' + } +]; diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index fdbaedc7..7474c9f1 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -1,12 +1,14 @@ -import React, { useState } from 'react'; +import React, { useCallback, useState } from 'react'; import { Flex, FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex'; import { Dropdown, DropdownItem, DropdownList } from '@patternfly/react-core/dist/esm/components/Dropdown'; import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/esm/components/MenuToggle'; import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/dynamic/icons/outlined-question-circle-icon'; +import AboutModal from '../AboutModal/AboutModal'; const HelpDropdown: React.FC = () => { const [isOpen, setIsOpen] = useState(false); + const [isAboutModalOpen, setIsAboutModalOpen] = useState(false); const onToggleClick = () => { setIsOpen(!isOpen); @@ -18,48 +20,55 @@ const HelpDropdown: React.FC = () => { setIsOpen(false); }; + const handleAboutUsModalOpen = useCallback(() => { + setIsAboutModalOpen(true); + }, []); + return ( - setIsOpen(isOpen)} - toggle={(toggleRef: React.Ref) => ( - - - - )} - shouldFocusToggleOnSelect - style={{ position: 'relative' }} - > - + setIsOpen(isOpen)} + toggle={(toggleRef: React.Ref) => ( + + + + )} + shouldFocusToggleOnSelect + style={{ position: 'relative' }} > - - - Documentation - - - - - + + + + Documentation + + + + + - - Help - - - About - - - + + Help + + + About + + + + + ); }; From 5b765a973653c9bbe8321b1b1418ec5dca72d37b Mon Sep 17 00:00:00 2001 From: Patryk-Pierzchala1 Date: Fri, 20 Sep 2024 15:48:00 +0200 Subject: [PATCH 06/52] grammar fix, correct version Signed-off-by: Patryk-Pierzchala1 Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index da15be6a..419968b7 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -29,7 +29,7 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { About InstructLab - InstructLab is an open source AI project that allows you shape the future of Large Language Models. Join the community to start + InstructLab is an open source AI project that allows you to shape the future of Large Language Models. Join the community to start contributing today. @@ -48,7 +48,7 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { - © InstructLab | Version 1.1 + © InstructLab | Version 1.0.0 From 7e9cea79232eabc09272ab4870308412bccd280d Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 09:59:49 +0100 Subject: [PATCH 07/52] Update about-modal.module.css to match UX design Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/about-modal.module.css | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/AboutModal/about-modal.module.css b/src/components/AboutModal/about-modal.module.css index 9b99492b..db18d9ca 100644 --- a/src/components/AboutModal/about-modal.module.css +++ b/src/components/AboutModal/about-modal.module.css @@ -24,23 +24,29 @@ } .heading { - font-weight: 400 !important; + font-weight: medium; + font-size: 28pt; + color: #dededd; } .description { width: 70% !important; margin: auto; + font-size: 18pt; + color: #ffffff; } .joinCommunityButtonWrapper { display: flex; justify-content: center; margin: 3rem 0; + font-size: 16pt; + font-weight: medium; + color: #ffffff; } .joinCommunityButton { - background: rgb(46, 8, 17) !important; - background: linear-gradient(0deg, rgba(46, 8, 17, 1) 0%, rgba(42, 0, 0, 1) 100%) !important; + background: #030303 !important; border-radius: 100px !important; display: flex; align-items: center; @@ -62,6 +68,7 @@ .link { color: white !important; + font-size: 12pt; font-weight: 300 !important; text-decoration: underline !important; border: none !important; @@ -76,4 +83,5 @@ .version { font-weight: 300 !important; + font-size: 14pt; } From 90a65ef0678e9830a35b926dca7b9aa251c704a6 Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:15:13 +0100 Subject: [PATCH 08/52] Adding an aria-label to the AboutModal. Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 419968b7..34bc74a0 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -21,6 +21,7 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { backgroundImageSrc={InstructLabAboutUsBg.src} brandImageSrc={InstructLabLogo.src} brandImageAlt="logo" + aria-label="About modal describing the InstructLab project." >
From 8df5b9891b8bed8e0a7adb3f91a69977d04c49aa Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:20:14 +0100 Subject: [PATCH 09/52] Update HelpDropdown.tsx to remove a redundant dev purpose console.log Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/HelpDropdown/HelpDropdown.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index 7474c9f1..8a507439 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -16,7 +16,6 @@ const HelpDropdown: React.FC = () => { const onSelect = (_event: React.MouseEvent | undefined, value: string | number | undefined) => { // eslint-disable-next-line no-console - console.log('selected', value); setIsOpen(false); }; From 44950161df70d3a9c1560b76552f3ca353673c01 Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:25:17 +0100 Subject: [PATCH 10/52] Update HelpDropdown.tsx to remove the redundant params on the onSelect function. Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/HelpDropdown/HelpDropdown.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index 8a507439..7a4b485e 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -14,8 +14,7 @@ const HelpDropdown: React.FC = () => { setIsOpen(!isOpen); }; - const onSelect = (_event: React.MouseEvent | undefined, value: string | number | undefined) => { - // eslint-disable-next-line no-console + const onSelect = () => { setIsOpen(false); }; From dc6ad29f64dd4bb73bd355be0f8574cb6ff59d93 Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:32:25 +0100 Subject: [PATCH 11/52] Update AboutModal.tsx join the community button to link out to instructlab Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 34bc74a0..dc8801e5 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -35,11 +35,11 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => {
- +
{linksData.map((link) => ( From de7975afadef424c501d9298db14973c5d15fb1b Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Wed, 25 Sep 2024 12:13:11 -0700 Subject: [PATCH 12/52] Remove redundant title description from individual seed example Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- .../Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx | 6 +++--- src/components/Contribute/Knowledge/Submit/Submit.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx index 541ee916..437e0ae4 100644 --- a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx @@ -36,7 +36,7 @@ const KnowledgeSeedExample: React.FC = ({ ), id: 'seed-examples-id' }} - titleDescription="Add seed examples with context and Q&A pairs. Minimum 5 seed examples are required." + titleDescription="Add seed examples with context and minimum 3 question and answer pairs. Minimum 5 seed examples are required." /> } > @@ -50,12 +50,12 @@ const KnowledgeSeedExample: React.FC = ({ titleText={{ text: (

- Knowledge Seed Example {seedExampleIndex + 1} {seedExample.immutable && *} + Seed Example {seedExampleIndex + 1} {seedExample.immutable && *}

), id: 'nested-field-group1-titleText-id' }} - titleDescription="Please enter context and at least 3 Q&A pairs for the seed example." + titleDescription="" /> } > diff --git a/src/components/Contribute/Knowledge/Submit/Submit.tsx b/src/components/Contribute/Knowledge/Submit/Submit.tsx index c39f5453..d0c24bac 100644 --- a/src/components/Contribute/Knowledge/Submit/Submit.tsx +++ b/src/components/Contribute/Knowledge/Submit/Submit.tsx @@ -105,7 +105,7 @@ const Submit: React.FC = ({ disableAction, knowledgeFormData, setActionGr }; return ( ); }; From a360a50cf96ca8e14fee5375cb7b7032e06864f6 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Wed, 25 Sep 2024 14:11:04 -0700 Subject: [PATCH 13/52] Minor styling fixes for About modal Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 22 +++++----- .../AboutModal/about-modal.module.css | 40 +++++++++---------- src/components/HelpDropdown/HelpDropdown.tsx | 6 +-- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index dc8801e5..696d388f 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -1,5 +1,4 @@ import { useCallback, type Dispatch, type SetStateAction } from 'react'; -import { AboutModal as PatternflyAboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; import { Text, TextContent, TextVariants } from '@patternfly/react-core/dist/dynamic/components/Text'; import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; @@ -7,14 +6,15 @@ import InstructLabLogo from '../../../public/updated-logo.png'; import InstructLabAboutUsBg from '../../../public/InstructLab-About-Modal-Background.svg'; import styles from './about-modal.module.css'; import { linksData } from './data/linksData'; +import { AboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; -const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { +const AboutInstructLab = ({ isOpen, setIsOpen }: AboutModalProps) => { const handleClose = useCallback(() => { setIsOpen(false); }, [setIsOpen]); return ( - {
- - About InstructLab - + About InstructLab + + - InstructLab is an open source AI project that allows you to shape the future of Large Language Models. Join the community to start - contributing today. + InstructLab is an open source AI project that allows
you to shape the future of Large Language Models. +
Join the community to start contributing today.
@@ -49,11 +49,11 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => {
- © InstructLab | Version 1.0.0 + © InstructLab | Version 1.0.0 Beta
- + ); }; @@ -62,4 +62,4 @@ type AboutModalProps = { setIsOpen: Dispatch>; }; -export default AboutModal; +export default AboutInstructLab; diff --git a/src/components/AboutModal/about-modal.module.css b/src/components/AboutModal/about-modal.module.css index db18d9ca..dfea9209 100644 --- a/src/components/AboutModal/about-modal.module.css +++ b/src/components/AboutModal/about-modal.module.css @@ -9,10 +9,6 @@ height: 100%; } -.modal > div:last-child > p { - display: none; -} - .modalContent { text-align: center; height: 100% !important; @@ -23,39 +19,43 @@ visibility: hidden; } -.heading { - font-weight: medium; - font-size: 28pt; - color: #dededd; +.modal button { + background: #030303 !important; + border-radius: 80px !important; +} + +.aboutInstructlab { + margin-top: 1rem; + color: white; + padding: 20px; + text-align: center; + font-size: xx-large; } .description { - width: 70% !important; - margin: auto; - font-size: 18pt; - color: #ffffff; + margin-top: 1rem; + color: white; + padding-bottom: 50px; + font-size: x-large; + font-style: italic; + text-align: center; } .joinCommunityButtonWrapper { display: flex; justify-content: center; margin: 3rem 0; - font-size: 16pt; - font-weight: medium; color: #ffffff; } .joinCommunityButton { background: #030303 !important; - border-radius: 100px !important; - display: flex; - align-items: center; - gap: 1rem; + border-radius: 80px !important; } .joinCommunityButton svg { - height: 2rem; - width: 2rem; + height: 1rem; + width: 1.5rem; } .links { diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index 7a4b485e..c353173c 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -4,7 +4,7 @@ import { Dropdown, DropdownItem, DropdownList } from '@patternfly/react-core/dis import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/esm/components/MenuToggle'; import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/dynamic/icons/outlined-question-circle-icon'; -import AboutModal from '../AboutModal/AboutModal'; +import AboutInstructLab from '../AboutModal/AboutModal'; const HelpDropdown: React.FC = () => { const [isOpen, setIsOpen] = useState(false); @@ -57,7 +57,7 @@ const HelpDropdown: React.FC = () => { - + Help @@ -65,7 +65,7 @@ const HelpDropdown: React.FC = () => { - + ); }; From 52a60c861a405ef47135d75e67dac2881de04f4c Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Wed, 25 Sep 2024 23:51:52 -0700 Subject: [PATCH 14/52] Move Kind deployment related menifests files to kind overlay directory Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- Makefile | 4 ++-- deploy/k8s/{ => overlays/kind}/kind-ingress.yaml | 0 deploy/k8s/{ => overlays/kind}/kind.yaml | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename deploy/k8s/{ => overlays/kind}/kind-ingress.yaml (100%) rename deploy/k8s/{ => overlays/kind}/kind.yaml (100%) diff --git a/Makefile b/Makefile index 841d7919..8a639690 100644 --- a/Makefile +++ b/Makefile @@ -89,9 +89,9 @@ stop-dev-kind: check-kind ## Stop the Kind cluster to destroy the development en .PHONY: setup-kind setup-kind: check-kind check-kubectl stop-dev ## Create a Kind cluster with ingress enabled - $(CMD_PREFIX) kind create cluster --config ./deploy/k8s/kind.yaml + $(CMD_PREFIX) kind create cluster --config ./deploy/k8s/overlays/kind/kind.yaml $(CMD_PREFIX) kubectl cluster-info - $(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) apply -f ./deploy/k8s/kind-ingress.yaml + $(CMD_PREFIX) kubectl --context=$(ILAB_KUBE_CONTEXT) apply -f ./deploy/k8s/overlays/kind/kind-ingress.yaml .PHONY: wait-for-readiness wait-for-readiness: # Wait for operators to be ready diff --git a/deploy/k8s/kind-ingress.yaml b/deploy/k8s/overlays/kind/kind-ingress.yaml similarity index 100% rename from deploy/k8s/kind-ingress.yaml rename to deploy/k8s/overlays/kind/kind-ingress.yaml diff --git a/deploy/k8s/kind.yaml b/deploy/k8s/overlays/kind/kind.yaml similarity index 100% rename from deploy/k8s/kind.yaml rename to deploy/k8s/overlays/kind/kind.yaml From ea1a1a96fc4512096774ea250c0a9aa1b4f6fe02 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 00:02:53 -0700 Subject: [PATCH 15/52] Move qa deployment manifest under openshift/qa directory Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- Makefile | 27 ++++++++++--------- .../openshift/{ => qa}/certificate.yaml | 2 +- .../overlays/openshift/{ => qa}/issuer.yaml | 0 .../openshift/{ => qa}/kustomization.yaml | 0 4 files changed, 16 insertions(+), 13 deletions(-) rename deploy/k8s/overlays/openshift/{ => qa}/certificate.yaml (95%) rename deploy/k8s/overlays/openshift/{ => qa}/issuer.yaml (100%) rename deploy/k8s/overlays/openshift/{ => qa}/kustomization.yaml (100%) diff --git a/Makefile b/Makefile index 8a639690..d17b9dc5 100644 --- a/Makefile +++ b/Makefile @@ -123,24 +123,27 @@ undeploy: ## Undeploy the InstructLab UI stack from a kubernetes cluster .PHONY: start-dev-kind ## Run the development environment on Kind cluster start-dev-kind: setup-kind deploy ## Setup a Kind cluster and deploy InstructLab UI on it -##@ OpenShift - UI deployment in OpenShift -.PHONY: deploy-openshift -deploy-openshift: ## Deploy the InstructLab UI on OpenShift +##@ OpenShift - UI prod and qa deployment on OpenShift +.PHONY: deploy-qa-openshift +deploy-qa-openshift: ## Deploy QA stack of the InstructLab UI on OpenShift $(CMD_PREFIX) if [ ! -f .env ]; then \ echo "Please create a .env file in the root of the project." ; \ exit 1 ; \ fi - $(CMD_PREFIX) yes | cp -rf .env ./deploy/k8s/overlays/openshift/.env - $(CMD_PREFIX) oc apply -k ./deploy/k8s/overlays/openshift + $(CMD_PREFIX) yes | cp -rf .env ./deploy/k8s/overlays/openshift/qa/.env + $(CMD_PREFIX) oc apply -k ./deploy/k8s/overlays/openshift/qa $(CMD_PREFIX) oc wait --for=condition=Ready pods -n $(ILAB_KUBE_NAMESPACE) --all -l app.kubernetes.io/part-of=ui --timeout=15m -.PHONY: redeploy-openshift -redeploy-openshift: deploy-openshift ## Redeploy the InstructLab UI on OpenShift +.PHONY: redeploy-qa-openshift +redeploy-qa-openshift: ## Redeploy QA stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/ui + $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/pathservice -.PHONY: undeploy-openshift -undeploy-openshift: ## Undeploy the InstructLab UI on OpenShift - $(CMD_PREFIX) oc delete -k ./deploy/k8s/overlays/openshift - $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/.env ]; then \ - rm ./deploy/k8s/overlays/openshift/.env ; \ + +.PHONY: undeploy-qa-openshift +undeploy-qa-openshift: ## Undeploy QA stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) oc delete -k ./deploy/k8s/overlays/openshift/qa + $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/qa/.env ]; then \ + rm ./deploy/k8s/overlays/openshift/qa/.env ; \ fi diff --git a/deploy/k8s/overlays/openshift/certificate.yaml b/deploy/k8s/overlays/openshift/qa/certificate.yaml similarity index 95% rename from deploy/k8s/overlays/openshift/certificate.yaml rename to deploy/k8s/overlays/openshift/qa/certificate.yaml index 3d1d1256..4fa9010a 100644 --- a/deploy/k8s/overlays/openshift/certificate.yaml +++ b/deploy/k8s/overlays/openshift/qa/certificate.yaml @@ -8,7 +8,7 @@ spec: renewBefore: 360h0m0s subject: organizations: - - nexodus + - InstructLab privateKey: algorithm: RSA encoding: PKCS1 diff --git a/deploy/k8s/overlays/openshift/issuer.yaml b/deploy/k8s/overlays/openshift/qa/issuer.yaml similarity index 100% rename from deploy/k8s/overlays/openshift/issuer.yaml rename to deploy/k8s/overlays/openshift/qa/issuer.yaml diff --git a/deploy/k8s/overlays/openshift/kustomization.yaml b/deploy/k8s/overlays/openshift/qa/kustomization.yaml similarity index 100% rename from deploy/k8s/overlays/openshift/kustomization.yaml rename to deploy/k8s/overlays/openshift/qa/kustomization.yaml From 2460d559d3307aec6d78ea08f206767ff3fc142f Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 00:14:42 -0700 Subject: [PATCH 16/52] Manifest files for production deployment of InstructLab UI stack Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- Makefile | 24 +++++++++ .../overlays/openshift/prod/certificate.yaml | 23 +++++++++ .../k8s/overlays/openshift/prod/issuer.yaml | 14 ++++++ .../openshift/prod/kustomization.yaml | 49 +++++++++++++++++++ .../overlays/openshift/qa/kustomization.yaml | 4 +- 5 files changed, 112 insertions(+), 2 deletions(-) create mode 100644 deploy/k8s/overlays/openshift/prod/certificate.yaml create mode 100644 deploy/k8s/overlays/openshift/prod/issuer.yaml create mode 100644 deploy/k8s/overlays/openshift/prod/kustomization.yaml diff --git a/Makefile b/Makefile index d17b9dc5..0c52c2db 100644 --- a/Makefile +++ b/Makefile @@ -147,3 +147,27 @@ undeploy-qa-openshift: ## Undeploy QA stack of the InstructLab UI on OpenShift $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/qa/.env ]; then \ rm ./deploy/k8s/overlays/openshift/qa/.env ; \ fi + +.PHONY: deploy-prod-openshift +deploy-prod-openshift: ## Deploy production stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) if [ ! -f .env ]; then \ + echo "Please create a .env file in the root of the project." ; \ + exit 1 ; \ + fi + + $(CMD_PREFIX) yes | cp -rf .env ./deploy/k8s/overlays/openshift/prod/.env + $(CMD_PREFIX) oc apply -k ./deploy/k8s/overlays/openshift/prod + $(CMD_PREFIX) oc wait --for=condition=Ready pods -n $(ILAB_KUBE_NAMESPACE) --all -l app.kubernetes.io/part-of=ui --timeout=15m + +.PHONY: redeploy-prod-openshift +redeploy-prod-openshift: ## Redeploy production stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/ui + $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/pathservice + + +.PHONY: undeploy-prod-openshift +undeploy-prod-openshift: ## Undeploy production stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) oc delete -k ./deploy/k8s/overlays/openshift/prod + $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/prod/.env ]; then \ + rm ./deploy/k8s/overlays/openshift/prod/.env ; \ + fi diff --git a/deploy/k8s/overlays/openshift/prod/certificate.yaml b/deploy/k8s/overlays/openshift/prod/certificate.yaml new file mode 100644 index 00000000..99833117 --- /dev/null +++ b/deploy/k8s/overlays/openshift/prod/certificate.yaml @@ -0,0 +1,23 @@ +apiVersion: cert-manager.io/v1 +kind: Certificate +metadata: + name: letsencrypt-ui +spec: + secretName: letsencrypt-ui + duration: 2160h0m0s + renewBefore: 360h0m0s + subject: + organizations: + - InstructLab + privateKey: + algorithm: RSA + encoding: PKCS1 + size: 2048 + usages: + - server auth + - client auth + dnsNames: + - ui.instructlab.ai + issuerRef: + name: letsencrypt-ui + kind: Issuer diff --git a/deploy/k8s/overlays/openshift/prod/issuer.yaml b/deploy/k8s/overlays/openshift/prod/issuer.yaml new file mode 100644 index 00000000..18d17312 --- /dev/null +++ b/deploy/k8s/overlays/openshift/prod/issuer.yaml @@ -0,0 +1,14 @@ +apiVersion: cert-manager.io/v1 +kind: Issuer +metadata: + name: letsencrypt-ui +spec: + acme: + email: avishnoi@redhat.com + privateKeySecretRef: + name: letsencrypt-ui-key + server: 'https://acme-v02.api.letsencrypt.org/directory' + solvers: + - http01: + ingress: + serviceType: ClusterIP diff --git a/deploy/k8s/overlays/openshift/prod/kustomization.yaml b/deploy/k8s/overlays/openshift/prod/kustomization.yaml new file mode 100644 index 00000000..3a5dd883 --- /dev/null +++ b/deploy/k8s/overlays/openshift/prod/kustomization.yaml @@ -0,0 +1,49 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +namespace: instructlab +resources: + - ../../base + - issuer.yaml + - certificate.yaml + +secretGenerator: +- name: ui-config + envs: + - .env + +patches: + - target: + kind: Ingress + name: ui + patch: |- + - op: replace + path: /spec/rules/0/http/paths/0/pathType + value: ImplementationSpecific + - op: replace + path: /spec/rules/0/http/paths/0/path + value: '' + - op: replace + path: /spec/rules/0/host + value: ui.instructlab.ai + - op: replace + path: /spec/tls/0/hosts/0 + value: ui.instructlab.ai + + # Override the UI image for Openshift production deployment + - target: + kind: Deployment + name: ui + patch: |- + - op: replace + path: /spec/template/spec/containers/0/image + value: quay.io/instructlab-ui/ui:v1.0.0-beta # Override this image if you want to use a different UI image + + # Override the pathservice image for Openshift production deployment + - target: + kind: Deployment + name: pathservice + patch: |- + - op: replace + path: /spec/template/spec/containers/0/image + value: quay.io/instructlab-ui/pathservice:v1.0.0-beta # Override this image if you want to use a different pathservice image + diff --git a/deploy/k8s/overlays/openshift/qa/kustomization.yaml b/deploy/k8s/overlays/openshift/qa/kustomization.yaml index 9848142e..98f8e40f 100644 --- a/deploy/k8s/overlays/openshift/qa/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/qa/kustomization.yaml @@ -29,7 +29,7 @@ patches: path: /spec/tls/0/hosts/0 value: qa.ui.instructlab.ai - # Override the UI image for Openshift deployment + # Override the UI image for Openshift QA deployment - target: kind: Deployment name: ui @@ -38,7 +38,7 @@ patches: path: /spec/template/spec/containers/0/image value: quay.io/instructlab-ui/ui:main # Override this image if you want to use a different UI image - # Override the pathservice image for Openshift deployment + # Override the pathservice image for Openshift QA deployment - target: kind: Deployment name: pathservice From 2eaa73811caf2b64961e0cddb97f47d96b478777 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 00:56:20 -0700 Subject: [PATCH 17/52] Add yaml lint targe to Makefile Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 0c52c2db..4a6ff5b8 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,16 @@ action-lint: ## Lint GitHub Action workflows fi $(CMD_PREFIX) actionlint -color +.PHONY: yaml-lint +yaml-lint: ## Lint yaml files + $(CMD_PREFIX) if ! which yamllint >/dev/null 2>&1; then \ + echo "Please install yamllint." ; \ + echo "See: https://yamllint.readthedocs.io/en/stable/quickstart.html" ; \ + exit 1 ; \ + fi + $(ECHO_PREFIX) printf " %-12s ./...\n" "[YAML LINT]" + $(CMD_PREFIX) yamllint -c .yamllint.yaml deploy --strict + ##@ Artifacts - Command to build and publish artifacts ui-image: Containerfile ## Build continaer image for the InstructLab UI $(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docker]" From dd7587db8439d1d93436d92abe6e8df05746601e Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 01:24:36 -0700 Subject: [PATCH 18/52] Fix yaml linting errors Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- deploy/k8s/base/ui/ingress.yaml | 6 +++--- deploy/k8s/overlays/kind/kustomization.yaml | 7 +++---- deploy/k8s/overlays/openshift/prod/kustomization.yaml | 9 ++++----- deploy/k8s/overlays/openshift/qa/kustomization.yaml | 9 ++++----- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/deploy/k8s/base/ui/ingress.yaml b/deploy/k8s/base/ui/ingress.yaml index a539100d..3d5f94b7 100644 --- a/deploy/k8s/base/ui/ingress.yaml +++ b/deploy/k8s/base/ui/ingress.yaml @@ -4,9 +4,9 @@ metadata: name: ui spec: tls: - - hosts: - - localhost - secretName: letsencrypt-ui + - hosts: + - localhost + secretName: letsencrypt-ui rules: - host: localhost http: diff --git a/deploy/k8s/overlays/kind/kustomization.yaml b/deploy/k8s/overlays/kind/kustomization.yaml index fca41c76..dfed5672 100644 --- a/deploy/k8s/overlays/kind/kustomization.yaml +++ b/deploy/k8s/overlays/kind/kustomization.yaml @@ -5,9 +5,9 @@ resources: - ../../base secretGenerator: -- name: ui-config - envs: - - .env + - name: ui-config + envs: + - .env patches: - target: @@ -40,4 +40,3 @@ patches: - op: replace path: /spec/template/spec/containers/0/imagePullPolicy value: Always - diff --git a/deploy/k8s/overlays/openshift/prod/kustomization.yaml b/deploy/k8s/overlays/openshift/prod/kustomization.yaml index 3a5dd883..64526af1 100644 --- a/deploy/k8s/overlays/openshift/prod/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/prod/kustomization.yaml @@ -2,14 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: instructlab resources: - - ../../base + - ../../../base - issuer.yaml - certificate.yaml secretGenerator: -- name: ui-config - envs: - - .env + - name: ui-config + envs: + - .env patches: - target: @@ -46,4 +46,3 @@ patches: - op: replace path: /spec/template/spec/containers/0/image value: quay.io/instructlab-ui/pathservice:v1.0.0-beta # Override this image if you want to use a different pathservice image - diff --git a/deploy/k8s/overlays/openshift/qa/kustomization.yaml b/deploy/k8s/overlays/openshift/qa/kustomization.yaml index 98f8e40f..93e905d6 100644 --- a/deploy/k8s/overlays/openshift/qa/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/qa/kustomization.yaml @@ -2,14 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: instructlab resources: - - ../../base + - ../../../base - issuer.yaml - certificate.yaml secretGenerator: -- name: ui-config - envs: - - .env + - name: ui-config + envs: + - .env patches: - target: @@ -46,4 +46,3 @@ patches: - op: replace path: /spec/template/spec/containers/0/image value: quay.io/instructlab-ui/pathservice:main # Override this image if you want to use a different pathservice image - From e10363499ea7398630892739108ea2f432aed85b Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 03:13:48 -0700 Subject: [PATCH 19/52] Change limit from 750 char to words Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- .../FilePathInformation.tsx | 2 +- .../KnowledgeQuestionAnswerPairs.tsx | 9 +- src/components/Contribute/Knowledge/index.tsx | 100 +++++++++++------- .../Contribute/Knowledge/validation.tsx | 17 +-- 4 files changed, 80 insertions(+), 48 deletions(-) diff --git a/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx b/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx index 0282b484..4218c693 100644 --- a/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx +++ b/src/components/Contribute/Knowledge/FilePathInformation/FilePathInformation.tsx @@ -23,7 +23,7 @@ const FilePathInformation: React.FC = ({ reset, path, setFilePath }) => { ), id: 'file-path-info-id' }} - titleDescription="Specify the file path for the QnA and Attribution files." + titleDescription="Specify the file path for the QnA and Attribution files. Once path is selected, please add your leaf directory name for your contribution." /> } > diff --git a/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx b/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx index 118b2163..7c2e1f6c 100644 --- a/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs.tsx @@ -35,8 +35,7 @@ const KnowledgeQuestionAnswerPairs: React.FC = ({ isRequired type="text" aria-label={`Context ${seedExampleIndex + 1}`} - placeholder="Enter the context from which the Q&A pairs are derived. (500 character max)" - maxLength={500} + placeholder="Enter the context from which the Q&A pairs are derived. (500 words max)" value={seedExample.context} validated={seedExample.isContextValid} onChange={(_event, contextValue: string) => handleContextInputChange(seedExampleIndex, contextValue)} @@ -46,7 +45,7 @@ const KnowledgeQuestionAnswerPairs: React.FC = ({ } variant={seedExample.isContextValid}> - {seedExample.validationError || 'Context is required. It must be non empty and less than 500 characters.'} + {seedExample.validationError ? seedExample.validationError : 'Context is required. It must be non empty and less than 500 words.'} @@ -87,7 +86,7 @@ const KnowledgeQuestionAnswerPairs: React.FC = ({ } variant={seedExample.questionAndAnswers[questionAnswerIndex].isQuestionValid}> {seedExample.questionAndAnswers[questionAnswerIndex].questionValidationError || - 'Question is required. Total length of all Q&A pairs should be less than 250 characters.'} + 'Question is required. Total length of all Q&A pairs should be less than 250 words.'} @@ -108,7 +107,7 @@ const KnowledgeQuestionAnswerPairs: React.FC = ({ } variant={seedExample.questionAndAnswers[questionAnswerIndex].isAnswerValid}> {seedExample.questionAndAnswers[questionAnswerIndex].answerValidationError || - 'Answer is required. Total length of all Q&A pairs should be less than 250 characters.'} + 'Answer is required. Total length of all Q&A pairs should be less than 250 words.'} diff --git a/src/components/Contribute/Knowledge/index.tsx b/src/components/Contribute/Knowledge/index.tsx index ac2dadcf..18c3dc43 100644 --- a/src/components/Contribute/Knowledge/index.tsx +++ b/src/components/Contribute/Knowledge/index.tsx @@ -220,31 +220,65 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno } }, [knowledgeEditFormData]); - const validateContext = (context: string): ValidatedOptions => { - if (context.length > 0 && context.length < 500) { + const validateContext = (seedExample: SeedExample): SeedExample => { + // Split the context into words based on spaces + const contextStr = seedExample.context.trim(); + if (contextStr.length == 0) { + setDisableAction(true); + seedExample.validationError = 'Context is required'; + seedExample.isContextValid = ValidatedOptions.error; + return seedExample; + } + const tokens = contextStr.split(/\s+/); + if (tokens.length > 0 && tokens.length <= 500) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return ValidatedOptions.success; + seedExample.isContextValid = ValidatedOptions.success; + return seedExample; } setDisableAction(true); - return ValidatedOptions.error; + seedExample.validationError = 'Context must be less than 500 words. Current word count: ' + tokens.length; + seedExample.isContextValid = ValidatedOptions.error; + return seedExample; }; - const validateQuestion = (question: string): ValidatedOptions => { - if (question.length > 0 && question.length < 250) { + const validateQuestion = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { + const questionStr = qnaPair.question.trim(); + if (questionStr.length == 0) { + setDisableAction(true); + qnaPair.questionValidationError = 'Question is required'; + qnaPair.isQuestionValid = ValidatedOptions.error; + return qnaPair; + } + const tokens = questionStr.split(/\s+/); + if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return ValidatedOptions.success; + qnaPair.isQuestionValid = ValidatedOptions.success; + return qnaPair; } setDisableAction(true); - return ValidatedOptions.error; + qnaPair.questionValidationError = 'Question must be less than 250 words. Current word count: ' + tokens.length; + qnaPair.isQuestionValid = ValidatedOptions.error; + return qnaPair; }; - const validateAnswer = (answer: string): ValidatedOptions => { - if (answer.length > 0 && answer.length < 250) { + const validateAnswer = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { + const answerStr = qnaPair.answer.trim(); + if (answerStr.length == 0) { + setDisableAction(true); + qnaPair.answerValidationError = 'Answer is required'; + qnaPair.isAnswerValid = ValidatedOptions.error; + return qnaPair; + } + const tokens = answerStr.split(/\s+/); + if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return ValidatedOptions.success; + qnaPair.isAnswerValid = ValidatedOptions.success; + return qnaPair; } setDisableAction(true); - return ValidatedOptions.error; + qnaPair.answerValidationError = 'Answer must be less than 250 words. Current word count: ' + tokens.length; + qnaPair.isAnswerValid = ValidatedOptions.error; + return qnaPair; }; const handleContextInputChange = (seedExampleIndex: number, contextValue: string): void => { @@ -262,14 +296,12 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno const handleContextBlur = (seedExampleIndex: number): void => { setSeedExamples( - seedExamples.map((seedExample: SeedExample, index: number) => - index === seedExampleIndex - ? { - ...seedExample, - isContextValid: validateContext(seedExample.context) - } - : seedExample - ) + seedExamples.map((seedExample: SeedExample, index: number) => { + if (index === seedExampleIndex) { + return validateContext(seedExample); + } + return seedExample; + }) ); }; @@ -299,14 +331,12 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno index === seedExampleIndex ? { ...seedExample, - questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => - index === questionAndAnswerIndex - ? { - ...questionAndAnswerPair, - isQuestionValid: validateQuestion(questionAndAnswerPair.question) - } - : questionAndAnswerPair - ) + questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { + if (index === questionAndAnswerIndex) { + return validateQuestion(questionAndAnswerPair); + } + return questionAndAnswerPair; + }) } : seedExample ) @@ -339,14 +369,12 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno index === seedExampleIndex ? { ...seedExample, - questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => - index === questionAndAnswerIndex - ? { - ...questionAndAnswerPair, - isAnswerValid: validateAnswer(questionAndAnswerPair.answer) - } - : questionAndAnswerPair - ) + questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { + if (index === questionAndAnswerIndex) { + return validateAnswer(questionAndAnswerPair); + } + return questionAndAnswerPair; + }) } : seedExample ) diff --git a/src/components/Contribute/Knowledge/validation.tsx b/src/components/Contribute/Knowledge/validation.tsx index ff59e9e9..c72f3752 100644 --- a/src/components/Contribute/Knowledge/validation.tsx +++ b/src/components/Contribute/Knowledge/validation.tsx @@ -34,13 +34,18 @@ const hasDuplicateQuestionAndAnswerPairs = (seedExample: SeedExample): { duplica return { duplicate: false, index: -1 }; }; -// Validate that the total length of all the question and answer pairs in a seed example is not more than 250 characters +// Validate that the total length of all the question and answer pairs +// and context in a seed example is not more than 750 characters. const validateQuestionAndAnswerPairs = (seedExample: SeedExample): { success: boolean; currLength: number } => { - const totalLength = seedExample.questionAndAnswers.reduce((acc, questionAndAnswerPair) => { - return acc + questionAndAnswerPair.question.length + questionAndAnswerPair.answer.length; + const totalQnAPairsTokenCount = seedExample.questionAndAnswers.reduce((acc, questionAndAnswerPair) => { + const questionTokens = questionAndAnswerPair.question.trim().split(/\s+/); + const answerTokens = questionAndAnswerPair.answer.trim().split(/\s+/); + return acc + questionTokens.length + answerTokens.length; }, 0); - if (totalLength > 250) { + const contextTokens = seedExample.context.trim().split(/\s+/); + const totalLength = totalQnAPairsTokenCount + contextTokens.length; + if (totalLength > 750) { return { success: false, currLength: totalLength }; } return { success: true, currLength: totalLength }; @@ -133,8 +138,8 @@ export const validateFields = ( const { success, currLength: length } = validateQuestionAndAnswerPairs(knowledgeFormData.seedExamples[index]); if (!success) { const actionGroupAlertContent: ActionGroupAlertContent = { - title: `Seed example ${index} has an issue!`, - message: `Total size of the Q&A pairs should not exceed 250 characters (current size ${length}). Please provide shorter Q&A pairs.`, + title: `Seed Example ${index + 1} has an issue!`, + message: `Total size of the Q&A pairs and context should not exceed 750 words (current size ${length}). Please provide shorter Q&A pairs or context.`, success: false }; setActionGroupAlertContent(actionGroupAlertContent); From 2908feda84700301dd27e3c544dc0b9896e17312 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 11:45:27 -0700 Subject: [PATCH 20/52] Add help links from docs.instructlab.ai for skill and knowledge contribution Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- .../KnowledgeDescriptionContent.tsx | 12 +++++++++--- .../KnowledgeSeedExample/KnowledgeSeedExample.tsx | 12 +++++++++++- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx b/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx index ca5b0805..a66c7485 100644 --- a/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeDescription/KnowledgeDescriptionContent.tsx @@ -11,9 +11,15 @@ const KnowledgeDescriptionContent: React.FunctionComponent = () => { Knowledge in InstructLab is represented by question and answer pairs that involve facts, data, or references. This knowledge is represented in the taxonomy tree and each node of this tree contains a qna.yaml file. - - + + + diff --git a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx index 437e0ae4..b84ad9c0 100644 --- a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { FormFieldGroupExpandable, FormFieldGroupHeader } from '@patternfly/react-core/dist/dynamic/components/Form'; import KnowledgeQuestionAnswerPairs from '../KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs'; import { SeedExample } from '..'; +import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; interface Props { seedExamples: SeedExample[]; @@ -36,7 +37,16 @@ const KnowledgeSeedExample: React.FC = ({ ), id: 'seed-examples-id' }} - titleDescription="Add seed examples with context and minimum 3 question and answer pairs. Minimum 5 seed examples are required." + titleDescription={ +

+ Add seed examples with context and minimum 3 question and answer pairs. Minimum 5 seed examples are required.{' '} + + {' '} + Learn more about seed examples + + +

+ } /> } > From bfa7404867daefa948439acc20340f09d42d07a4 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 11:59:33 -0700 Subject: [PATCH 21/52] Add private policy and terms of use to the login page and about model page. Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- src/app/login/githublogin.css | 8 ++++++++ src/app/login/githublogin.tsx | 9 +++++++++ src/components/AboutModal/AboutModal.tsx | 9 +++++++++ 3 files changed, 26 insertions(+) diff --git a/src/app/login/githublogin.css b/src/app/login/githublogin.css index 7fd63c32..68df4d23 100644 --- a/src/app/login/githublogin.css +++ b/src/app/login/githublogin.css @@ -49,6 +49,14 @@ a { font-size: large; } +.urls-text-medium { + margin-top: 1rem; + color: white; + padding: 20px; + text-align: center; + font-size: medium; +} + .policy-text { margin-top: 1rem; color: white; diff --git a/src/app/login/githublogin.tsx b/src/app/login/githublogin.tsx index 931cb83d..8ceb7b71 100644 --- a/src/app/login/githublogin.tsx +++ b/src/app/login/githublogin.tsx @@ -63,6 +63,15 @@ const GithubLogin: React.FC = () => { Code Of Conduct + + + Terms of use + {' '} + |{' '} + + Privacy Policy + +
diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 696d388f..519feb21 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -51,6 +51,15 @@ const AboutInstructLab = ({ isOpen, setIsOpen }: AboutModalProps) => { © InstructLab | Version 1.0.0 Beta + + + Terms of use + {' '} + |{' '} + + Privacy Policy + +
From b7ddfbe41060de69684b2beab2484ca52f5be823 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 14:34:11 -0700 Subject: [PATCH 22/52] Fix rendering of the error messages Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- .../Contribute/Knowledge/Update/Update.tsx | 2 +- src/components/Contribute/Knowledge/index.tsx | 80 +++++++++---------- .../Contribute/Skill/Update/Update.tsx | 2 +- 3 files changed, 42 insertions(+), 42 deletions(-) diff --git a/src/components/Contribute/Knowledge/Update/Update.tsx b/src/components/Contribute/Knowledge/Update/Update.tsx index 33d2969c..4824c068 100644 --- a/src/components/Contribute/Knowledge/Update/Update.tsx +++ b/src/components/Contribute/Knowledge/Update/Update.tsx @@ -159,7 +159,7 @@ Creator names: ${attributionData.creator_names} }; return ( ); }; diff --git a/src/components/Contribute/Knowledge/index.tsx b/src/components/Contribute/Knowledge/index.tsx index 18c3dc43..547995e6 100644 --- a/src/components/Contribute/Knowledge/index.tsx +++ b/src/components/Contribute/Knowledge/index.tsx @@ -220,65 +220,51 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno } }, [knowledgeEditFormData]); - const validateContext = (seedExample: SeedExample): SeedExample => { + const validateContext = (context: string) => { // Split the context into words based on spaces - const contextStr = seedExample.context.trim(); + const contextStr = context.trim(); if (contextStr.length == 0) { setDisableAction(true); - seedExample.validationError = 'Context is required'; - seedExample.isContextValid = ValidatedOptions.error; - return seedExample; + return { errorMsg: 'Context is required', context: ValidatedOptions.error }; } const tokens = contextStr.split(/\s+/); if (tokens.length > 0 && tokens.length <= 500) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - seedExample.isContextValid = ValidatedOptions.success; - return seedExample; + return { errorMsg: '', context: ValidatedOptions.success }; } setDisableAction(true); - seedExample.validationError = 'Context must be less than 500 words. Current word count: ' + tokens.length; - seedExample.isContextValid = ValidatedOptions.error; - return seedExample; + const errorMsg = 'Context must be less than 500 words. Current word count: ' + tokens.length; + return { errorMsg: errorMsg, context: ValidatedOptions.error }; }; - const validateQuestion = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { - const questionStr = qnaPair.question.trim(); + const validateQuestion = (question: string) => { + const questionStr = question.trim(); if (questionStr.length == 0) { setDisableAction(true); - qnaPair.questionValidationError = 'Question is required'; - qnaPair.isQuestionValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Question is required', context: ValidatedOptions.error }; } const tokens = questionStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - qnaPair.isQuestionValid = ValidatedOptions.success; - return qnaPair; + return { errorMsg: '', context: ValidatedOptions.success }; } setDisableAction(true); - qnaPair.questionValidationError = 'Question must be less than 250 words. Current word count: ' + tokens.length; - qnaPair.isQuestionValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Question must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; }; - const validateAnswer = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { - const answerStr = qnaPair.answer.trim(); + const validateAnswer = (answer: string) => { + const answerStr = answer.trim(); if (answerStr.length == 0) { setDisableAction(true); - qnaPair.answerValidationError = 'Answer is required'; - qnaPair.isAnswerValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Answer is required', context: ValidatedOptions.error }; } const tokens = answerStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - qnaPair.isAnswerValid = ValidatedOptions.success; - return qnaPair; + return { errorMsg: '', context: ValidatedOptions.success }; } setDisableAction(true); - qnaPair.answerValidationError = 'Answer must be less than 250 words. Current word count: ' + tokens.length; - qnaPair.isAnswerValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Answer must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; }; const handleContextInputChange = (seedExampleIndex: number, contextValue: string): void => { @@ -295,14 +281,18 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno }; const handleContextBlur = (seedExampleIndex: number): void => { - setSeedExamples( - seedExamples.map((seedExample: SeedExample, index: number) => { - if (index === seedExampleIndex) { - return validateContext(seedExample); - } - return seedExample; - }) - ); + const updatedSeedExamples = seedExamples.map((seedExample: SeedExample, index: number): SeedExample => { + if (index === seedExampleIndex) { + const { errorMsg, context } = validateContext(seedExample.context); + return { + ...seedExample, + isContextValid: context, + validationError: errorMsg + }; + } + return seedExample; + }); + setSeedExamples(updatedSeedExamples); }; const handleQuestionInputChange = (seedExampleIndex: number, questionAndAnswerIndex: number, questionValue: string): void => { @@ -333,7 +323,12 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - return validateQuestion(questionAndAnswerPair); + const { errorMsg, context } = validateQuestion(questionAndAnswerPair.question); + return { + ...questionAndAnswerPair, + isQuestionValid: context, + questionValidationError: errorMsg + }; } return questionAndAnswerPair; }) @@ -371,7 +366,12 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - return validateAnswer(questionAndAnswerPair); + const { errorMsg, context } = validateAnswer(questionAndAnswerPair.answer); + return { + ...questionAndAnswerPair, + isAnswerValid: context, + answerValidationError: errorMsg + }; } return questionAndAnswerPair; }) diff --git a/src/components/Contribute/Skill/Update/Update.tsx b/src/components/Contribute/Skill/Update/Update.tsx index 13e8009d..a63b95a7 100644 --- a/src/components/Contribute/Skill/Update/Update.tsx +++ b/src/components/Contribute/Skill/Update/Update.tsx @@ -147,7 +147,7 @@ Creator names: ${attributionData.creator_names} }; return ( ); }; From 02237bb1aefb4b17fd2f7db96ea30924061abc07 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 23:31:00 -0700 Subject: [PATCH 23/52] Updated github workflows for the release branches/tags Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- .github/dependabot.yml | 74 +++++++++++++++++++++++++++++++++ .github/workflows/images.yml | 3 ++ .github/workflows/lint-jobs.yml | 8 +++- .github/workflows/lint-ui.yml | 8 +++- 4 files changed, 89 insertions(+), 4 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 97c4bbac..1476f875 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,6 @@ version: 2 updates: + # Enable version updates for the following package ecosystems for master branch - package-ecosystem: "npm" directory: "/" schedule: @@ -68,6 +69,79 @@ updates: interval: "monthly" reviewers: - "instructlab/ui-maintainers" + target-branch: "main" labels: - "docker dependencies" + # Enable version updates for the following package ecosystems for release-1.0 branch + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + reviewers: + - "instructlab/ui-maintainers" + allow: + - dependency-type: "production" + target-branch: "release-1.0" + labels: + - "npm dependencies" + - "frontend" + groups: + typescript-eslint: + patterns: + - "@typescript-eslint/*" + - typescript-eslint + update-types: + - "minor" + - "patch" + react: + patterns: + - react + - react-dom + update-types: + - "minor" + - "patch" + patternfly: + patterns: + - "@patternfly/*" + - patternfly + update-types: + - "minor" + - "patch" + typescript-libraries: + patterns: + - "@types/*" + update-types: + - "minor" + - "patch" + - package-ecosystem: "github-actions" + directory: "/.github/workflows" + schedule: + interval: "weekly" + reviewers: + - "instructlab/ui-maintainers" + target-branch: "release-1.0" + labels: + - "github-actions" + groups: + actions-deps: + patterns: + - "*" + - package-ecosystem: "gomod" + directory: "/pathservice" + schedule: + interval: "weekly" + reviewers: + - "instructlab/ui-maintainers" + target-branch: "release-1.0" + labels: + - "go dependencies" + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "monthly" + reviewers: + - "instructlab/ui-maintainers" + target-branch: "release-1.0" + labels: + - "docker dependencies" diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index de923091..bc6d1bf5 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -4,6 +4,9 @@ on: push: branches: - main + - release-1.0 + tags: + - v* env: GHCR_REGISTRY: ghcr.io diff --git a/.github/workflows/lint-jobs.yml b/.github/workflows/lint-jobs.yml index 924067a5..438ef313 100644 --- a/.github/workflows/lint-jobs.yml +++ b/.github/workflows/lint-jobs.yml @@ -2,9 +2,13 @@ name: linters on: push: - branches: ["main"] + branches: + - main + - release-1.0 pull_request: - branches: ["main"] + branches: + - main + - release-1.0 concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/lint-ui.yml b/.github/workflows/lint-ui.yml index 32a9eccd..b8eaf6a5 100644 --- a/.github/workflows/lint-ui.yml +++ b/.github/workflows/lint-ui.yml @@ -2,13 +2,17 @@ name: UI lint on: push: - branches: ["main"] + branches: + - main + - release-1.0 paths: - '.github/workflows/lint-ui.yml' - '**/*' - '!**/*.md' pull_request: - branches: ["main"] + branches: + - main + - release-1.0 paths: - '.github/workflows/lint-ui.yml' - '**/*' From 68122082191887f5fa1a35ea011e60396a9660b6 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Fri, 27 Sep 2024 02:29:53 -0700 Subject: [PATCH 24/52] Fix knowledge contribution submission Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- src/components/Contribute/Knowledge/index.tsx | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/Contribute/Knowledge/index.tsx b/src/components/Contribute/Knowledge/index.tsx index 547995e6..881866f8 100644 --- a/src/components/Contribute/Knowledge/index.tsx +++ b/src/components/Contribute/Knowledge/index.tsx @@ -225,46 +225,46 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno const contextStr = context.trim(); if (contextStr.length == 0) { setDisableAction(true); - return { errorMsg: 'Context is required', context: ValidatedOptions.error }; + return { msg: 'Context is required', status: ValidatedOptions.error }; } const tokens = contextStr.split(/\s+/); if (tokens.length > 0 && tokens.length <= 500) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { errorMsg: '', context: ValidatedOptions.success }; + return { msg: 'Valid Input', status: ValidatedOptions.success }; } setDisableAction(true); const errorMsg = 'Context must be less than 500 words. Current word count: ' + tokens.length; - return { errorMsg: errorMsg, context: ValidatedOptions.error }; + return { msg: errorMsg, status: ValidatedOptions.error }; }; const validateQuestion = (question: string) => { const questionStr = question.trim(); if (questionStr.length == 0) { setDisableAction(true); - return { errorMsg: 'Question is required', context: ValidatedOptions.error }; + return { msg: 'Question is required', status: ValidatedOptions.error }; } const tokens = questionStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { errorMsg: '', context: ValidatedOptions.success }; + return { msg: 'Valid input', status: ValidatedOptions.success }; } setDisableAction(true); - return { errorMsg: 'Question must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; + return { msg: 'Question must be less than 250 words. Current word count: ' + tokens.length, status: ValidatedOptions.error }; }; const validateAnswer = (answer: string) => { const answerStr = answer.trim(); if (answerStr.length == 0) { setDisableAction(true); - return { errorMsg: 'Answer is required', context: ValidatedOptions.error }; + return { msg: 'Answer is required', status: ValidatedOptions.error }; } const tokens = answerStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { errorMsg: '', context: ValidatedOptions.success }; + return { msg: 'Valid input', status: ValidatedOptions.success }; } setDisableAction(true); - return { errorMsg: 'Answer must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; + return { msg: 'Answer must be less than 250 words. Current word count: ' + tokens.length, status: ValidatedOptions.error }; }; const handleContextInputChange = (seedExampleIndex: number, contextValue: string): void => { @@ -283,11 +283,11 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno const handleContextBlur = (seedExampleIndex: number): void => { const updatedSeedExamples = seedExamples.map((seedExample: SeedExample, index: number): SeedExample => { if (index === seedExampleIndex) { - const { errorMsg, context } = validateContext(seedExample.context); + const { msg, status } = validateContext(seedExample.context); return { ...seedExample, - isContextValid: context, - validationError: errorMsg + isContextValid: status, + validationError: msg }; } return seedExample; @@ -323,11 +323,11 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - const { errorMsg, context } = validateQuestion(questionAndAnswerPair.question); + const { msg, status } = validateQuestion(questionAndAnswerPair.question); return { ...questionAndAnswerPair, - isQuestionValid: context, - questionValidationError: errorMsg + isQuestionValid: status, + questionValidationError: msg }; } return questionAndAnswerPair; @@ -366,11 +366,11 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - const { errorMsg, context } = validateAnswer(questionAndAnswerPair.answer); + const { msg, status } = validateAnswer(questionAndAnswerPair.answer); return { ...questionAndAnswerPair, - isAnswerValid: context, - answerValidationError: errorMsg + isAnswerValid: status, + answerValidationError: msg }; } return questionAndAnswerPair; From 86156590877e347f730f5feba1cb7daf0786bdb4 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Fri, 27 Sep 2024 02:30:58 -0700 Subject: [PATCH 25/52] Use the latest image. Latest tag points to the latest release Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- deploy/k8s/overlays/openshift/prod/kustomization.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/k8s/overlays/openshift/prod/kustomization.yaml b/deploy/k8s/overlays/openshift/prod/kustomization.yaml index 64526af1..a8b11371 100644 --- a/deploy/k8s/overlays/openshift/prod/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/prod/kustomization.yaml @@ -36,7 +36,7 @@ patches: patch: |- - op: replace path: /spec/template/spec/containers/0/image - value: quay.io/instructlab-ui/ui:v1.0.0-beta # Override this image if you want to use a different UI image + value: quay.io/instructlab-ui/ui:latest #Override this image if you want to use a different UI image # Override the pathservice image for Openshift production deployment - target: @@ -45,4 +45,4 @@ patches: patch: |- - op: replace path: /spec/template/spec/containers/0/image - value: quay.io/instructlab-ui/pathservice:v1.0.0-beta # Override this image if you want to use a different pathservice image + value: quay.io/instructlab-ui/pathservice:latest #Override this image if you want to use a different pathservice image From b8e23bad4b766413daf01840334c0f7d36bff58e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 06:07:40 +0000 Subject: [PATCH 26/52] Bump next-auth from 4.24.7 to 4.24.8 Bumps [next-auth](https://github.com/nextauthjs/next-auth) from 4.24.7 to 4.24.8. - [Release notes](https://github.com/nextauthjs/next-auth/releases) - [Commits](https://github.com/nextauthjs/next-auth/compare/next-auth@4.24.7...next-auth@4.24.8) --- updated-dependencies: - dependency-name: next-auth dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Signed-off-by: Samarpita Bhaumik --- package-lock.json | 13 ++++++++----- package.json | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 62576fec..afb0e8e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "axios": "^1.7.7", "js-yaml": "^4.1.0", "next": "^14.2.13", - "next-auth": "^4.24.7", + "next-auth": "^4.24.8", "node-fetch": "^3.3.2", "react": "18.3.1", "react-dom": "18.3.1", @@ -4837,10 +4837,9 @@ } }, "node_modules/next-auth": { - "version": "4.24.7", - "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-4.24.7.tgz", - "integrity": "sha512-iChjE8ov/1K/z98gdKbn2Jw+2vLgJtVV39X+rCP5SGnVQuco7QOr19FRNGMIrD8d3LYhHWV9j9sKLzq1aDWWQQ==", - "license": "ISC", + "version": "4.24.8", + "resolved": "https://registry.npmjs.org/next-auth/-/next-auth-4.24.8.tgz", + "integrity": "sha512-SLt3+8UCtklsotnz2p+nB4aN3IHNmpsQFAZ24VLxGotWGzSxkBh192zxNhm/J5wgkcrDWVp0bwqvW0HksK/Lcw==", "dependencies": { "@babel/runtime": "^7.20.13", "@panva/hkdf": "^1.0.2", @@ -4853,12 +4852,16 @@ "uuid": "^8.3.2" }, "peerDependencies": { + "@auth/core": "0.34.2", "next": "^12.2.5 || ^13 || ^14", "nodemailer": "^6.6.5", "react": "^17.0.2 || ^18", "react-dom": "^17.0.2 || ^18" }, "peerDependenciesMeta": { + "@auth/core": { + "optional": true + }, "nodemailer": { "optional": true } diff --git a/package.json b/package.json index e1b4d06c..83764f4d 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "axios": "^1.7.7", "js-yaml": "^4.1.0", "next": "^14.2.13", - "next-auth": "^4.24.7", + "next-auth": "^4.24.8", "node-fetch": "^3.3.2", "react": "18.3.1", "react-dom": "18.3.1", From 743ca89e47117fe4879998e2a15515b1208f91ba Mon Sep 17 00:00:00 2001 From: Brent Salisbury Date: Fri, 27 Sep 2024 13:17:03 -0400 Subject: [PATCH 27/52] Adjust flex layout to avoid help and avatar stacking in masthead Signed-off-by: Brent Salisbury Signed-off-by: Samarpita Bhaumik --- src/components/AppLayout.tsx | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 8c2481f0..692fb611 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -21,7 +21,6 @@ import { PageSidebarBody } from '@patternfly/react-core/dist/dynamic/components/ import { SkipToContent } from '@patternfly/react-core/dist/dynamic/components/SkipToContent'; import { Spinner } from '@patternfly/react-core/dist/dynamic/components/Spinner'; import { BarsIcon } from '@patternfly/react-icons/dist/dynamic/icons/bars-icon'; -import { Flex, FlexItem } from '@patternfly/react-core/dist/esm/layouts/Flex'; import { TextContent, Text, TextVariants } from '@patternfly/react-core/dist/dynamic/components/Text'; import { useTheme } from '../context/ThemeContext'; import Link from 'next/link'; @@ -81,7 +80,7 @@ const AppLayout: React.FunctionComponent = ({ children }) => { - + @@ -89,15 +88,9 @@ const AppLayout: React.FunctionComponent = ({ children }) => { InstructLab - - - - - - - - - + + + ); From f404a84eb9a5f3a8b1b4471cf813ad5bd11be337 Mon Sep 17 00:00:00 2001 From: Samarpita Bhaumik Date: Tue, 1 Oct 2024 20:38:01 +0530 Subject: [PATCH 28/52] Udated the lint issues Udated the lint issues Signed-off-by: Samarpita Bhaumik --- src/app/login/githublogin.css | 28 ++++---- src/app/login/githublogin.tsx | 119 +++++++++++++++++----------------- 2 files changed, 73 insertions(+), 74 deletions(-) diff --git a/src/app/login/githublogin.css b/src/app/login/githublogin.css index 68df4d23..74199c36 100644 --- a/src/app/login/githublogin.css +++ b/src/app/login/githublogin.css @@ -1,29 +1,29 @@ a { - color: white; - text-decoration: underline; + color: white; + text-decoration: underline; } .login-page-background { background-image: url('../../../public/InstructLab-Background-Image.png'); - background-size: 100% 100%; - background-position: center; - background-repeat: no-repeat; - - min-width: 100vh; - min-height: 100vh; - + background-size: 100% 100%; + background-position: center; + background-repeat: no-repeat; + + min-width: 100vh; + min-height: 100vh; + display: flex; align-items: center; justify-content: center; - - overflow-y: auto; - overflow-x: auto; + + overflow-y: auto; + overflow-x: auto; } .login-container { text-align: center; - width: 100%; - max-width: 1200px; + width: 100%; + max-width: 1200px; padding: 20px; } diff --git a/src/app/login/githublogin.tsx b/src/app/login/githublogin.tsx index 8ceb7b71..bf94994b 100644 --- a/src/app/login/githublogin.tsx +++ b/src/app/login/githublogin.tsx @@ -16,67 +16,66 @@ const GithubLogin: React.FC = () => { }; return ( - -
- - -
- - Sign in to your account - - - - Join the novel, community based movement to

create truly open source LLMs -
-
-
- -
- - - - GitHub - {' '} - |{' '} - - Collaborate - {' '} - |{' '} - - Code Of Conduct - - - - - Terms of use - {' '} - |{' '} - - Privacy Policy - - - +
+ + +
+ + Sign in to your account + + + + Join the novel, community based movement to

create truly open source LLMs +
+
+
+
- - -
+ + + + GitHub + {' '} + |{' '} + + Collaborate + {' '} + |{' '} + + Code Of Conduct + + + + + Terms of use + {' '} + |{' '} + + Privacy Policy + + + +
+ + +
); }; From 55294cd55f9e94afa262dd2aa15daa168f70ecbe Mon Sep 17 00:00:00 2001 From: Ash Evans Date: Tue, 24 Sep 2024 11:01:16 +0100 Subject: [PATCH 29/52] removing the optional validation error fields from the auto fill examples Signed-off-by: Ash Evans --- .../Contribute/Knowledge/AutoFill.ts | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/components/Contribute/Knowledge/AutoFill.ts b/src/components/Contribute/Knowledge/AutoFill.ts index 568db39b..9e2aed12 100644 --- a/src/components/Contribute/Knowledge/AutoFill.ts +++ b/src/components/Contribute/Knowledge/AutoFill.ts @@ -7,7 +7,7 @@ const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ question: 'What is the brightest star in the Phoenix constellation called?', isQuestionValid: ValidatedOptions.success, answer: 'Alpha Phoenicis or Ankaa is the brightest star in the Phoenix Constellation.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, @@ -15,14 +15,14 @@ const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'The Phoenix constellation first appeared on a 35-cm diameter celestial globe published in 1597 (or 1598) in Amsterdam by Plancius with Jodocus Hondius.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, question: "What does 'The Bird Phoenix' symbolize?", isQuestionValid: ValidatedOptions.success, answer: "'The Bird Phoenix' symbolizes the phoenix of classical mythology.", - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, } ]; @@ -33,14 +33,14 @@ const questionAndAnswerPairs2: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is a small constellation bordered by Fornax and Sculptor to the north, Grus to the west, Tucana to the south, touching on the corner of Hydrus to the south, and Eridanus to the east and southeast. The bright star Achernar is nearby.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, question: 'When is the phoenix constellation most visible?', isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is most visible from locations such as Australia and South Africa during late Southern Hemisphere spring.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, @@ -48,7 +48,7 @@ const questionAndAnswerPairs2: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'The official constellation boundaries for Phoenix, as set by Belgian astronomer Eugène Delporte in 1930, are defined by a polygon of 10 segments.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, } ]; @@ -59,7 +59,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'In the Phoenix constellation, ten stars have been found to have planets to date, and four planetary systems have been discovered with the SuperWASP project.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, @@ -67,7 +67,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'HD 142 is a yellow giant that has an apparent magnitude of 5.7, and has a planet (HD 142 b) 1.36 times the mass of Jupiter which orbits every 328 days.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, @@ -75,7 +75,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'Yes, WASP-4 and WASP-5 are solar-type yellow stars around 1000 light years distant and of 13th magnitude, each with a single planet larger than Jupiter.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, } ]; @@ -85,21 +85,21 @@ const questionAndAnswerPairs4: QuestionAndAnswerPair[] = [ question: 'Is the Phoenix Constellation part of the Milky Way?', isQuestionValid: ValidatedOptions.success, answer: 'The Phoenix constellation does not lie on the galactic plane of the Milky Way, and there are no prominent star clusters.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, question: 'How many light years away is NGC 625?', isQuestionValid: ValidatedOptions.success, answer: 'NGC 625 is 24000 light years in diameter and is an outlying member of the Sculptor Group.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, question: "What is Robert's Quartet composed of?", isQuestionValid: ValidatedOptions.success, answer: "Robert's Quartet is composed of the irregular galaxy NGC 87, and three spiral galaxies NGC 88, NGC 89 and NGC 92.", - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, } ]; @@ -109,21 +109,21 @@ const questionAndAnswerPairs5: QuestionAndAnswerPair[] = [ question: 'Do meteor showers originate from the Pheonix constellation?', isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is the radiant of two annual meteor showers.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, question: 'When were the first Phoenicids?', isQuestionValid: ValidatedOptions.success, answer: 'The Phoenicids, also known as the December Phoenicids, were first observed on 3 December 1887.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, }, { immutable: false, question: 'When does the intensity of the Phoenicids peak?', isQuestionValid: ValidatedOptions.success, answer: 'It peaks around 4–5 December, though is not seen every year.', - isAnswerValid: ValidatedOptions.success + isAnswerValid: ValidatedOptions.success, } ]; @@ -253,7 +253,8 @@ const seedExamples: SeedExample[] = [ export const autoFillKnowledgeFields: KnowledgeFormData = { email: 'helloworld@instructlab.com', name: 'juliadenham', - submissionSummary: 'Information about the Phoenix Constellation.', + submissionSummary: + 'Information about the Phoenix Constellation.', domain: 'astronomy', documentOutline: 'Information about the Phoenix Constellation including the history, characteristics, and features of the stars in the constellation.', From 6a04860fc1aa29ef2af4c5fb1c34eeb8e29a2af4 Mon Sep 17 00:00:00 2001 From: Ash Evans Date: Tue, 24 Sep 2024 11:05:45 +0100 Subject: [PATCH 30/52] sorting linting Signed-off-by: Ash Evans Signed-off-by: Samarpita Bhaumik --- .../Contribute/Knowledge/AutoFill.ts | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/components/Contribute/Knowledge/AutoFill.ts b/src/components/Contribute/Knowledge/AutoFill.ts index 9e2aed12..568db39b 100644 --- a/src/components/Contribute/Knowledge/AutoFill.ts +++ b/src/components/Contribute/Knowledge/AutoFill.ts @@ -7,7 +7,7 @@ const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ question: 'What is the brightest star in the Phoenix constellation called?', isQuestionValid: ValidatedOptions.success, answer: 'Alpha Phoenicis or Ankaa is the brightest star in the Phoenix Constellation.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -15,14 +15,14 @@ const questionAndAnswerPairs1: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'The Phoenix constellation first appeared on a 35-cm diameter celestial globe published in 1597 (or 1598) in Amsterdam by Plancius with Jodocus Hondius.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: "What does 'The Bird Phoenix' symbolize?", isQuestionValid: ValidatedOptions.success, answer: "'The Bird Phoenix' symbolizes the phoenix of classical mythology.", - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -33,14 +33,14 @@ const questionAndAnswerPairs2: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is a small constellation bordered by Fornax and Sculptor to the north, Grus to the west, Tucana to the south, touching on the corner of Hydrus to the south, and Eridanus to the east and southeast. The bright star Achernar is nearby.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'When is the phoenix constellation most visible?', isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is most visible from locations such as Australia and South Africa during late Southern Hemisphere spring.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -48,7 +48,7 @@ const questionAndAnswerPairs2: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'The official constellation boundaries for Phoenix, as set by Belgian astronomer Eugène Delporte in 1930, are defined by a polygon of 10 segments.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -59,7 +59,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'In the Phoenix constellation, ten stars have been found to have planets to date, and four planetary systems have been discovered with the SuperWASP project.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -67,7 +67,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'HD 142 is a yellow giant that has an apparent magnitude of 5.7, and has a planet (HD 142 b) 1.36 times the mass of Jupiter which orbits every 328 days.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, @@ -75,7 +75,7 @@ const questionAndAnswerPairs3: QuestionAndAnswerPair[] = [ isQuestionValid: ValidatedOptions.success, answer: 'Yes, WASP-4 and WASP-5 are solar-type yellow stars around 1000 light years distant and of 13th magnitude, each with a single planet larger than Jupiter.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -85,21 +85,21 @@ const questionAndAnswerPairs4: QuestionAndAnswerPair[] = [ question: 'Is the Phoenix Constellation part of the Milky Way?', isQuestionValid: ValidatedOptions.success, answer: 'The Phoenix constellation does not lie on the galactic plane of the Milky Way, and there are no prominent star clusters.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'How many light years away is NGC 625?', isQuestionValid: ValidatedOptions.success, answer: 'NGC 625 is 24000 light years in diameter and is an outlying member of the Sculptor Group.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: "What is Robert's Quartet composed of?", isQuestionValid: ValidatedOptions.success, answer: "Robert's Quartet is composed of the irregular galaxy NGC 87, and three spiral galaxies NGC 88, NGC 89 and NGC 92.", - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -109,21 +109,21 @@ const questionAndAnswerPairs5: QuestionAndAnswerPair[] = [ question: 'Do meteor showers originate from the Pheonix constellation?', isQuestionValid: ValidatedOptions.success, answer: 'Phoenix is the radiant of two annual meteor showers.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'When were the first Phoenicids?', isQuestionValid: ValidatedOptions.success, answer: 'The Phoenicids, also known as the December Phoenicids, were first observed on 3 December 1887.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success }, { immutable: false, question: 'When does the intensity of the Phoenicids peak?', isQuestionValid: ValidatedOptions.success, answer: 'It peaks around 4–5 December, though is not seen every year.', - isAnswerValid: ValidatedOptions.success, + isAnswerValid: ValidatedOptions.success } ]; @@ -253,8 +253,7 @@ const seedExamples: SeedExample[] = [ export const autoFillKnowledgeFields: KnowledgeFormData = { email: 'helloworld@instructlab.com', name: 'juliadenham', - submissionSummary: - 'Information about the Phoenix Constellation.', + submissionSummary: 'Information about the Phoenix Constellation.', domain: 'astronomy', documentOutline: 'Information about the Phoenix Constellation including the history, characteristics, and features of the stars in the constellation.', From 9a9e5cd902d396c5862b96fa153c68eda9b9b386 Mon Sep 17 00:00:00 2001 From: Samarpita Bhaumik <54763781+samarpita-bhaumik@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:22:39 +0530 Subject: [PATCH 31/52] Enhance the responsiveness of the login experience I updated the githublogin.tsx by removing the Page and PageSection tags, replacing them with div tags. Additionally, I modified the githublogin.css to include both vertical and horizontal scrolling, ensuring the page adapts to any window size. Signed-off-by: Samarpita Bhaumik --- src/app/login/githublogin.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/login/githublogin.css b/src/app/login/githublogin.css index 74199c36..11a496c2 100644 --- a/src/app/login/githublogin.css +++ b/src/app/login/githublogin.css @@ -1,5 +1,5 @@ a { - color: white; + color: white; text-decoration: underline; } From 96d0ae1ce7049a117ca8abc3e8821ebcaba93777 Mon Sep 17 00:00:00 2001 From: Patryk-Pierzchala1 Date: Thu, 19 Sep 2024 20:50:17 +0200 Subject: [PATCH 32/52] add about us modal Signed-off-by: Patryk-Pierzchala1 --- src/components/AboutModal/AboutModal.tsx | 36 ++++++----------- .../AboutModal/about-modal.module.css | 40 ++++++++----------- src/components/HelpDropdown/HelpDropdown.tsx | 10 +++-- 3 files changed, 35 insertions(+), 51 deletions(-) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 519feb21..da15be6a 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -1,4 +1,5 @@ import { useCallback, type Dispatch, type SetStateAction } from 'react'; +import { AboutModal as PatternflyAboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; import { Text, TextContent, TextVariants } from '@patternfly/react-core/dist/dynamic/components/Text'; import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; @@ -6,40 +7,38 @@ import InstructLabLogo from '../../../public/updated-logo.png'; import InstructLabAboutUsBg from '../../../public/InstructLab-About-Modal-Background.svg'; import styles from './about-modal.module.css'; import { linksData } from './data/linksData'; -import { AboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; -const AboutInstructLab = ({ isOpen, setIsOpen }: AboutModalProps) => { +const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { const handleClose = useCallback(() => { setIsOpen(false); }, [setIsOpen]); return ( -
- About InstructLab - - + + About InstructLab + - InstructLab is an open source AI project that allows
you to shape the future of Large Language Models. -
Join the community to start contributing today. + InstructLab is an open source AI project that allows you shape the future of Large Language Models. Join the community to start + contributing today.
- + - © InstructLab | Version 1.0.0 Beta - - - - Terms of use - {' '} - |{' '} - - Privacy Policy - + © InstructLab | Version 1.1
-
+ ); }; @@ -71,4 +61,4 @@ type AboutModalProps = { setIsOpen: Dispatch>; }; -export default AboutInstructLab; +export default AboutModal; diff --git a/src/components/AboutModal/about-modal.module.css b/src/components/AboutModal/about-modal.module.css index dfea9209..9b99492b 100644 --- a/src/components/AboutModal/about-modal.module.css +++ b/src/components/AboutModal/about-modal.module.css @@ -9,6 +9,10 @@ height: 100%; } +.modal > div:last-child > p { + display: none; +} + .modalContent { text-align: center; height: 100% !important; @@ -19,43 +23,33 @@ visibility: hidden; } -.modal button { - background: #030303 !important; - border-radius: 80px !important; -} - -.aboutInstructlab { - margin-top: 1rem; - color: white; - padding: 20px; - text-align: center; - font-size: xx-large; +.heading { + font-weight: 400 !important; } .description { - margin-top: 1rem; - color: white; - padding-bottom: 50px; - font-size: x-large; - font-style: italic; - text-align: center; + width: 70% !important; + margin: auto; } .joinCommunityButtonWrapper { display: flex; justify-content: center; margin: 3rem 0; - color: #ffffff; } .joinCommunityButton { - background: #030303 !important; - border-radius: 80px !important; + background: rgb(46, 8, 17) !important; + background: linear-gradient(0deg, rgba(46, 8, 17, 1) 0%, rgba(42, 0, 0, 1) 100%) !important; + border-radius: 100px !important; + display: flex; + align-items: center; + gap: 1rem; } .joinCommunityButton svg { - height: 1rem; - width: 1.5rem; + height: 2rem; + width: 2rem; } .links { @@ -68,7 +62,6 @@ .link { color: white !important; - font-size: 12pt; font-weight: 300 !important; text-decoration: underline !important; border: none !important; @@ -83,5 +76,4 @@ .version { font-weight: 300 !important; - font-size: 14pt; } diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index c353173c..7474c9f1 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -4,7 +4,7 @@ import { Dropdown, DropdownItem, DropdownList } from '@patternfly/react-core/dis import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/esm/components/MenuToggle'; import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/dynamic/icons/outlined-question-circle-icon'; -import AboutInstructLab from '../AboutModal/AboutModal'; +import AboutModal from '../AboutModal/AboutModal'; const HelpDropdown: React.FC = () => { const [isOpen, setIsOpen] = useState(false); @@ -14,7 +14,9 @@ const HelpDropdown: React.FC = () => { setIsOpen(!isOpen); }; - const onSelect = () => { + const onSelect = (_event: React.MouseEvent | undefined, value: string | number | undefined) => { + // eslint-disable-next-line no-console + console.log('selected', value); setIsOpen(false); }; @@ -57,7 +59,7 @@ const HelpDropdown: React.FC = () => { - + Help @@ -65,7 +67,7 @@ const HelpDropdown: React.FC = () => { - + ); }; From 4200b047358dcc63d6566b1931cb5a825afb34e9 Mon Sep 17 00:00:00 2001 From: Patryk-Pierzchala1 Date: Fri, 20 Sep 2024 15:48:00 +0200 Subject: [PATCH 33/52] grammar fix, correct version Signed-off-by: Patryk-Pierzchala1 Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index da15be6a..419968b7 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -29,7 +29,7 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { About InstructLab - InstructLab is an open source AI project that allows you shape the future of Large Language Models. Join the community to start + InstructLab is an open source AI project that allows you to shape the future of Large Language Models. Join the community to start contributing today. @@ -48,7 +48,7 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => {
- © InstructLab | Version 1.1 + © InstructLab | Version 1.0.0 From 9f979f20ad89696f4e4fe4e5601fd4b9467fbb9c Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 09:59:49 +0100 Subject: [PATCH 34/52] Update about-modal.module.css to match UX design Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/about-modal.module.css | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/components/AboutModal/about-modal.module.css b/src/components/AboutModal/about-modal.module.css index 9b99492b..db18d9ca 100644 --- a/src/components/AboutModal/about-modal.module.css +++ b/src/components/AboutModal/about-modal.module.css @@ -24,23 +24,29 @@ } .heading { - font-weight: 400 !important; + font-weight: medium; + font-size: 28pt; + color: #dededd; } .description { width: 70% !important; margin: auto; + font-size: 18pt; + color: #ffffff; } .joinCommunityButtonWrapper { display: flex; justify-content: center; margin: 3rem 0; + font-size: 16pt; + font-weight: medium; + color: #ffffff; } .joinCommunityButton { - background: rgb(46, 8, 17) !important; - background: linear-gradient(0deg, rgba(46, 8, 17, 1) 0%, rgba(42, 0, 0, 1) 100%) !important; + background: #030303 !important; border-radius: 100px !important; display: flex; align-items: center; @@ -62,6 +68,7 @@ .link { color: white !important; + font-size: 12pt; font-weight: 300 !important; text-decoration: underline !important; border: none !important; @@ -76,4 +83,5 @@ .version { font-weight: 300 !important; + font-size: 14pt; } From b9010f2064f9c1eaa59b51079cfbfdbbe762b982 Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:15:13 +0100 Subject: [PATCH 35/52] Adding an aria-label to the AboutModal. Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 419968b7..34bc74a0 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -21,6 +21,7 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { backgroundImageSrc={InstructLabAboutUsBg.src} brandImageSrc={InstructLabLogo.src} brandImageAlt="logo" + aria-label="About modal describing the InstructLab project." >
From 990b3da6efdc8bcd3162999794f0513aa652da2b Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:20:14 +0100 Subject: [PATCH 36/52] Update HelpDropdown.tsx to remove a redundant dev purpose console.log Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/HelpDropdown/HelpDropdown.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index 7474c9f1..8a507439 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -16,7 +16,6 @@ const HelpDropdown: React.FC = () => { const onSelect = (_event: React.MouseEvent | undefined, value: string | number | undefined) => { // eslint-disable-next-line no-console - console.log('selected', value); setIsOpen(false); }; From b9492f42074d6e1114efe9a942d029a18e30c7ed Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:25:17 +0100 Subject: [PATCH 37/52] Update HelpDropdown.tsx to remove the redundant params on the onSelect function. Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/HelpDropdown/HelpDropdown.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index 8a507439..7a4b485e 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -14,8 +14,7 @@ const HelpDropdown: React.FC = () => { setIsOpen(!isOpen); }; - const onSelect = (_event: React.MouseEvent | undefined, value: string | number | undefined) => { - // eslint-disable-next-line no-console + const onSelect = () => { setIsOpen(false); }; From ef191406ddd784e5202a4c5043caf9e569cfbeca Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:32:25 +0100 Subject: [PATCH 38/52] Update AboutModal.tsx join the community button to link out to instructlab Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 34bc74a0..dc8801e5 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -35,11 +35,11 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => {
- +
{linksData.map((link) => ( From 7a172adf72dee27fc58df2b22790fbb904825f0c Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Wed, 25 Sep 2024 12:13:11 -0700 Subject: [PATCH 39/52] Remove redundant title description from individual seed example Signed-off-by: Anil Vishnoi --- .../KnowledgeSeedExample/KnowledgeSeedExample.tsx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx index b84ad9c0..437e0ae4 100644 --- a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx @@ -2,7 +2,6 @@ import React from 'react'; import { FormFieldGroupExpandable, FormFieldGroupHeader } from '@patternfly/react-core/dist/dynamic/components/Form'; import KnowledgeQuestionAnswerPairs from '../KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs'; import { SeedExample } from '..'; -import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; interface Props { seedExamples: SeedExample[]; @@ -37,16 +36,7 @@ const KnowledgeSeedExample: React.FC = ({ ), id: 'seed-examples-id' }} - titleDescription={ -

- Add seed examples with context and minimum 3 question and answer pairs. Minimum 5 seed examples are required.{' '} - - {' '} - Learn more about seed examples - - -

- } + titleDescription="Add seed examples with context and minimum 3 question and answer pairs. Minimum 5 seed examples are required." /> } > From e6e1778ec2fd2d41f2cfc90293efb5d9d034ab71 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Wed, 25 Sep 2024 14:11:04 -0700 Subject: [PATCH 40/52] Minor styling fixes for About modal Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- src/components/AboutModal/AboutModal.tsx | 22 +++++----- .../AboutModal/about-modal.module.css | 40 +++++++++---------- src/components/HelpDropdown/HelpDropdown.tsx | 6 +-- 3 files changed, 34 insertions(+), 34 deletions(-) diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index dc8801e5..696d388f 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -1,5 +1,4 @@ import { useCallback, type Dispatch, type SetStateAction } from 'react'; -import { AboutModal as PatternflyAboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; import { Text, TextContent, TextVariants } from '@patternfly/react-core/dist/dynamic/components/Text'; import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import GithubIcon from '@patternfly/react-icons/dist/dynamic/icons/github-icon'; @@ -7,14 +6,15 @@ import InstructLabLogo from '../../../public/updated-logo.png'; import InstructLabAboutUsBg from '../../../public/InstructLab-About-Modal-Background.svg'; import styles from './about-modal.module.css'; import { linksData } from './data/linksData'; +import { AboutModal } from '@patternfly/react-core/dist/esm/components/AboutModal'; -const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => { +const AboutInstructLab = ({ isOpen, setIsOpen }: AboutModalProps) => { const handleClose = useCallback(() => { setIsOpen(false); }, [setIsOpen]); return ( - {
- - About InstructLab - + About InstructLab + + - InstructLab is an open source AI project that allows you to shape the future of Large Language Models. Join the community to start - contributing today. + InstructLab is an open source AI project that allows
you to shape the future of Large Language Models. +
Join the community to start contributing today.
@@ -49,11 +49,11 @@ const AboutModal = ({ isOpen, setIsOpen }: AboutModalProps) => {
- © InstructLab | Version 1.0.0 + © InstructLab | Version 1.0.0 Beta
- + ); }; @@ -62,4 +62,4 @@ type AboutModalProps = { setIsOpen: Dispatch>; }; -export default AboutModal; +export default AboutInstructLab; diff --git a/src/components/AboutModal/about-modal.module.css b/src/components/AboutModal/about-modal.module.css index db18d9ca..dfea9209 100644 --- a/src/components/AboutModal/about-modal.module.css +++ b/src/components/AboutModal/about-modal.module.css @@ -9,10 +9,6 @@ height: 100%; } -.modal > div:last-child > p { - display: none; -} - .modalContent { text-align: center; height: 100% !important; @@ -23,39 +19,43 @@ visibility: hidden; } -.heading { - font-weight: medium; - font-size: 28pt; - color: #dededd; +.modal button { + background: #030303 !important; + border-radius: 80px !important; +} + +.aboutInstructlab { + margin-top: 1rem; + color: white; + padding: 20px; + text-align: center; + font-size: xx-large; } .description { - width: 70% !important; - margin: auto; - font-size: 18pt; - color: #ffffff; + margin-top: 1rem; + color: white; + padding-bottom: 50px; + font-size: x-large; + font-style: italic; + text-align: center; } .joinCommunityButtonWrapper { display: flex; justify-content: center; margin: 3rem 0; - font-size: 16pt; - font-weight: medium; color: #ffffff; } .joinCommunityButton { background: #030303 !important; - border-radius: 100px !important; - display: flex; - align-items: center; - gap: 1rem; + border-radius: 80px !important; } .joinCommunityButton svg { - height: 2rem; - width: 2rem; + height: 1rem; + width: 1.5rem; } .links { diff --git a/src/components/HelpDropdown/HelpDropdown.tsx b/src/components/HelpDropdown/HelpDropdown.tsx index 7a4b485e..c353173c 100644 --- a/src/components/HelpDropdown/HelpDropdown.tsx +++ b/src/components/HelpDropdown/HelpDropdown.tsx @@ -4,7 +4,7 @@ import { Dropdown, DropdownItem, DropdownList } from '@patternfly/react-core/dis import { MenuToggle, MenuToggleElement } from '@patternfly/react-core/dist/esm/components/MenuToggle'; import { ExternalLinkAltIcon } from '@patternfly/react-icons/dist/dynamic/icons/external-link-alt-icon'; import { OutlinedQuestionCircleIcon } from '@patternfly/react-icons/dist/dynamic/icons/outlined-question-circle-icon'; -import AboutModal from '../AboutModal/AboutModal'; +import AboutInstructLab from '../AboutModal/AboutModal'; const HelpDropdown: React.FC = () => { const [isOpen, setIsOpen] = useState(false); @@ -57,7 +57,7 @@ const HelpDropdown: React.FC = () => { - + Help @@ -65,7 +65,7 @@ const HelpDropdown: React.FC = () => { - + ); }; From cd02b8b8e5ac514b6b28a3b5919433554e5eb1a6 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 00:02:53 -0700 Subject: [PATCH 41/52] Move qa deployment manifest under openshift/qa directory Signed-off-by: Anil Vishnoi --- Makefile | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/Makefile b/Makefile index 4a6ff5b8..d17b9dc5 100644 --- a/Makefile +++ b/Makefile @@ -36,16 +36,6 @@ action-lint: ## Lint GitHub Action workflows fi $(CMD_PREFIX) actionlint -color -.PHONY: yaml-lint -yaml-lint: ## Lint yaml files - $(CMD_PREFIX) if ! which yamllint >/dev/null 2>&1; then \ - echo "Please install yamllint." ; \ - echo "See: https://yamllint.readthedocs.io/en/stable/quickstart.html" ; \ - exit 1 ; \ - fi - $(ECHO_PREFIX) printf " %-12s ./...\n" "[YAML LINT]" - $(CMD_PREFIX) yamllint -c .yamllint.yaml deploy --strict - ##@ Artifacts - Command to build and publish artifacts ui-image: Containerfile ## Build continaer image for the InstructLab UI $(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docker]" @@ -157,27 +147,3 @@ undeploy-qa-openshift: ## Undeploy QA stack of the InstructLab UI on OpenShift $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/qa/.env ]; then \ rm ./deploy/k8s/overlays/openshift/qa/.env ; \ fi - -.PHONY: deploy-prod-openshift -deploy-prod-openshift: ## Deploy production stack of the InstructLab UI on OpenShift - $(CMD_PREFIX) if [ ! -f .env ]; then \ - echo "Please create a .env file in the root of the project." ; \ - exit 1 ; \ - fi - - $(CMD_PREFIX) yes | cp -rf .env ./deploy/k8s/overlays/openshift/prod/.env - $(CMD_PREFIX) oc apply -k ./deploy/k8s/overlays/openshift/prod - $(CMD_PREFIX) oc wait --for=condition=Ready pods -n $(ILAB_KUBE_NAMESPACE) --all -l app.kubernetes.io/part-of=ui --timeout=15m - -.PHONY: redeploy-prod-openshift -redeploy-prod-openshift: ## Redeploy production stack of the InstructLab UI on OpenShift - $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/ui - $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/pathservice - - -.PHONY: undeploy-prod-openshift -undeploy-prod-openshift: ## Undeploy production stack of the InstructLab UI on OpenShift - $(CMD_PREFIX) oc delete -k ./deploy/k8s/overlays/openshift/prod - $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/prod/.env ]; then \ - rm ./deploy/k8s/overlays/openshift/prod/.env ; \ - fi From a9db326c31f0ec52e88c95d4acfd0495a616e073 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 00:14:42 -0700 Subject: [PATCH 42/52] Manifest files for production deployment of InstructLab UI stack Signed-off-by: Anil Vishnoi --- Makefile | 24 +++++++++++++++++++ .../openshift/prod/kustomization.yaml | 13 +++++----- 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index d17b9dc5..0c52c2db 100644 --- a/Makefile +++ b/Makefile @@ -147,3 +147,27 @@ undeploy-qa-openshift: ## Undeploy QA stack of the InstructLab UI on OpenShift $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/qa/.env ]; then \ rm ./deploy/k8s/overlays/openshift/qa/.env ; \ fi + +.PHONY: deploy-prod-openshift +deploy-prod-openshift: ## Deploy production stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) if [ ! -f .env ]; then \ + echo "Please create a .env file in the root of the project." ; \ + exit 1 ; \ + fi + + $(CMD_PREFIX) yes | cp -rf .env ./deploy/k8s/overlays/openshift/prod/.env + $(CMD_PREFIX) oc apply -k ./deploy/k8s/overlays/openshift/prod + $(CMD_PREFIX) oc wait --for=condition=Ready pods -n $(ILAB_KUBE_NAMESPACE) --all -l app.kubernetes.io/part-of=ui --timeout=15m + +.PHONY: redeploy-prod-openshift +redeploy-prod-openshift: ## Redeploy production stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/ui + $(CMD_PREFIX) oc -n $(ILAB_KUBE_NAMESPACE) rollout restart deploy/pathservice + + +.PHONY: undeploy-prod-openshift +undeploy-prod-openshift: ## Undeploy production stack of the InstructLab UI on OpenShift + $(CMD_PREFIX) oc delete -k ./deploy/k8s/overlays/openshift/prod + $(CMD_PREFIX) if [ -f ./deploy/k8s/overlays/openshift/prod/.env ]; then \ + rm ./deploy/k8s/overlays/openshift/prod/.env ; \ + fi diff --git a/deploy/k8s/overlays/openshift/prod/kustomization.yaml b/deploy/k8s/overlays/openshift/prod/kustomization.yaml index a8b11371..3a5dd883 100644 --- a/deploy/k8s/overlays/openshift/prod/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/prod/kustomization.yaml @@ -2,14 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: instructlab resources: - - ../../../base + - ../../base - issuer.yaml - certificate.yaml secretGenerator: - - name: ui-config - envs: - - .env +- name: ui-config + envs: + - .env patches: - target: @@ -36,7 +36,7 @@ patches: patch: |- - op: replace path: /spec/template/spec/containers/0/image - value: quay.io/instructlab-ui/ui:latest #Override this image if you want to use a different UI image + value: quay.io/instructlab-ui/ui:v1.0.0-beta # Override this image if you want to use a different UI image # Override the pathservice image for Openshift production deployment - target: @@ -45,4 +45,5 @@ patches: patch: |- - op: replace path: /spec/template/spec/containers/0/image - value: quay.io/instructlab-ui/pathservice:latest #Override this image if you want to use a different pathservice image + value: quay.io/instructlab-ui/pathservice:v1.0.0-beta # Override this image if you want to use a different pathservice image + From 0cdb9959326a5c432c242473e03b6ecaba246833 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 00:56:20 -0700 Subject: [PATCH 43/52] Add yaml lint targe to Makefile Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Makefile b/Makefile index 0c52c2db..4a6ff5b8 100644 --- a/Makefile +++ b/Makefile @@ -36,6 +36,16 @@ action-lint: ## Lint GitHub Action workflows fi $(CMD_PREFIX) actionlint -color +.PHONY: yaml-lint +yaml-lint: ## Lint yaml files + $(CMD_PREFIX) if ! which yamllint >/dev/null 2>&1; then \ + echo "Please install yamllint." ; \ + echo "See: https://yamllint.readthedocs.io/en/stable/quickstart.html" ; \ + exit 1 ; \ + fi + $(ECHO_PREFIX) printf " %-12s ./...\n" "[YAML LINT]" + $(CMD_PREFIX) yamllint -c .yamllint.yaml deploy --strict + ##@ Artifacts - Command to build and publish artifacts ui-image: Containerfile ## Build continaer image for the InstructLab UI $(ECHO_PREFIX) printf " %-12s Containerfile\n" "[docker]" From 139252240c0cd1713f5dce759a655efbe4235ba0 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 01:24:36 -0700 Subject: [PATCH 44/52] Fix yaml linting errors Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- deploy/k8s/overlays/openshift/prod/kustomization.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/deploy/k8s/overlays/openshift/prod/kustomization.yaml b/deploy/k8s/overlays/openshift/prod/kustomization.yaml index 3a5dd883..64526af1 100644 --- a/deploy/k8s/overlays/openshift/prod/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/prod/kustomization.yaml @@ -2,14 +2,14 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization namespace: instructlab resources: - - ../../base + - ../../../base - issuer.yaml - certificate.yaml secretGenerator: -- name: ui-config - envs: - - .env + - name: ui-config + envs: + - .env patches: - target: @@ -46,4 +46,3 @@ patches: - op: replace path: /spec/template/spec/containers/0/image value: quay.io/instructlab-ui/pathservice:v1.0.0-beta # Override this image if you want to use a different pathservice image - From bf7805c528d3835970f742f11419e033c9248468 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 03:13:48 -0700 Subject: [PATCH 45/52] Change limit from 750 char to words Signed-off-by: Anil Vishnoi --- src/components/Contribute/Knowledge/index.tsx | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/components/Contribute/Knowledge/index.tsx b/src/components/Contribute/Knowledge/index.tsx index 881866f8..18c3dc43 100644 --- a/src/components/Contribute/Knowledge/index.tsx +++ b/src/components/Contribute/Knowledge/index.tsx @@ -220,51 +220,65 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno } }, [knowledgeEditFormData]); - const validateContext = (context: string) => { + const validateContext = (seedExample: SeedExample): SeedExample => { // Split the context into words based on spaces - const contextStr = context.trim(); + const contextStr = seedExample.context.trim(); if (contextStr.length == 0) { setDisableAction(true); - return { msg: 'Context is required', status: ValidatedOptions.error }; + seedExample.validationError = 'Context is required'; + seedExample.isContextValid = ValidatedOptions.error; + return seedExample; } const tokens = contextStr.split(/\s+/); if (tokens.length > 0 && tokens.length <= 500) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { msg: 'Valid Input', status: ValidatedOptions.success }; + seedExample.isContextValid = ValidatedOptions.success; + return seedExample; } setDisableAction(true); - const errorMsg = 'Context must be less than 500 words. Current word count: ' + tokens.length; - return { msg: errorMsg, status: ValidatedOptions.error }; + seedExample.validationError = 'Context must be less than 500 words. Current word count: ' + tokens.length; + seedExample.isContextValid = ValidatedOptions.error; + return seedExample; }; - const validateQuestion = (question: string) => { - const questionStr = question.trim(); + const validateQuestion = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { + const questionStr = qnaPair.question.trim(); if (questionStr.length == 0) { setDisableAction(true); - return { msg: 'Question is required', status: ValidatedOptions.error }; + qnaPair.questionValidationError = 'Question is required'; + qnaPair.isQuestionValid = ValidatedOptions.error; + return qnaPair; } const tokens = questionStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { msg: 'Valid input', status: ValidatedOptions.success }; + qnaPair.isQuestionValid = ValidatedOptions.success; + return qnaPair; } setDisableAction(true); - return { msg: 'Question must be less than 250 words. Current word count: ' + tokens.length, status: ValidatedOptions.error }; + qnaPair.questionValidationError = 'Question must be less than 250 words. Current word count: ' + tokens.length; + qnaPair.isQuestionValid = ValidatedOptions.error; + return qnaPair; }; - const validateAnswer = (answer: string) => { - const answerStr = answer.trim(); + const validateAnswer = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { + const answerStr = qnaPair.answer.trim(); if (answerStr.length == 0) { setDisableAction(true); - return { msg: 'Answer is required', status: ValidatedOptions.error }; + qnaPair.answerValidationError = 'Answer is required'; + qnaPair.isAnswerValid = ValidatedOptions.error; + return qnaPair; } const tokens = answerStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { msg: 'Valid input', status: ValidatedOptions.success }; + qnaPair.isAnswerValid = ValidatedOptions.success; + return qnaPair; } setDisableAction(true); - return { msg: 'Answer must be less than 250 words. Current word count: ' + tokens.length, status: ValidatedOptions.error }; + qnaPair.answerValidationError = 'Answer must be less than 250 words. Current word count: ' + tokens.length; + qnaPair.isAnswerValid = ValidatedOptions.error; + return qnaPair; }; const handleContextInputChange = (seedExampleIndex: number, contextValue: string): void => { @@ -281,18 +295,14 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno }; const handleContextBlur = (seedExampleIndex: number): void => { - const updatedSeedExamples = seedExamples.map((seedExample: SeedExample, index: number): SeedExample => { - if (index === seedExampleIndex) { - const { msg, status } = validateContext(seedExample.context); - return { - ...seedExample, - isContextValid: status, - validationError: msg - }; - } - return seedExample; - }); - setSeedExamples(updatedSeedExamples); + setSeedExamples( + seedExamples.map((seedExample: SeedExample, index: number) => { + if (index === seedExampleIndex) { + return validateContext(seedExample); + } + return seedExample; + }) + ); }; const handleQuestionInputChange = (seedExampleIndex: number, questionAndAnswerIndex: number, questionValue: string): void => { @@ -323,12 +333,7 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - const { msg, status } = validateQuestion(questionAndAnswerPair.question); - return { - ...questionAndAnswerPair, - isQuestionValid: status, - questionValidationError: msg - }; + return validateQuestion(questionAndAnswerPair); } return questionAndAnswerPair; }) @@ -366,12 +371,7 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - const { msg, status } = validateAnswer(questionAndAnswerPair.answer); - return { - ...questionAndAnswerPair, - isAnswerValid: status, - answerValidationError: msg - }; + return validateAnswer(questionAndAnswerPair); } return questionAndAnswerPair; }) From 5a6b4a6dbcd434e1ec70e6245ae3e85dd0bdbd26 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 11:45:27 -0700 Subject: [PATCH 46/52] Add help links from docs.instructlab.ai for skill and knowledge contribution Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- .../KnowledgeSeedExample/KnowledgeSeedExample.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx index 437e0ae4..b84ad9c0 100644 --- a/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx +++ b/src/components/Contribute/Knowledge/KnowledgeSeedExample/KnowledgeSeedExample.tsx @@ -2,6 +2,7 @@ import React from 'react'; import { FormFieldGroupExpandable, FormFieldGroupHeader } from '@patternfly/react-core/dist/dynamic/components/Form'; import KnowledgeQuestionAnswerPairs from '../KnowledgeQuestionAnswerPairs/KnowledgeQuestionAnswerPairs'; import { SeedExample } from '..'; +import ExternalLinkAltIcon from '@patternfly/react-icons/dist/esm/icons/external-link-alt-icon'; interface Props { seedExamples: SeedExample[]; @@ -36,7 +37,16 @@ const KnowledgeSeedExample: React.FC = ({ ), id: 'seed-examples-id' }} - titleDescription="Add seed examples with context and minimum 3 question and answer pairs. Minimum 5 seed examples are required." + titleDescription={ +

+ Add seed examples with context and minimum 3 question and answer pairs. Minimum 5 seed examples are required.{' '} + + {' '} + Learn more about seed examples + + +

+ } /> } > From 27b6b432ccf7cd9c531c116089385b3ea3a09873 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 11:59:33 -0700 Subject: [PATCH 47/52] Add private policy and terms of use to the login page and about model page. Signed-off-by: Anil Vishnoi --- src/app/login/githublogin.tsx | 120 ++++++++++++----------- src/components/AboutModal/AboutModal.tsx | 9 ++ 2 files changed, 70 insertions(+), 59 deletions(-) diff --git a/src/app/login/githublogin.tsx b/src/app/login/githublogin.tsx index bf94994b..43b2a7b9 100644 --- a/src/app/login/githublogin.tsx +++ b/src/app/login/githublogin.tsx @@ -16,66 +16,68 @@ const GithubLogin: React.FC = () => { }; return ( -
- - -
- - Sign in to your account - - - - Join the novel, community based movement to

create truly open source LLMs -
-
-
- -
- - - - GitHub - {' '} - |{' '} - - Collaborate - {' '} - |{' '} - + + + + + Sign in with GitHub + +
+ + + + GitHub + {' '} + |{' '} + + Collaborate + {' '} + |{' '} + + Code Of Conduct + + + + + Terms of use + {' '} + |{' '} + + Privacy Policy + + + +
+ + + + ); }; diff --git a/src/components/AboutModal/AboutModal.tsx b/src/components/AboutModal/AboutModal.tsx index 696d388f..519feb21 100644 --- a/src/components/AboutModal/AboutModal.tsx +++ b/src/components/AboutModal/AboutModal.tsx @@ -51,6 +51,15 @@ const AboutInstructLab = ({ isOpen, setIsOpen }: AboutModalProps) => { © InstructLab | Version 1.0.0 Beta + + + Terms of use + {' '} + |{' '} + + Privacy Policy + +
From 691f1c6bc74c830903f43d0c229e8c227d7bcf2d Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Thu, 26 Sep 2024 14:34:11 -0700 Subject: [PATCH 48/52] Fix rendering of the error messages Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- src/components/Contribute/Knowledge/index.tsx | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/src/components/Contribute/Knowledge/index.tsx b/src/components/Contribute/Knowledge/index.tsx index 18c3dc43..547995e6 100644 --- a/src/components/Contribute/Knowledge/index.tsx +++ b/src/components/Contribute/Knowledge/index.tsx @@ -220,65 +220,51 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno } }, [knowledgeEditFormData]); - const validateContext = (seedExample: SeedExample): SeedExample => { + const validateContext = (context: string) => { // Split the context into words based on spaces - const contextStr = seedExample.context.trim(); + const contextStr = context.trim(); if (contextStr.length == 0) { setDisableAction(true); - seedExample.validationError = 'Context is required'; - seedExample.isContextValid = ValidatedOptions.error; - return seedExample; + return { errorMsg: 'Context is required', context: ValidatedOptions.error }; } const tokens = contextStr.split(/\s+/); if (tokens.length > 0 && tokens.length <= 500) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - seedExample.isContextValid = ValidatedOptions.success; - return seedExample; + return { errorMsg: '', context: ValidatedOptions.success }; } setDisableAction(true); - seedExample.validationError = 'Context must be less than 500 words. Current word count: ' + tokens.length; - seedExample.isContextValid = ValidatedOptions.error; - return seedExample; + const errorMsg = 'Context must be less than 500 words. Current word count: ' + tokens.length; + return { errorMsg: errorMsg, context: ValidatedOptions.error }; }; - const validateQuestion = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { - const questionStr = qnaPair.question.trim(); + const validateQuestion = (question: string) => { + const questionStr = question.trim(); if (questionStr.length == 0) { setDisableAction(true); - qnaPair.questionValidationError = 'Question is required'; - qnaPair.isQuestionValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Question is required', context: ValidatedOptions.error }; } const tokens = questionStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - qnaPair.isQuestionValid = ValidatedOptions.success; - return qnaPair; + return { errorMsg: '', context: ValidatedOptions.success }; } setDisableAction(true); - qnaPair.questionValidationError = 'Question must be less than 250 words. Current word count: ' + tokens.length; - qnaPair.isQuestionValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Question must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; }; - const validateAnswer = (qnaPair: QuestionAndAnswerPair): QuestionAndAnswerPair => { - const answerStr = qnaPair.answer.trim(); + const validateAnswer = (answer: string) => { + const answerStr = answer.trim(); if (answerStr.length == 0) { setDisableAction(true); - qnaPair.answerValidationError = 'Answer is required'; - qnaPair.isAnswerValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Answer is required', context: ValidatedOptions.error }; } const tokens = answerStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - qnaPair.isAnswerValid = ValidatedOptions.success; - return qnaPair; + return { errorMsg: '', context: ValidatedOptions.success }; } setDisableAction(true); - qnaPair.answerValidationError = 'Answer must be less than 250 words. Current word count: ' + tokens.length; - qnaPair.isAnswerValid = ValidatedOptions.error; - return qnaPair; + return { errorMsg: 'Answer must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; }; const handleContextInputChange = (seedExampleIndex: number, contextValue: string): void => { @@ -295,14 +281,18 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno }; const handleContextBlur = (seedExampleIndex: number): void => { - setSeedExamples( - seedExamples.map((seedExample: SeedExample, index: number) => { - if (index === seedExampleIndex) { - return validateContext(seedExample); - } - return seedExample; - }) - ); + const updatedSeedExamples = seedExamples.map((seedExample: SeedExample, index: number): SeedExample => { + if (index === seedExampleIndex) { + const { errorMsg, context } = validateContext(seedExample.context); + return { + ...seedExample, + isContextValid: context, + validationError: errorMsg + }; + } + return seedExample; + }); + setSeedExamples(updatedSeedExamples); }; const handleQuestionInputChange = (seedExampleIndex: number, questionAndAnswerIndex: number, questionValue: string): void => { @@ -333,7 +323,12 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - return validateQuestion(questionAndAnswerPair); + const { errorMsg, context } = validateQuestion(questionAndAnswerPair.question); + return { + ...questionAndAnswerPair, + isQuestionValid: context, + questionValidationError: errorMsg + }; } return questionAndAnswerPair; }) @@ -371,7 +366,12 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - return validateAnswer(questionAndAnswerPair); + const { errorMsg, context } = validateAnswer(questionAndAnswerPair.answer); + return { + ...questionAndAnswerPair, + isAnswerValid: context, + answerValidationError: errorMsg + }; } return questionAndAnswerPair; }) From 24500846930edbde969721b0e50105e6d3c2dd70 Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Fri, 27 Sep 2024 02:29:53 -0700 Subject: [PATCH 49/52] Fix knowledge contribution submission Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- src/components/Contribute/Knowledge/index.tsx | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/components/Contribute/Knowledge/index.tsx b/src/components/Contribute/Knowledge/index.tsx index 547995e6..881866f8 100644 --- a/src/components/Contribute/Knowledge/index.tsx +++ b/src/components/Contribute/Knowledge/index.tsx @@ -225,46 +225,46 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno const contextStr = context.trim(); if (contextStr.length == 0) { setDisableAction(true); - return { errorMsg: 'Context is required', context: ValidatedOptions.error }; + return { msg: 'Context is required', status: ValidatedOptions.error }; } const tokens = contextStr.split(/\s+/); if (tokens.length > 0 && tokens.length <= 500) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { errorMsg: '', context: ValidatedOptions.success }; + return { msg: 'Valid Input', status: ValidatedOptions.success }; } setDisableAction(true); const errorMsg = 'Context must be less than 500 words. Current word count: ' + tokens.length; - return { errorMsg: errorMsg, context: ValidatedOptions.error }; + return { msg: errorMsg, status: ValidatedOptions.error }; }; const validateQuestion = (question: string) => { const questionStr = question.trim(); if (questionStr.length == 0) { setDisableAction(true); - return { errorMsg: 'Question is required', context: ValidatedOptions.error }; + return { msg: 'Question is required', status: ValidatedOptions.error }; } const tokens = questionStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { errorMsg: '', context: ValidatedOptions.success }; + return { msg: 'Valid input', status: ValidatedOptions.success }; } setDisableAction(true); - return { errorMsg: 'Question must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; + return { msg: 'Question must be less than 250 words. Current word count: ' + tokens.length, status: ValidatedOptions.error }; }; const validateAnswer = (answer: string) => { const answerStr = answer.trim(); if (answerStr.length == 0) { setDisableAction(true); - return { errorMsg: 'Answer is required', context: ValidatedOptions.error }; + return { msg: 'Answer is required', status: ValidatedOptions.error }; } const tokens = answerStr.split(/\s+/); if (tokens.length > 0 && tokens.length < 250) { setDisableAction(!checkKnowledgeFormCompletion(knowledgeFormData)); - return { errorMsg: '', context: ValidatedOptions.success }; + return { msg: 'Valid input', status: ValidatedOptions.success }; } setDisableAction(true); - return { errorMsg: 'Answer must be less than 250 words. Current word count: ' + tokens.length, context: ValidatedOptions.error }; + return { msg: 'Answer must be less than 250 words. Current word count: ' + tokens.length, status: ValidatedOptions.error }; }; const handleContextInputChange = (seedExampleIndex: number, contextValue: string): void => { @@ -283,11 +283,11 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno const handleContextBlur = (seedExampleIndex: number): void => { const updatedSeedExamples = seedExamples.map((seedExample: SeedExample, index: number): SeedExample => { if (index === seedExampleIndex) { - const { errorMsg, context } = validateContext(seedExample.context); + const { msg, status } = validateContext(seedExample.context); return { ...seedExample, - isContextValid: context, - validationError: errorMsg + isContextValid: status, + validationError: msg }; } return seedExample; @@ -323,11 +323,11 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - const { errorMsg, context } = validateQuestion(questionAndAnswerPair.question); + const { msg, status } = validateQuestion(questionAndAnswerPair.question); return { ...questionAndAnswerPair, - isQuestionValid: context, - questionValidationError: errorMsg + isQuestionValid: status, + questionValidationError: msg }; } return questionAndAnswerPair; @@ -366,11 +366,11 @@ export const KnowledgeForm: React.FunctionComponent = ({ kno ...seedExample, questionAndAnswers: seedExample.questionAndAnswers.map((questionAndAnswerPair: QuestionAndAnswerPair, index: number) => { if (index === questionAndAnswerIndex) { - const { errorMsg, context } = validateAnswer(questionAndAnswerPair.answer); + const { msg, status } = validateAnswer(questionAndAnswerPair.answer); return { ...questionAndAnswerPair, - isAnswerValid: context, - answerValidationError: errorMsg + isAnswerValid: status, + answerValidationError: msg }; } return questionAndAnswerPair; From eb56774eeabca497f159a48fce6b09e02e51a07f Mon Sep 17 00:00:00 2001 From: Anil Vishnoi Date: Fri, 27 Sep 2024 02:30:58 -0700 Subject: [PATCH 50/52] Use the latest image. Latest tag points to the latest release Signed-off-by: Anil Vishnoi Signed-off-by: Samarpita Bhaumik --- deploy/k8s/overlays/openshift/prod/kustomization.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/k8s/overlays/openshift/prod/kustomization.yaml b/deploy/k8s/overlays/openshift/prod/kustomization.yaml index 64526af1..a8b11371 100644 --- a/deploy/k8s/overlays/openshift/prod/kustomization.yaml +++ b/deploy/k8s/overlays/openshift/prod/kustomization.yaml @@ -36,7 +36,7 @@ patches: patch: |- - op: replace path: /spec/template/spec/containers/0/image - value: quay.io/instructlab-ui/ui:v1.0.0-beta # Override this image if you want to use a different UI image + value: quay.io/instructlab-ui/ui:latest #Override this image if you want to use a different UI image # Override the pathservice image for Openshift production deployment - target: @@ -45,4 +45,4 @@ patches: patch: |- - op: replace path: /spec/template/spec/containers/0/image - value: quay.io/instructlab-ui/pathservice:v1.0.0-beta # Override this image if you want to use a different pathservice image + value: quay.io/instructlab-ui/pathservice:latest #Override this image if you want to use a different pathservice image From 03e953ba1c9222eda5a5fac5474e2d8abf5f33c1 Mon Sep 17 00:00:00 2001 From: Samarpita Bhaumik Date: Tue, 1 Oct 2024 20:38:01 +0530 Subject: [PATCH 51/52] Udated the lint issues Udated the lint issues Signed-off-by: Samarpita Bhaumik --- src/app/login/githublogin.css | 2 +- src/app/login/githublogin.tsx | 120 +++++++++++++++++----------------- 2 files changed, 60 insertions(+), 62 deletions(-) diff --git a/src/app/login/githublogin.css b/src/app/login/githublogin.css index 11a496c2..74199c36 100644 --- a/src/app/login/githublogin.css +++ b/src/app/login/githublogin.css @@ -1,5 +1,5 @@ a { - color: white; + color: white; text-decoration: underline; } diff --git a/src/app/login/githublogin.tsx b/src/app/login/githublogin.tsx index 43b2a7b9..bf94994b 100644 --- a/src/app/login/githublogin.tsx +++ b/src/app/login/githublogin.tsx @@ -16,68 +16,66 @@ const GithubLogin: React.FC = () => { }; return ( - - - - -
- - Sign in to your account - - - - Join the novel, community based movement to

create truly open source LLMs -
-
-
- -
- - - - GitHub - {' '} - |{' '} - - Collaborate - {' '} - |{' '} - - Code Of Conduct - - - - - Terms of use - {' '} - |{' '} - - Privacy Policy - - - +
+ + +
+ + Sign in to your account + + + + Join the novel, community based movement to

create truly open source LLMs +
+
+
+
- - - - + + + + GitHub + {' '} + |{' '} + + Collaborate + {' '} + |{' '} + + Code Of Conduct + + + + + Terms of use + {' '} + |{' '} + + Privacy Policy + + + +
+
+
+
); }; From db4e31395fa2236ab47bf13410aa679f94c4fdde Mon Sep 17 00:00:00 2001 From: Ash Evans <70710356+aevo98765@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:23:18 +0100 Subject: [PATCH 52/52] Update githublogin.tsx to remove the unused imports Signed-off-by: Ash Evans <70710356+aevo98765@users.noreply.github.com> --- src/app/login/githublogin.tsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/login/githublogin.tsx b/src/app/login/githublogin.tsx index bf94994b..c0086084 100644 --- a/src/app/login/githublogin.tsx +++ b/src/app/login/githublogin.tsx @@ -1,6 +1,4 @@ import React from 'react'; -import { Page } from '@patternfly/react-core/dist/dynamic/components/Page'; -import { PageSection } from '@patternfly/react-core/dist/dynamic/components/Page'; import { Button } from '@patternfly/react-core/dist/dynamic/components/Button'; import { Text } from '@patternfly/react-core/dist/dynamic/components/Text'; import { TextContent } from '@patternfly/react-core/dist/dynamic/components/Text';