From 070b739c6f0fce450959d03a08fc75f6c960fa3b Mon Sep 17 00:00:00 2001 From: calvin Date: Sun, 21 May 2023 22:07:16 -0600 Subject: [PATCH] feat: [code-286]: fix yarn checks --- web/src/RouteDefinitions.ts | 2 +- .../components/CommitsView/CommitsView.tsx | 2 +- .../CreateTagModal/CreateTagModal.module.scss | 23 ++-- .../CreateTagModal/CreateTagModal.tsx | 5 +- .../PullRequestSideBar/PullRequestSideBar.tsx | 15 ++- web/src/pages/PullRequests/PullRequests.tsx | 2 +- .../RepositoryTags/RepositoryTags.module.scss | 7 +- .../pages/RepositoryTags/RepositoryTags.tsx | 6 +- .../RepositoryTagsContent.module.scss | 11 +- .../RepositoryTagsContent.tsx | 5 +- .../RepositoryTagsContentHeader.module.scss | 35 +++--- .../RepositoryTagsContentHeader.tsx | 29 ++--- .../TagsContent/TagsContent.module.scss | 104 +++++++++--------- .../TagsContent/TagsContent.tsx | 15 ++- 14 files changed, 118 insertions(+), 143 deletions(-) diff --git a/web/src/RouteDefinitions.ts b/web/src/RouteDefinitions.ts index 62c2ccc78..d1cd6c4ae 100644 --- a/web/src/RouteDefinitions.ts +++ b/web/src/RouteDefinitions.ts @@ -17,7 +17,7 @@ export interface CODEQueryProps { query?: string } -export const pathProps: Readonly, 'repoPath' | 'branch' | 'tags' >> = { +export const pathProps: Readonly, 'repoPath' | 'branch' | 'tags'>> = { space: ':space', repoName: ':repoName', gitRef: ':gitRef*', diff --git a/web/src/components/CommitsView/CommitsView.tsx b/web/src/components/CommitsView/CommitsView.tsx index 18dea6d19..1aaef1b51 100644 --- a/web/src/components/CommitsView/CommitsView.tsx +++ b/web/src/components/CommitsView/CommitsView.tsx @@ -50,7 +50,7 @@ export function CommitsView({ return ( - + {row.original.author?.identity?.name} diff --git a/web/src/components/CreateTagModal/CreateTagModal.module.scss b/web/src/components/CreateTagModal/CreateTagModal.module.scss index d0a0aead8..9308b4852 100644 --- a/web/src/components/CreateTagModal/CreateTagModal.module.scss +++ b/web/src/components/CreateTagModal/CreateTagModal.module.scss @@ -1,16 +1,15 @@ .main { - .title { - --typography-size: 20px !important; - } - - .label { - color: var(--grey-600) !important; - font-size: var(--form-input-font-size) !important; - font-weight: 500 !important; - } + .title { + --typography-size: 20px !important; + } + .label { + color: var(--grey-600) !important; + font-size: var(--form-input-font-size) !important; + font-weight: 500 !important; + } } - + .extendedDescription textarea { - height: 100px !important; - } \ No newline at end of file + height: 100px !important; +} diff --git a/web/src/components/CreateTagModal/CreateTagModal.tsx b/web/src/components/CreateTagModal/CreateTagModal.tsx index 595cb975c..e2f11ff3a 100644 --- a/web/src/components/CreateTagModal/CreateTagModal.tsx +++ b/web/src/components/CreateTagModal/CreateTagModal.tsx @@ -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} @@ -156,7 +155,7 @@ export function useCreateTagModal({ { - + {getString('required')} {reviewers && reviewers?.length !== 0 ? ( @@ -119,14 +122,12 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => { } ) ) : ( - + {getString('noRequiredReviewers')} )} {getString('optional')} @@ -174,9 +175,7 @@ const PullRequestSideBar = (props: PullRequestSideBarProps) => { ) }) ) : ( - + {getString('noOptionalReviewers')} )} diff --git a/web/src/pages/PullRequests/PullRequests.tsx b/web/src/pages/PullRequests/PullRequests.tsx index fb600ada0..868747f5c 100644 --- a/web/src/pages/PullRequests/PullRequests.tsx +++ b/web/src/pages/PullRequests/PullRequests.tsx @@ -156,7 +156,7 @@ export default function PullRequests() { setSearchTerm(value) setPage(1) }} - /> + /> diff --git a/web/src/pages/RepositoryTags/RepositoryTags.module.scss b/web/src/pages/RepositoryTags/RepositoryTags.module.scss index 2ca17d3f5..d1b1df197 100644 --- a/web/src/pages/RepositoryTags/RepositoryTags.module.scss +++ b/web/src/pages/RepositoryTags/RepositoryTags.module.scss @@ -1,5 +1,4 @@ .main { - min-height: var(--page-min-height, 100%); - background-color: var(--primary-bg) !important; - } - \ No newline at end of file + min-height: var(--page-min-height, 100%); + background-color: var(--primary-bg) !important; +} diff --git a/web/src/pages/RepositoryTags/RepositoryTags.tsx b/web/src/pages/RepositoryTags/RepositoryTags.tsx index 9e6fbd510..0185f27bc 100644 --- a/web/src/pages/RepositoryTags/RepositoryTags.tsx +++ b/web/src/pages/RepositoryTags/RepositoryTags.tsx @@ -14,11 +14,7 @@ export default function RepositoryTags() { return ( - + diff --git a/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.module.scss b/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.module.scss index 5709c1772..7f1615d5d 100644 --- a/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.module.scss +++ b/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.module.scss @@ -1,8 +1,7 @@ .resourceContent { - background-color: var(--primary-bg); - - .noData > div { - height: calc(100vh - var(--page-header-height, 64px) - 120px) !important; - } + background-color: var(--primary-bg); + + .noData > div { + height: calc(100vh - var(--page-header-height, 64px) - 120px) !important; } - \ No newline at end of file +} diff --git a/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.tsx b/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.tsx index 7f1f49bc0..15bb42a35 100644 --- a/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.tsx +++ b/web/src/pages/RepositoryTags/RepositoryTagsContent/RepositoryTagsContent.tsx @@ -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) { const { routes } = useAppContext() diff --git a/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.module.scss b/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.module.scss index e4709dc69..611894948 100644 --- a/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.module.scss +++ b/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.module.scss @@ -1,21 +1,20 @@ .main { - div[class*='TextInput'] { - margin-bottom: 0 !important; - margin-left: 0 !important; - - // input { - // background: transparent !important; - // border: none; - // } - } - - > div { - align-items: center; - padding-bottom: var(--spacing-xlarge) !important; - } + div[class*='TextInput'] { + margin-bottom: 0 !important; + margin-left: 0 !important; + + // input { + // background: transparent !important; + // border: none; + // } } - - .branchDropdown { - background-color: var(--white); + + > div { + align-items: center; + padding-bottom: var(--spacing-xlarge) !important; } - \ No newline at end of file +} + +.branchDropdown { + background-color: var(--white); +} diff --git a/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx b/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx index 8b4c04fb7..a63d9682a 100644 --- a/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx +++ b/web/src/pages/RepositoryTags/RepositoryTagsContentHeader/RepositoryTagsContentHeader.tsx @@ -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 { loading?: boolean @@ -16,39 +15,27 @@ interface RepositoryTagsContentHeaderProps extends Pick [ - { 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 ( - { - setSearchTerm(value) - onSearchTermChanged(value) - }} + setSearchTerm(value) + onSearchTermChanged(value) + }} /> - + {} + const onSuccess = voidFn(noop) const openModal = useCreateBranchModal({ repoMetadata, onSuccess }) const columns: Column[] = useMemo(