feat: add activity warning indicators and toast notifications - #1338
feat: add activity warning indicators and toast notifications#1338thaorell wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
christian-heusel
left a comment
There was a problem hiding this comment.
@thaorell I think you need to drop the conventional commit scope from the title to make the action happy 😅
-feat(frontend): add activity warning indicators and toast notifications
+feat: add activity warning indicators and toast notificationsc0afa79 to
2af876b
Compare
christian-heusel
left a comment
There was a problem hiding this comment.
This already looks quite good, I gave it a quick review 😊
…ns (kubeflow#1203) Add warning/critical visual indicators on workspace table rows when a workspace approaches its auto-pause threshold, plus toast notifications on state transitions. Warnings clear automatically when the next data refresh shows updated activity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Charles Thao <cthao@redhat.com>
2af876b to
6c7308e
Compare
| const LastActivityCell: React.FC<{ activity: WorkspacesActivity }> = ({ activity }) => { | ||
| const ACTIVITY_WARNING_ICONS: Record<ActivityWarningLevel, React.ReactNode> = { | ||
| [ActivityWarningLevel.Warning]: ( | ||
| <ExclamationTriangleIcon color="orange" data-testid="activity-warning-indicator" /> |
There was a problem hiding this comment.
This icon is rendered without aria-label attributes. While it is inside a Tooltip (which provides visual context on hover), screen readers won't convey the warning state. Consider adding aria-label="Activity warning", consistent with how RedirectIconWithPopover.tsx adds aria-label="Redirect information" to its icon.
There was a problem hiding this comment.
The icon colors are hardcoded as color="orange" and color="red". PatternFly v6 provides semantic status tokens (var(--pf-t--global--icon--color--status--warning--default) and var(--pf-t--global--icon--color--status--danger--default)) that respect theming and dark mode. Note: the existing RedirectIconWithPopover.tsx uses the same color="orange" pattern, so this is consistent with the current codebase — but if the project moves toward theme-aware colors, this would be the place to start.
| <ExclamationTriangleIcon color="orange" data-testid="activity-warning-indicator" /> | ||
| ), | ||
| [ActivityWarningLevel.Critical]: ( | ||
| <ExclamationCircleIcon color="red" data-testid="activity-critical-indicator" /> |
There was a problem hiding this comment.
This icon is rendered without aria-label attributes. While it is inside a Tooltip (which provides visual context on hover), screen readers won't convey the warning state. Consider adding aria-label="Activity critical", consistent with how RedirectIconWithPopover.tsx adds aria-label="Redirect information" to its icon.
There was a problem hiding this comment.
The icon colors are hardcoded as color="orange" and color="red". PatternFly v6 provides semantic status tokens (var(--pf-t--global--icon--color--status--warning--default) and var(--pf-t--global--icon--color--status--danger--default)) that respect theming and dark mode. Note: the existing RedirectIconWithPopover.tsx uses the same color="orange" pattern, so this is consistent with the current codebase — but if the project moves toward theme-aware colors, this would be the place to start.
Add warning/critical visual indicators on workspace table rows when a workspace approaches its auto-pause threshold, plus toast notifications on state transitions. Warnings clear automatically when the next data refresh shows updated activity.
closes: #1203

