Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

7546 - Add initial placeholder in VC BoK dialog #7649

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/core/i18n/en/translation.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3064,6 +3064,7 @@
},
"name": "Name",
"bodyOfKnowledge": "Body Of Knowledge",
"placeholder": "Here you'll find a collection of documents and texts that are ingested to give this VC its insights and functionality.",
"infoTextBoK": "Select the Subspace you want as a body of knowledge for this Virtual Contributor",
"noSubspacesInfo": "Create a Subspace first, and populate it with the relevant information for your Virtual Contributor.",
"confirmDeletion": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ type KnowledgeBaseDialogProps = {
onClose: () => void;
title: string;
id: string;
placeholder: string;
};

const AVAILABLE_CALLOUT_TYPES = [CalloutType.Post, CalloutType.LinkCollection, CalloutType.PostCollection];

const KnowledgeBaseDialog = ({ onClose, title, id }: KnowledgeBaseDialogProps) => {
const KnowledgeBaseDialog = ({ onClose, title, id, placeholder }: KnowledgeBaseDialogProps) => {
const { t } = useTranslation();
const {
calloutsSetId,
Expand All @@ -37,6 +38,7 @@ const KnowledgeBaseDialog = ({ onClose, title, id }: KnowledgeBaseDialogProps) =
ingestKnowledge,
ingestLoading,
hasReadAccess,

loadingPrivileges,
} = useKnowledgeBase({ id });

Expand All @@ -60,9 +62,9 @@ const KnowledgeBaseDialog = ({ onClose, title, id }: KnowledgeBaseDialogProps) =
) : (
<StorageConfigContextProvider locationType="virtualContributor" virtualContributorId={id}>
<Gutters disablePadding>
{(knowledgeBaseDescription || canCreateCallout) && (
{(placeholder || knowledgeBaseDescription || canCreateCallout) && (
<DescriptionComponent
description={knowledgeBaseDescription}
description={knowledgeBaseDescription || placeholder}
canEdit={canCreateCallout}
onUpdate={updateDescription}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ export const VCProfileContentView = ({
<KnowledgeBaseDialog
id={virtualContributor?.id ?? ''}
title={`${name}: ${t('virtualContributorSpaceSettings.bodyOfKnowledge')}`}
placeholder={t('virtualContributorSpaceSettings.placeholder')}
onClose={onCloseKnowledgeBase}
/>
)}
Expand Down