mirror of
https://github.com/harness/drone.git
synced 2025-05-19 10:29:55 +08:00
Merge branch 'code-706' of _OKE5H2PQKOUfzFFDuD4FA/default/CODE/gitness (#284)
This commit is contained in:
commit
083849daa8
@ -15,6 +15,11 @@
|
|||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.layout {
|
||||||
|
> .TextInput--main {
|
||||||
|
margin-bottom: var(--spacing-1) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.main {
|
.main {
|
||||||
.input {
|
.input {
|
||||||
@ -57,9 +62,18 @@
|
|||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
max-height: 300px;
|
max-height: 300px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
||||||
|
.menuItem:hover {
|
||||||
|
background: rgba(0, 146, 228, 0.0392156863) !important;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.newBtnText {
|
.newBtnText {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
padding: var(--spacing-small) 0;
|
||||||
|
}
|
||||||
|
@ -3,12 +3,16 @@
|
|||||||
declare const styles: {
|
declare const styles: {
|
||||||
readonly button: string
|
readonly button: string
|
||||||
readonly prefix: string
|
readonly prefix: string
|
||||||
|
readonly layout: string
|
||||||
|
readonly textInputMain: string
|
||||||
readonly main: string
|
readonly main: string
|
||||||
readonly input: string
|
readonly input: string
|
||||||
readonly tabContainer: string
|
readonly tabContainer: string
|
||||||
readonly branchesOnly: string
|
readonly branchesOnly: string
|
||||||
readonly popover: string
|
readonly popover: string
|
||||||
readonly listContainer: string
|
readonly listContainer: string
|
||||||
|
readonly menuItem: string
|
||||||
readonly newBtnText: string
|
readonly newBtnText: string
|
||||||
|
readonly avatar: string
|
||||||
}
|
}
|
||||||
export default styles
|
export default styles
|
||||||
|
@ -88,7 +88,7 @@ const PopoverContent: React.FC<ReviewerSelectProps> = ({ repoMetadata, gitRef, o
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Container padding="medium" className={css.main}>
|
<Container padding="medium" className={css.main}>
|
||||||
<Layout.Vertical spacing="small">
|
<Layout.Vertical className={css.layout}>
|
||||||
<TextInput
|
<TextInput
|
||||||
className={css.input}
|
className={css.input}
|
||||||
inputRef={ref => (inputRef.current = ref)}
|
inputRef={ref => (inputRef.current = ref)}
|
||||||
@ -154,14 +154,15 @@ function GitRefList({
|
|||||||
)}
|
)}
|
||||||
|
|
||||||
{!!data?.length && (
|
{!!data?.length && (
|
||||||
<Container className={css.listContainer} padding={{ top: 'small', bottom: 'small' }}>
|
<Container className={css.listContainer}>
|
||||||
<Menu>
|
<Menu>
|
||||||
{data.map(({ display_name, email, id }) => (
|
{data.map(({ display_name, email, id }) => (
|
||||||
<MenuItem
|
<MenuItem
|
||||||
key={email}
|
key={email}
|
||||||
|
className={css.menuItem}
|
||||||
text={
|
text={
|
||||||
<Layout.Horizontal>
|
<Layout.Horizontal>
|
||||||
<Avatar name={display_name} size="small" hoverCard={false} />
|
<Avatar className={css.avatar} name={display_name} size="small" hoverCard={false} />
|
||||||
|
|
||||||
<Layout.Vertical padding={{ left: 'small' }}>
|
<Layout.Vertical padding={{ left: 'small' }}>
|
||||||
<Text>
|
<Text>
|
||||||
|
@ -51,7 +51,8 @@ export const Conversation: React.FC<ConversationProps> = ({
|
|||||||
})
|
})
|
||||||
const showSpinner = useMemo(() => loading && !activities, [loading, activities])
|
const showSpinner = useMemo(() => loading && !activities, [loading, activities])
|
||||||
const { data: reviewers, refetch: refetchReviewers } = useGet<Unknown[]>({
|
const { data: reviewers, refetch: refetchReviewers } = useGet<Unknown[]>({
|
||||||
path: `/api/v1/repos/${repoMetadata.path}/+/pullreq/${pullRequestMetadata.number}/reviewers`
|
path: `/api/v1/repos/${repoMetadata.path}/+/pullreq/${pullRequestMetadata.number}/reviewers`,
|
||||||
|
debounce: 500
|
||||||
})
|
})
|
||||||
const { showError } = useToaster()
|
const { showError } = useToaster()
|
||||||
const [dateOrderSort, setDateOrderSort] = useState<boolean | 'desc' | 'asc'>(orderSortDate.ASC)
|
const [dateOrderSort, setDateOrderSort] = useState<boolean | 'desc' | 'asc'>(orderSortDate.ASC)
|
||||||
@ -133,7 +134,7 @@ export const Conversation: React.FC<ConversationProps> = ({
|
|||||||
if (prHasChanged) {
|
if (prHasChanged) {
|
||||||
refetchActivities()
|
refetchActivities()
|
||||||
}
|
}
|
||||||
}, [prHasChanged, refetchActivities])
|
}, [prHasChanged, refetchActivities, refetchReviewers])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PullRequestTabContentWrapper loading={showSpinner} error={error} onRetry={refetchActivities}>
|
<PullRequestTabContentWrapper loading={showSpinner} error={error} onRetry={refetchActivities}>
|
||||||
@ -349,14 +350,13 @@ export const Conversation: React.FC<ConversationProps> = ({
|
|||||||
/>
|
/>
|
||||||
</Layout.Vertical>
|
</Layout.Vertical>
|
||||||
</Container>
|
</Container>
|
||||||
{repoMetadata ? (
|
|
||||||
<PullRequestSideBar
|
<PullRequestSideBar
|
||||||
reviewers={reviewers}
|
reviewers={reviewers}
|
||||||
repoMetadata={repoMetadata}
|
repoMetadata={repoMetadata}
|
||||||
pullRequestMetadata={pullRequestMetadata}
|
pullRequestMetadata={pullRequestMetadata}
|
||||||
refetchReviewers={refetchReviewers}
|
refetchReviewers={refetchReviewers}
|
||||||
/>
|
/>
|
||||||
) : null}
|
|
||||||
</Layout.Horizontal>
|
</Layout.Horizontal>
|
||||||
</Container>
|
</Container>
|
||||||
</Layout.Vertical>
|
</Layout.Vertical>
|
||||||
|
Loading…
Reference in New Issue
Block a user