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

Fix the Host card on the VC profile #7150

Merged
merged 2 commits into from
Nov 6, 2024
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
15 changes: 13 additions & 2 deletions src/core/apollo/generated/apollo-hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14080,7 +14080,18 @@ export const VirtualContributorDocument = gql`
profile {
id
displayName
description
url
location {
country
city
}
avatar: visual(type: AVATAR) {
...VisualFull
}
tagsets {
id
tags
}
}
}
searchVisibility
Expand All @@ -14107,8 +14118,8 @@ export const VirtualContributorDocument = gql`
}
}
}
${TagsetDetailsFragmentDoc}
${VisualFullFragmentDoc}
${TagsetDetailsFragmentDoc}
`;

/**
Expand Down
73 changes: 70 additions & 3 deletions src/core/apollo/generated/graphql-schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -948,6 +948,7 @@ export enum AuthorizationPrivilege {
CommunityAddMember = 'COMMUNITY_ADD_MEMBER',
CommunityAddMemberVcFromAccount = 'COMMUNITY_ADD_MEMBER_VC_FROM_ACCOUNT',
CommunityApply = 'COMMUNITY_APPLY',
CommunityApplyAccept = 'COMMUNITY_APPLY_ACCEPT',
CommunityInvite = 'COMMUNITY_INVITE',
CommunityInviteAccept = 'COMMUNITY_INVITE_ACCEPT',
CommunityJoin = 'COMMUNITY_JOIN',
Expand Down Expand Up @@ -18450,17 +18451,83 @@ export type VirtualContributorQuery = {
| {
__typename?: 'Organization';
id: string;
profile: { __typename?: 'Profile'; id: string; displayName: string; description?: string | undefined };
profile: {
__typename?: 'Profile';
id: string;
displayName: string;
url: string;
location?: { __typename?: 'Location'; country?: string | undefined; city?: string | undefined } | undefined;
avatar?:
| {
__typename?: 'Visual';
id: string;
uri: string;
name: string;
allowedTypes: Array<string>;
aspectRatio: number;
maxHeight: number;
maxWidth: number;
minHeight: number;
minWidth: number;
alternativeText?: string | undefined;
}
| undefined;
tagsets?: Array<{ __typename?: 'Tagset'; id: string; tags: Array<string> }> | undefined;
};
}
| {
__typename?: 'User';
id: string;
profile: { __typename?: 'Profile'; id: string; displayName: string; description?: string | undefined };
profile: {
__typename?: 'Profile';
id: string;
displayName: string;
url: string;
location?: { __typename?: 'Location'; country?: string | undefined; city?: string | undefined } | undefined;
avatar?:
| {
__typename?: 'Visual';
id: string;
uri: string;
name: string;
allowedTypes: Array<string>;
aspectRatio: number;
maxHeight: number;
maxWidth: number;
minHeight: number;
minWidth: number;
alternativeText?: string | undefined;
}
| undefined;
tagsets?: Array<{ __typename?: 'Tagset'; id: string; tags: Array<string> }> | undefined;
};
}
| {
__typename?: 'VirtualContributor';
id: string;
profile: { __typename?: 'Profile'; id: string; displayName: string; description?: string | undefined };
profile: {
__typename?: 'Profile';
id: string;
displayName: string;
url: string;
location?: { __typename?: 'Location'; country?: string | undefined; city?: string | undefined } | undefined;
avatar?:
| {
__typename?: 'Visual';
id: string;
uri: string;
name: string;
allowedTypes: Array<string>;
aspectRatio: number;
maxHeight: number;
maxWidth: number;
minHeight: number;
minWidth: number;
alternativeText?: string | undefined;
}
| undefined;
tagsets?: Array<{ __typename?: 'Tagset'; id: string; tags: Array<string> }> | undefined;
};
};
aiPersona?:
| {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ query VirtualContributor($id: UUID_NAMEID!) {
profile {
id
displayName
description
url
location {
country
city
}
avatar: visual(type: AVATAR) {
...VisualFull
}
tagsets {
id
tags
}
}
}
searchVisibility
Expand Down
69 changes: 0 additions & 69 deletions src/domain/community/virtualContributor/components/HostCard.tsx

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import BookIcon from '@mui/icons-material/Book';
import CloudDownloadIcon from '@mui/icons-material/CloudDownload';
import RecordVoiceOverIcon from '@mui/icons-material/RecordVoiceOver';
import ShieldIcon from '@mui/icons-material/Shield';
import useTheme from '@mui/material/styles/useTheme';
import { Trans, useTranslation } from 'react-i18next';
import CloudDownloadIcon from '@mui/icons-material/CloudDownload';
import RecordVoiceOverIcon from '@mui/icons-material/RecordVoiceOver';

import HostCard from '../components/HostCard';
import Spacer from '../../../../core/ui/content/Spacer';
import BasicSpaceCard from '../components/BasicSpaceCard';
import PageContent from '../../../../core/ui/content/PageContent';
import { Text, BlockTitle } from '../../../../core/ui/typography';
import ProfileDetail from '../../profile/ProfileDetail/ProfileDetail';
import WrapperMarkdown from '../../../../core/ui/markdown/WrapperMarkdown';
import PageContentBlock from '../../../../core/ui/content/PageContentBlock';
import PageContentColumn from '../../../../core/ui/content/PageContentColumn';
import Spacer from '../../../../core/ui/content/Spacer';
import WrapperMarkdown from '../../../../core/ui/markdown/WrapperMarkdown';
import { BlockTitle, Text } from '../../../../core/ui/typography';
import ProfileDetail from '../../profile/ProfileDetail/ProfileDetail';
import BasicSpaceCard from '../components/BasicSpaceCard';

import { type VCProfilePageViewProps } from './model';
import ContributorCardHorizontal from '../../../../core/ui/card/ContributorCardHorizontal';
import PageContentBlockHeader from '../../../../core/ui/content/PageContentBlockHeader';
import { gutters } from '../../../../core/ui/grid/utils';
import { type VCProfilePageViewProps } from './model';

export const VCProfilePageView = ({
hasBokId,
Expand Down Expand Up @@ -47,8 +47,10 @@ export const VCProfilePageView = ({
aria-label="description"
/>
</PageContentBlock>

<HostCard hostProfile={virtualContributor?.provider.profile} />
<PageContentBlock>
<PageContentBlockHeader title={t('pages.virtualContributorProfile.host')} />
<ContributorCardHorizontal profile={virtualContributor?.provider.profile} seamless />
</PageContentBlock>
bobbykolev marked this conversation as resolved.
Show resolved Hide resolved
</PageContentColumn>

<PageContentColumn columns={8}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@ type VirtualContributor = {
provider: {
profile: {
displayName: string;
description?: string;
avatar?: {
uri: string;
};
location?: {
city?: string;
country?: string;
};
url: string;
};
};
};
Expand Down