feat: [code-286]: fix yarn checks

This commit is contained in:
calvin 2023-05-21 22:07:16 -06:00
parent 0f4b58adcb
commit 070b739c6f
14 changed files with 118 additions and 143 deletions

View File

@ -50,7 +50,7 @@ export function CommitsView({
return (
<Layout.Horizontal spacing="small" flex={{ alignItems: 'center' }} style={{ display: 'inline-flex' }}>
<Avatar hoverCard={false} size="small" name={row.original.author?.identity?.name || ''} />
<Text icon='code-tag' iconProps={{size:22}} className={css.rowText} color={Color.BLACK}>
<Text icon="code-tag" iconProps={{ size: 22 }} className={css.rowText} color={Color.BLACK}>
{row.original.author?.identity?.name}
</Text>
</Layout.Horizontal>

View File

@ -8,7 +8,6 @@
font-size: var(--form-input-font-size) !important;
font-weight: 500 !important;
}
}
.extendedDescription textarea {

View File

@ -29,7 +29,7 @@ import { get } from 'lodash-es'
import { useModalHook } from '@harness/use-modal'
import { useStrings } from 'framework/strings'
import { getErrorMessage, permissionProps } from 'utils/Utils'
import { CodeIcon, GitInfoProps, isGitBranchNameValid } from 'utils/GitUtils'
import { GitInfoProps, isGitBranchNameValid } from 'utils/GitUtils'
import { BranchTagSelect } from 'components/BranchTagSelect/BranchTagSelect'
import type { RepoBranch } from 'services/code'
import { useGetSpaceParam } from 'hooks/useGetSpaceParam'
@ -112,7 +112,6 @@ export function useCreateTagModal({
name: branchName,
sourceBranch: suggestedSourceBranch,
description: ''
}}
formName="createGitTag"
enableReinitialize={true}

View File

@ -71,7 +71,10 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => {
<Button variation={ButtonVariation.TERTIARY} size={ButtonSize.SMALL} text={'Add +'}></Button>
</Layout.Horizontal>
<Container padding={{ top: 'medium', bottom: 'large' }}>
<Text className={css.semiBoldText} padding={{ bottom: 'medium' }} font={{ variation: FontVariation.FORM_LABEL, size: 'small' }}>
<Text
className={css.semiBoldText}
padding={{ bottom: 'medium' }}
font={{ variation: FontVariation.FORM_LABEL, size: 'small' }}>
{getString('required')}
</Text>
{reviewers && reviewers?.length !== 0 ? (
@ -119,9 +122,7 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => {
}
)
) : (
<Text
color={Color.GREY_300}
font={{ variation: FontVariation.BODY2_SEMI, size: 'small' }}>
<Text color={Color.GREY_300} font={{ variation: FontVariation.BODY2_SEMI, size: 'small' }}>
{getString('noRequiredReviewers')}
</Text>
)}
@ -174,9 +175,7 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => {
)
})
) : (
<Text
color={Color.GREY_300}
font={{ variation: FontVariation.BODY2_SEMI, size: 'small' }}>
<Text color={Color.GREY_300} font={{ variation: FontVariation.BODY2_SEMI, size: 'small' }}>
{getString('noOptionalReviewers')}
</Text>
)}

View File

@ -2,4 +2,3 @@
min-height: var(--page-min-height, 100%);
background-color: var(--primary-bg) !important;
}

View File

@ -14,11 +14,7 @@ export default function RepositoryTags() {
return (
<Container className={css.main}>
<RepositoryPageHeader
repoMetadata={repoMetadata}
title={getString('tags')}
dataTooltipId="repositoryTags"
/>
<RepositoryPageHeader repoMetadata={repoMetadata} title={getString('tags')} dataTooltipId="repositoryTags" />
<PageBody error={getErrorMessage(error)} retryOnError={voidFn(refetch)}>
<LoadingSpinner visible={loading} />

View File

@ -5,4 +5,3 @@
height: calc(100vh - var(--page-header-height, 64px) - 120px) !important;
}
}

View File

