feat: [code-1135]: add launch icon (#821)

This commit is contained in:
Calvin Lee 2023-11-22 23:34:45 +00:00 committed by Harness
parent 3d97474dcf
commit 7110eecb7d
10 changed files with 64 additions and 19 deletions

1
web/src/icons/Launch.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 12 12"><path stroke="#B0B1C3" stroke-width="1.2" d="M6 1H3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V6M5 7l6-6m0 0v3m0-3H8"/></svg>

After

Width:  |  Height:  |  Size: 200 B

View File

@ -71,7 +71,7 @@ export default function Home() {
<Layout.Vertical className={css.spaceContainer} spacing="small"> <Layout.Vertical className={css.spaceContainer} spacing="small">
<Text flex={{ justifyContent: 'center', align: 'center-center' }} font={{ variation: FontVariation.H2 }}> <Text flex={{ justifyContent: 'center', align: 'center-center' }} font={{ variation: FontVariation.H2 }}>
{getString('homepage.welcomeText', { {getString('homepage.welcomeText', {
currentUser: currentUser?.display_name currentUser: currentUser?.display_name || currentUser?.email || ''
})} })}
</Text> </Text>
<Text <Text

View File

@ -40,7 +40,7 @@ export const PullRequestMetaLine: React.FC<TypesPullReq & Pick<GitInfoProps, 're
const { getString } = useStrings() const { getString } = useStrings()
const { routes } = useAppContext() const { routes } = useAppContext()
const vars = { const vars = {
user: <strong>{author?.display_name}</strong>, user: <strong>{author?.display_name || author?.email || ''}</strong>,
commits: <strong>{stats?.commits}</strong>, commits: <strong>{stats?.commits}</strong>,
commitsCount: stats?.commits, commitsCount: stats?.commits,
target: ( target: (

View File

@ -167,7 +167,9 @@ export default function PullRequests() {
/> />
</strong> </strong>
), ),
user: <strong>{row.original.author?.display_name}</strong> user: (
<strong>{row.original.author?.display_name || row.original.author?.email || ''}</strong>
)
}} }}
/> />
</Text> </Text>

View File

@ -17,12 +17,14 @@
import React from 'react' import React from 'react'
import cx from 'classnames' import cx from 'classnames'
import { Icon } from '@harnessio/icons' import { Icon } from '@harnessio/icons'
import { Container, Layout, Text } from '@harnessio/uicore' import { Container, Layout, Text, Link } from '@harnessio/uicore'
import { Color } from '@harnessio/design-system' import { Color } from '@harnessio/design-system'
import { ThreadSection } from 'components/ThreadSection/ThreadSection' import { ThreadSection } from 'components/ThreadSection/ThreadSection'
import { FeatureType, type FeatureData } from 'utils/Utils' import { FeatureType, type FeatureData } from 'utils/Utils'
import { useStrings } from 'framework/strings' import { useStrings } from 'framework/strings'
import features from './featureRoadmap.json' import features from './featureRoadmap.json'
import Launch from '../../../icons/Launch.svg'
import css from '../RepositoriesListing.module.scss' import css from '../RepositoriesListing.module.scss'
const FeatureMap = () => { const FeatureMap = () => {
@ -55,7 +57,14 @@ const FeatureMap = () => {
{ {
<Container> <Container>
<Layout.Vertical> <Layout.Vertical>
<Text className={css.featureTitle}>{feature.title}</Text> <Text className={css.featureTitle}>
{feature.title}
<Link noStyling href={feature.link}>
<Container padding={{ top: 'tiny', left: 'small' }}>
<img className={css.launchIcon} src={Launch} width={12} height={12}></img>
</Container>
</Link>
</Text>
<Text className={css.featureContent}>{feature.content}</Text> <Text className={css.featureContent}>{feature.content}</Text>
</Layout.Vertical> </Layout.Vertical>
</Container> </Container>

View File

@ -1,20 +1,42 @@
[ [
{
"type": "comingSoon",
"typeText": "coming soon",
"color": "purple",
"title": "Notifications",
"content": "Email notifications for pull request changes",
"link": "https://ideas.harness.io/admin/roadmap/gitness-roadmap/p/email-notifications"
},
{
"type": "comingSoon",
"typeText": "coming soon",
"color": "purple",
"title": "Code search",
"content": "Keyword search of source code across repositories",
"link": "https://ideas.harness.io/admin/roadmap/gitness-roadmap/p/search-across-repositories"
},
{
"type": "comingSoon",
"typeText": "coming soon",
"color": "purple",
"title": "Image support in Pull Requests",
"content": "Support to upload images in pull request descriptions",
"link": "https://ideas.harness.io/admin/roadmap/gitness-roadmap/p/image-support-in-pr-description"
},
{ {
"type": "released", "type": "released",
"typeText": "released", "typeText": "released",
"title": "Semantic Search", "color": "green",
"content": "Semantic search feature is released." "title": "Code Owners",
"content": "Configure codeowners files to assign ownership to areas of the codebase, and automatically add as reviewers for pull requests with changes to those files",
"link": "https://ideas.harness.io/admin/roadmap/gitness-roadmap/p/code-owners"
}, },
{ {
"type": "comingSoon", "type": "released",
"typeText": "coming soon", "typeText": "released",
"title": "Code search", "color": "green",
"content": "Code search feature is coming soon in December." "title": "Branch Rules",
}, "content": "Define branch rules to enforce process and prevent unwanted changes on protected branches",
{ "link": "https://ideas.harness.io/admin/roadmap/gitness-roadmap/p/branch-rules-merge-checks"
"type": "comingSoon",
"typeText": "coming soon",
"title": "Linked repositories",
"content": "Linked repositories feature is coming soon in December."
} }
] ]

View File

@ -151,9 +151,10 @@
padding-left: 2px !important; padding-left: 2px !important;
} }
.featureTitle { .featureTitle {
font-size: 14px !important; font-size: 13px !important;
font-weight: 600 !important; font-weight: 600 !important;
padding-bottom: var(--spacing-small) !important; padding-bottom: var(--spacing-small) !important;
display: flex !important;
} }
.featureContent { .featureContent {
font-size: 10px !important; font-size: 10px !important;
@ -192,3 +193,10 @@
} }
} }
} }
.repoListingContainer {
width: calc(100% - 285px) !important;
}
.launchIcon {
padding-bottom: 1px !important;
}

