Repository navigation
feat(citations): show full prompt text on hover in the prompt filter dropdown - #324
Merged
Merged
Conversation
…dropdown Keep the untruncated prompt on each combobox item (fullText) and pass it as title to ComboboxItem for a native hover tooltip. Drop the manual slice(0, 80) — the combobox already truncates visually via CSS, so the slice only discarded the full text. No new dependency.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On the Citations page, the Prompt filter dropdown truncated long prompts with no way to read the full text. The combobox items only kept a pre-sliced
label, so the original prompt text was discarded before render.Change (
web/src/app/[locale]/(dashboard)/dashboard/citations/page.tsx):fullText: p.text.slice(0, 80)—ComboboxItemalready truncates visually via the CSStruncateclass, so the slice only threw the full text away.title={item.fullText}toComboboxItem, which spreads{...props}onto the underlying element → native browser tooltip on hover (also read by screen readers). No new dependency or tooltip component.web/src/components/ui/combobox.tsxneeded no change —titlealready reaches the DOM node via{...props}.Related issue
Closes #298
Type of change
feat— New featureHow to test
/dashboard/citationsfor a brand with a long prompt (>80 chars).Checklist
feature/,fix/,chore/,docs/) — see CONTRIBUTING.mdyarn lintpasses (run fromweb/)yarn typecheckpasses (run fromweb/)yarn format:checkpasses (run fromweb/)