@ -2,7 +2,7 @@ import React, { useState } from 'react'
import { Container } from '@harness/uicore'
import { useGet } from 'restful-react'
import { useHistory } from 'react-router-dom'
import type { RepoBranch, RepoCommitTag } from 'services/code'
import type { RepoCommitTag } from 'services/code'
import { usePageIndex } from 'hooks/usePageIndex'
import { LIST_FETCHING_LIMIT } from 'utils/Utils'
import { useAppContext } from 'AppContext'
@ -10,10 +10,9 @@ import type { GitInfoProps } from 'utils/GitUtils'
import { ResourceListingPagination } from 'components/ResourceListingPagination/ResourceListingPagination'
import { useShowRequestError } from 'hooks/useShowRequestError'
import { NoResultCard } from 'components/NoResultCard/NoResultCard'
import { BranchesContent } from '../../RepositoryBranches/RepositoryBranchesContent/BranchesContent/BranchesContent'
import css from './RepositoryTagsContent.module.scss'
import { RepositoryTagsContentHeader } from '../RepositoryTagsContentHeader/RepositoryTagsContentHeader'
import { TagsContent } from '../TagsContent/TagsContent'
import css from './RepositoryTagsContent.module.scss'
export function RepositoryTagsContent({ repoMetadata }: Pick<GitInfoProps, 'repoMetadata'>) {
const { routes } = useAppContext()

View File

@ -18,4 +18,3 @@
.branchDropdown {
background-color: var(--white);
}

View File

@ -1,11 +1,10 @@
import React, { useMemo, useState } from 'react'
import { Container, Layout, FlexExpander, DropDown, ButtonVariation } from '@harness/uicore'
import React, { useState } from 'react'
import { Container, Layout, FlexExpander, ButtonVariation } from '@harness/uicore'
import { useStrings } from 'framework/strings'
import { GitBranchType, CodeIcon, GitInfoProps } from 'utils/GitUtils'
import { SearchInputWithSpinner } from 'components/SearchInputWithSpinner/SearchInputWithSpinner'
import { CreateBranchModalButton } from 'components/CreateBranchModal/CreateBranchModal'
import css from './RepositoryTagsContentHeader.module.scss'
import { CreateTagModalButton } from 'components/CreateTagModal/CreateTagModal'
import css from './RepositoryTagsContentHeader.module.scss'
interface RepositoryTagsContentHeaderProps extends Pick<GitInfoProps, 'repoMetadata'> {
loading?: boolean
@ -16,30 +15,18 @@ interface RepositoryTagsContentHeaderProps extends Pick<GitInfoProps, 'repoMetad
}
export function RepositoryTagsContentHeader({
onBranchTypeSwitched,
onSearchTermChanged,
activeBranchType = GitBranchType.ALL,
repoMetadata,
onNewBranchCreated,
loading
}: RepositoryTagsContentHeaderProps) {
const { getString } = useStrings()
const [branchType, setBranchType] = useState(activeBranchType)
const [searchTerm, setSearchTerm] = useState('')
const items = useMemo(
() => [
{ label: getString('activeBranches'), value: GitBranchType.ACTIVE },
{ label: getString('inactiveBranches'), value: GitBranchType.INACTIVE },
// { label: getString('yourBranches'), value: GitBranchType.YOURS },
{ label: getString('allBranches'), value: GitBranchType.ALL }
],
[getString]
)
return (
<Container className={css.main}>
<Layout.Horizontal spacing="medium">
<SearchInputWithSpinner
loading={loading}
query={searchTerm}

View File

@ -5,32 +5,31 @@ import {
TableV2 as Table,
Text,
Avatar,
Tag,
Intent,
useToaster,
ButtonVariation
} from '@harness/uicore'
import type { CellProps, Column } from 'react-table'
import { Link, useHistory } from 'react-router-dom'
import cx from 'classnames'
import Keywords from 'react-keywords'
import { useMutate } from 'restful-react'
import { noop } from 'lodash-es'
import { String, useStrings } from 'framework/strings'
import { useAppContext } from 'AppContext'
import type {
OpenapiCalculateCommitDivergenceRequest,
RepoBranch,
RepoCommitDivergence,
TypesRepository
} from 'services/code'
import { formatDate, getErrorMessage } from 'utils/Utils'
import { formatDate, getErrorMessage, voidFn } from 'utils/Utils'
import { useConfirmAction } from 'hooks/useConfirmAction'
import { OptionsMenuButton } from 'components/OptionsMenuButton/OptionsMenuButton'
import { CommitDivergence } from 'components/CommitDivergence/CommitDivergence'
import { CodeIcon, makeDiffRefs } from 'utils/GitUtils'
import css from './TagsContent.module.scss'
import { CreateBranchModalButton, useCreateBranchModal } from 'components/CreateBranchModal/CreateBranchModal'
import { useCreateBranchModal } from 'components/CreateBranchModal/CreateBranchModal'
import { CommitActions } from 'components/CommitActions/CommitActions'
import { CodeIcon } from 'utils/GitUtils'
import css from './TagsContent.module.scss'
interface TagsContentProps {
searchTerm?: string
@ -63,7 +62,7 @@ export function TagsContent({ repoMetadata, searchTerm = '', branches, onDeleteS
})
}
}, [getBranchDivergence, branchDivergenceRequestBody])
const onSuccess = () => {}
const onSuccess = voidFn(noop)
const openModal = useCreateBranchModal({ repoMetadata, onSuccess })
const columns: Column<RepoBranch>[] = useMemo(