Skip to content
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

Ensure selected row color takes precedence #185

Merged
merged 2 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/clean-beds-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@envyjs/webui': patch
---

Ensure selected row color takes precendence
3 changes: 2 additions & 1 deletion packages/webui/src/components/ui/TraceListRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ export default function TraceListRow({ trace }: { trace: Trace }) {
key={trace.id}
onClick={() => setSelectedTrace(trace.id)}
className={tw(
'table-row h-11 hover:bg-apple-200 hover:cursor-pointer hover:text-apple-900 even:bg-manatee-200 text-manatee-800',
'table-row h-11 hover:bg-apple-200 hover:cursor-pointer hover:text-apple-900 text-manatee-800',
trace.http?.state === HttpRequestState.Sent && 'text-manatee-500',
trace.id !== selectedTraceId && 'even:bg-manatee-200',
trace.id === selectedTraceId && 'bg-manatee-400 text-manatee-950',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need 2 conditions here or can we if else this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, updated. I have a natural aversion to ternary

)}
>
Expand Down