mirror of
https://github.com/harness/drone.git
synced 2025-05-19 02:20:03 +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;
|
||||
}
|
||||
}
|
||||
.layout {
|
||||
> .TextInput--main {
|
||||
margin-bottom: var(--spacing-1) !important;
|
||||
}
|
||||
}
|
||||
|
||||
.main {
|
||||
.input {
|
||||
@ -57,9 +62,18 @@
|
||||
min-height: 50px;
|
||||
max-height: 300px;
|
||||
overflow-y: auto;
|
||||
|
||||
.menuItem:hover {
|
||||
background: rgba(0, 146, 228, 0.0392156863) !important;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.newBtnText {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
.avatar {
|
||||
padding: var(--spacing-small) 0;
|
||||
}
|
||||
|
@ -3,12 +3,16 @@
|
||||
declare const styles: {
|
||||
readonly button: string
|
||||
readonly prefix: string
|
||||
readonly layout: string
|
||||
readonly textInputMain: string
|
||||
readonly main: string
|
||||
readonly input: string
|
||||
readonly tabContainer: string
|
||||
readonly branchesOnly: string
|
||||
readonly popover: string
|
||||
readonly listContainer: string
|
||||
readonly menuItem: string
|
||||
readonly newBtnText: string
|
||||
readonly avatar: string
|
||||
}
|
||||
export default styles
|
||||
|
@ -88,7 +88,7 @@ const PopoverContent: React.FC<ReviewerSelectProps> = ({ repoMetadata, gitRef, o
|
||||
|
||||
return (
|
||||
<Container padding="medium" className={css.main}>
|
||||
<Layout.Vertical spacing="small">
|
||||
<Layout.Vertical className={css.layout}>
|
||||
<TextInput
|
||||
className={css.input}
|
||||
inputRef={ref => (inputRef.current = ref)}
|
||||
@ -154,14 +154,15 @@ function GitRefList({
|
||||
)}
|
||||
|
||||
{!!data?.length && (
|
||||
<Container className={css.listContainer} padding={{ top: 'small', bottom: 'small' }}>
|
||||
<Container className={css.listContainer}>
|
||||
<Menu>
|
||||
{data.map(({ display_name, email, id }) => (
|
||||
<MenuItem
|
||||
key={email}
|
||||
className={css.menuItem}
|
||||
text={
|
||||
<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' }}>
|
||||
<Text>
|
||||
|
@ -51,7 +51,8 @@ export const Conversation: React.FC<ConversationProps> = ({
|
||||
})
|
||||
const showSpinner = useMemo(() => loading && !activities, [loading, activities])
|
||||
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 [dateOrderSort, setDateOrderSort] = useState<boolean | 'desc' | 'asc'>(orderSortDate.ASC)
|
||||
@ -133,7 +134,7 @@ export const Conversation: React.FC<ConversationProps> = ({
|
||||
if (prHasChanged) {
|
||||
refetchActivities()
|
||||
}
|
||||
}, [prHasChanged, refetchActivities])
|
||||
}, [prHasChanged, refetchActivities, refetchReviewers])
|
||||
|
||||
return (
|
||||
<PullRequestTabContentWrapper loading={showSpinner} error={error} onRetry={refetchActivities}>
|
||||
@ -349,14 +350,13 @@ export const Conversation: React.FC<ConversationProps> = ({
|
||||
/>
|
||||
</Layout.Vertical>
|
||||
</Container>
|
||||
{repoMetadata ? (
|
||||
<PullRequestSideBar
|
||||
reviewers={reviewers}
|
||||
repoMetadata={repoMetadata}
|
||||
pullRequestMetadata={pullRequestMetadata}
|
||||
refetchReviewers={refetchReviewers}
|
||||
/>
|
||||
) : null}
|
||||
|
||||
<PullRequestSideBar
|
||||
reviewers={reviewers}
|
||||
repoMetadata={repoMetadata}
|
||||
pullRequestMetadata={pullRequestMetadata}
|
||||
refetchReviewers={refetchReviewers}
|
||||
/>
|
||||
</Layout.Horizontal>
|
||||
</Container>
|
||||
</Layout.Vertical>
|
||||
|
Loading…
Reference in New Issue
Block a user