Skip to content

Commit

Permalink
Merge branch 'master' into aimt/design-table
Browse files Browse the repository at this point in the history
  • Loading branch information
amitamrutiya authored Nov 11, 2024
2 parents 8cf6f9d + ec65297 commit b41d01f
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bump-meshery-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Download Version
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: e2e-test-reporter
name: version-number
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Retrieve Version
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,20 @@ jobs:
versions-check:
needs: publish-gpr
runs-on: ubuntu-latest
outputs:
current: ${{ steps.versions.outputs }}
steps:
- uses: actions/github-script@v7
id: versions
with:
result-encoding: string
script: |
let str = "${{github.event.release.tag_name}}"
let str = `${{github.event.release.tag_name}}`
return str.replace(/^v/, '')
- name: Save Release number
if: ${{ !cancelled() }}
run: |
mkdir -p ./version
echo ${{ steps.versions.outputs }} > ./version/number
echo ${{ steps.versions.outputs.result }} > ./version/number
- name: Upload Version Report
if: ${{ !cancelled() }}
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
Expand Down
2 changes: 1 addition & 1 deletion src/custom/CatalogDetail/LeftPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const LeftPanel: React.FC<LeftPanelProps> = ({
imgURL={details?.catalog_data?.imageURL}
height={'100%'}
width={'100%'}
zoomEffect={false}
zoomEffect={true}
type={{ type: type }}
/>
</CustomCatalogCard>
Expand Down
9 changes: 7 additions & 2 deletions src/custom/CatalogDetail/RelatedDesigns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ interface RelatedDesignsProps {
userProfile?: UserProfile;
technologySVGPath: string;
technologySVGSubpath: string;
orgName: string;
fetchingOrgError: boolean;
}

const RelatedDesigns: React.FC<RelatedDesignsProps> = ({
Expand All @@ -25,7 +27,9 @@ const RelatedDesigns: React.FC<RelatedDesignsProps> = ({
onSuggestedPatternClick,
userProfile,
technologySVGPath,
technologySVGSubpath
technologySVGSubpath,
orgName,
fetchingOrgError
}) => {
const filteredPatternsPerUser = patternsPerUser?.patterns?.filter(
(pattern) => pattern.id !== details.id
Expand All @@ -37,7 +41,8 @@ const RelatedDesigns: React.FC<RelatedDesignsProps> = ({
<AdditionalContainer>
<ContentHeading>
<h2 style={{ margin: '0', textTransform: 'uppercase' }}>
Other published design by {formatToTitleCase(userProfile?.first_name ?? '')}
Other published design by {formatToTitleCase(userProfile?.first_name ?? '')}{' '}
{fetchingOrgError ? '' : `under ${orgName}`}
</h2>
</ContentHeading>
<DesignCardContainer>
Expand Down
8 changes: 7 additions & 1 deletion src/custom/CatalogDetail/RightPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ interface RightPanelProps {
fontFamily?: string;
technologySVGPath: string;
technologySVGSubpath: string;
orgName: string;
fetchingOrgError: boolean;
}

const RightPanel: React.FC<RightPanelProps> = ({
Expand All @@ -43,7 +45,9 @@ const RightPanel: React.FC<RightPanelProps> = ({
fontFamily,
useGetUserProfileByIdQuery,
technologySVGPath,
technologySVGSubpath
technologySVGSubpath,
orgName,
fetchingOrgError
}) => {
const cleanedType = type.replace('my-', '').replace(/s$/, '');
const { data: userProfile } = useGetUserProfileByIdQuery({
Expand All @@ -69,6 +73,8 @@ const RightPanel: React.FC<RightPanelProps> = ({
{showCaveats && <CaveatsSection details={details} />}
<RelatedDesigns
details={details}
orgName={orgName}
fetchingOrgError={fetchingOrgError}
type={type}
patternsPerUser={patternsPerUser}
onSuggestedPatternClick={onSuggestedPatternClick}
Expand Down
17 changes: 16 additions & 1 deletion src/custom/CatalogDetail/UserInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Avatar } from '../../base';
import { Pattern } from '../CustomCatalog/CustomCard';
import { getVersion } from '../CustomCatalog/Helper';
import { formatDate } from './helper';
Expand All @@ -15,7 +16,21 @@ const UserInfo: React.FC<UserInfoProps> = ({ details, showVersion = true, userPr
<>
<ContentRow>
<ContentDetailsPoints>CREATED BY</ContentDetailsPoints>
<ContentDetailsText>
<ContentDetailsText
style={{
display: 'flex',
alignItems: 'center',
gap: '7px'
}}
>
<Avatar
src={userProfile?.avatar_url}
alt={`${userProfile?.first_name} ${userProfile?.last_name}`}
style={{
height: '28px',
width: '28px'
}}
/>
<RedirectLink
href={`https://meshery.layer5.io/user/${details?.user_id}`}
target="_blank"
Expand Down
5 changes: 3 additions & 2 deletions src/custom/CatalogDetail/style.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ export const UnpublishAction = styled('div')<ActionButtonProps>(({ disabled = fa
flex: '1'
}));

export const ContentDetailsText = styled(Typography)(({ theme }) => ({
export const ContentDetailsText = styled(Typography)(({ theme, style }) => ({
fontFamily: 'inherit',
fontSize: '1rem',
color: theme.palette.text.default,
['@media (min-width:1200px)']: {
fontSize: '1'
}
},
...style
}));

export const ContentHeading = styled('div')(() => ({
Expand Down

0 comments on commit b41d01f

Please sign in to comment.