View File

@ -24,6 +24,7 @@ export declare const featureText: string
export declare const featureTitle: string export declare const featureTitle: string
export declare const iconContainer: string export declare const iconContainer: string
export declare const input: string export declare const input: string
export declare const launchIcon: string
export declare const layout: string export declare const layout: string
export declare const main: string export declare const main: string
export declare const name: string export declare const name: string
@ -32,6 +33,7 @@ export declare const noDesc: string
export declare const pinned: string export declare const pinned: string
export declare const progressBar: string export declare const progressBar: string
export declare const releasedContainer: string export declare const releasedContainer: string
export declare const repoListingContainer: string
export declare const repoName: string export declare const repoName: string
export declare const repoScope: string export declare const repoScope: string
export declare const row: string export declare const row: string

View File

@ -211,7 +211,7 @@ export default function RepositoriesListing() {
<LoadingSpinner visible={loading && searchTerm === undefined} /> <LoadingSpinner visible={loading && searchTerm === undefined} />
<Layout.Horizontal> <Layout.Horizontal>
<Container height={`100vh`} width={'80%'} margin={{ top: 'medium' }}> <Container height={`100vh`} className={css.repoListingContainer} margin={{ top: 'medium' }}>
<Container padding="xlarge"> <Container padding="xlarge">
<Layout.Horizontal spacing="large" className={css.layout}> <Layout.Horizontal spacing="large" className={css.layout}>
{NewRepoButton} {NewRepoButton}

View File

@ -122,6 +122,7 @@ export interface FeatureData {
type: string type: string
title: string title: string
content: string content: string
link: string
} }
export interface SourceCodeEditorProps { export interface SourceCodeEditorProps {