-
Notifications
You must be signed in to change notification settings - Fork 0
🎨 Palette: Enhanced Telemetry Timeline UX #21
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,9 +14,35 @@ import { | |||||||||||
| ResponsiveContainer, | ||||||||||||
| } from 'recharts'; | ||||||||||||
|
|
||||||||||||
| const CustomTooltip = ({ active, payload, label }: any) => { | ||||||||||||
|
Comment on lines
16
to
+17
|
||||||||||||
| const CustomTooltip = ({ active, payload, label }: any) => { | |
| import type { TooltipProps } from 'recharts'; | |
| const CustomTooltip: React.FC<TooltipProps<number, string>> = ({ active, payload, label }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The empty state check uses telemetryData.length === 0 but the chart is rendered using chartData from getProbabilityData(). While these are currently equivalent, there's a logical inconsistency. The component should check the same data source that it displays. Consider using chartData.length === 0 for consistency, or checking both if there's a specific reason to check the raw data.
| if (telemetryData.length === 0) { | |
| if (chartData.length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot
AI
Feb 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The scope="row" attribute is incorrectly applied to a table data cell (td). The scope attribute is only valid on table header cells (th elements). For row headers, you should use a th element with scope="row" instead of a td element. This is important for screen readers to properly associate the row header with the data cells in the row.
| <td scope="row" style={{ padding: '10px' }}>{entry.logId}</td> | |
| <th scope="row" style={{ padding: '10px' }}>{entry.logId}</th> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,5 +56,7 @@ export function getProbabilityData() { | |
| return telemetryData.map(entry => ({ | ||
| time: new Date(entry.utc).getTime(), // For x-axis | ||
| probability: entry.prediction.p, | ||
| event: entry.event, | ||
| mode: entry.prediction.mode, | ||
|
Comment on lines
+59
to
+60
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| })); | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good practice to define a type/interface for the
CustomTooltipprops instead of usinganyfor better type safety and readability. This helps in understanding what propertiesactive,payload, andlabelare expected to have.