Skip to content

Commit ef7806f

Browse files
committed
UI fixes in reviews page
1 parent 0ff58ce commit ef7806f

File tree

4 files changed

+37
-15
lines changed

4 files changed

+37
-15
lines changed

src/apps/review/src/lib/components/Scorecard/ScorecardViewer/ScorecardQuestion/AiFeedback/AiFeedback.tsx

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ReviewsContextModel, ScorecardQuestion } from '~/apps/review/src/lib/mo
66
import { createFeedbackComment } from '~/apps/review/src/lib/services'
77
import { useReviewsContext } from '~/apps/review/src/pages/reviews/ReviewsContext'
88
import { EnvironmentConfig } from '~/config'
9+
import { Tooltip } from '~/libs/ui'
910

1011
import { ScorecardViewerContextValue, useScorecardViewerContext } from '../../ScorecardViewer.context'
1112
import { ScorecardQuestionRow } from '../ScorecardQuestionRow'
@@ -61,11 +62,21 @@ const AiFeedback: FC<AiFeedbackProps> = props => {
6162
/>
6263
)}
6364
>
64-
{isYesNo && (
65-
<p>
66-
<strong>{feedback.questionScore ? 'Yes' : 'No'}</strong>
67-
</p>
68-
)}
65+
<p>
66+
<strong>
67+
{isYesNo && (feedback.questionScore ? 'Yes' : 'No')}
68+
{!isYesNo && (
69+
<Tooltip
70+
content={`On a scale of ${props.question.scaleMin} to ${props.question.scaleMax}`}
71+
triggerOn='hover'
72+
>
73+
<span>
74+
{feedback.questionScore}
75+
</span>
76+
</Tooltip>
77+
)}
78+
</strong>
79+
</p>
6980

7081
<MarkdownReview value={feedback.content} />
7182

src/apps/review/src/lib/components/TableReview/TableReview.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,7 @@ export const TableReview: FC<TableReviewProps> = (props: TableReviewProps) => {
671671
type: 'element',
672672
})
673673
}
674+
674675
if (props.aiReviewers) {
675676
baseColumns.push({
676677
columnId: 'ai-reviews-table',

src/apps/review/src/pages/reviews/components/ReviewsSidebar/ReviewsSidebar.tsx

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import classNames from 'classnames'
55
import { ReviewsContextModel } from '~/apps/review/src/lib/models'
66
import { AiWorkflowRunStatus } from '~/apps/review/src/lib/components/AiReviewsTable'
77
import { IconAiReview, IconPhaseReview } from '~/apps/review/src/lib/assets/icons'
8-
import { IconOutline, IconSolid } from '~/libs/ui'
8+
import { IconOutline, IconSolid, Tooltip } from '~/libs/ui'
99
import StatusLabel from '~/apps/review/src/lib/components/AiReviewsTable/StatusLabel'
1010

1111
import { useReviewsContext } from '../../ReviewsContext'
@@ -37,6 +37,10 @@ const ReviewsSidebar: FC<ReviewsSidebarProps> = props => {
3737
setIsMobileOpen(false)
3838
}, [])
3939

40+
const runUrl = useCallback((workflowId: string) => (
41+
`../reviews/${submissionId}?workflowId=${workflowId}&reviewId=${reviewId}`
42+
), [reviewId, submissionId]);
43+
4044
return (
4145
<div className={classNames(props.className, styles.wrap)}>
4246
{((workflow && workflowRun) || reviewId) && (
@@ -82,14 +86,20 @@ const ReviewsSidebar: FC<ReviewsSidebarProps> = props => {
8286
}
8387
key={run.id}
8488
>
85-
<Link
86-
to={`../reviews/${submissionId}?workflowId=${run.workflow.id}&reviewId=${reviewId}`}
87-
onClick={close}
88-
/>
89-
<span className={styles.workflowNameWrap}>
90-
<IconAiReview />
91-
<span className={styles.workflowName}>{run.workflow.name}</span>
92-
</span>
89+
<Tooltip
90+
content={run.workflow.name}
91+
triggerOn='hover'
92+
disableWrap
93+
>
94+
<Link
95+
to={runUrl(run.workflow.id)}
96+
onClick={close}
97+
/>
98+
<span className={styles.workflowNameWrap}>
99+
<IconAiReview />
100+
<span className={styles.workflowName}>{run.workflow.name}</span>
101+
</span>
102+
</Tooltip>
93103
<AiWorkflowRunStatus run={run} showScore hideLabel />
94104
</li>
95105
))}

src/libs/shared/lib/components/notifications/NotificationsContainer.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
.wrap {
44
position: relative;
55
width: 100%;
6-
z-index: 18;
6+
z-index: 1;
77
}

0 commit comments

Comments
 (0)