-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[OPIK-2477] [FE] Add expand/collapse feedback score reasons toggle button #4127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[OPIK-2477] [FE] Add expand/collapse feedback score reasons toggle button #4127
Conversation
… and experiment tables
f04509f to
85e33d8
Compare
- Add single 'Reasons' toggle button in toolbar instead of individual column settings - Reason columns now controlled by global showReasons state (persisted in localStorage) - Toggle button appears between row height selector and columns button - Button highlights when active (default variant) and shows outline when inactive - Applies to Experiments, Traces, and Threads tables consistently
- Move toggle button from toolbar to Columns menu under Feedback scores section - Button appears to the right of 'Feedback scores' title - Button text: 'Expand reasons' / 'Collapse reasons' with MessageSquareText icon - For Traces/Threads: Auto-switch row height from Small to Medium when expanding - Updated ColumnsButton to support optional action prop in sections - Applies to Experiments, Traces, and Threads tables consistently
… and fix vertical alignment
8c1b4f8 to
252982f
Compare
3c2da70 to
16ea198
Compare
…seExperimentsTableConfig
…seExperimentsTableConfig
5fa9dab to
b753f17
Compare
337e02c to
0b38cb7
Compare
|
✅ Test environment is now available! Access Information
The deployment has completed successfully and the version has been verified. |
…score reasons display
6d10939 to
8df202e
Compare
192c822 to
a452951
Compare
|
✅ Test environment is now available! Access Information
The deployment has completed successfully and the version has been verified. |
|
✅ Test environment is now available! Access Information
The deployment has completed successfully and the version has been verified. |
|
✅ Test environment is now available! Access Information
The deployment has completed successfully and the version has been verified. |
|
✅ Test environment is now available! Access Information
The deployment has completed successfully and the version has been verified. |
…apply flex-wrap and overflow styles based on inline reasons visibility
|
✅ Test environment is now available! Access Information
The deployment has completed successfully and the version has been verified. |
Details
Screen.Recording.2025-11-26.at.16.50.49.mov
Screen.Recording.2025-11-26.at.16.49.55.mov
Added an "Expand reasons" toggle in the Columns menu to display feedback score reasons inline within the same cell when row size is Medium or Large.
Problem: Currently, the "score reason" field is only visible via hover tooltips, limiting readability and making it difficult to compare reasoning across multiple rows.
Solution: Introduced an "Expand reasons" / "Collapse reasons" toggle button in the Columns menu (next to "Feedback scores" section) that displays reasons inline within feedback score cells. This provides a clean, contextual UX without adding extra columns or cluttering the UI.
Implementation Approach
Contextual Toggle in Columns Menu ✨
Technical Details
Created Components:
FeedbackScoreReasonToggle- Reusable toggle button component with visibility logicUpdated Components:
FeedbackScoreCell- Displays reasons inline whenshowReasonsis true and row height is Medium/LargeCompareExperimentsFeedbackScoreCell- Same inline reason display for experiment comparisonsuseExperimentsTableConfig- Manages toggle state and passes it to column sectionsColumnsButton- Enhanced to support action elements in column sectionsUpdated Table Pages:
ExperimentsPage- Added showReasons state and toggle integrationTracesSpansTab- Added toggle with automatic row height adjustmentThreadsTab- Added toggle with automatic row height adjustmentTraceQueueItemsTab- Added toggle with automatic row height adjustmentThreadQueueItemsTab- Added toggle with automatic row height adjustmentPromptPage/ExperimentsTab- Integrated with hook's column sectionsFeatures:
line-clamp-3(max 3 lines with ellipsis)overflow-hiddenprevents content from spilling into cells belowbreak-wordsensures proper text wrapping within cell boundariesChange checklist
Issues
Testing
Manual testing steps:
Changes:
FeedbackScoreReasonTogglereusable component with visibility logicFeedbackScoreCellandCompareExperimentsFeedbackScoreCellfor inline reason displayColumnsButtonto support action elements in column sectionsDocumentation
No documentation changes required - UI is self-explanatory with the contextual toggle in Columns menu.