Conversation
… bottom Signed-off-by: James Cocker <james.s.earth@gmail.com>
Signed-off-by: James Cocker <james.s.earth@gmail.com>
Signed-off-by: James Cocker <james.s.earth@gmail.com>
Signed-off-by: James Cocker <james.s.earth@gmail.com>
| export const fetchRunLog = async (runId: string) => { | ||
| let runLog; | ||
| try { | ||
| runLog = await fetchRunDetailLogs(runId); | ||
| } catch (error: any) { | ||
| runLog = 'Error fetching run log: ' + error; | ||
| } | ||
| return runLog; | ||
| }; |
There was a problem hiding this comment.
Instead of modifying the run log's content on error, would it be better to keep the old content the same and display a Carbon error notification that tells the user that there was an error fetching the run log? https://carbondesignsystem.com/components/notification/usage/
| top: 0, | ||
| behavior: 'smooth', |
There was a problem hiding this comment.
Regarding accessibility: if someone wants reduced motion, using smooth would cause the scroll to slowly move to the top/bottom rather than instantly jumping to the top/bottom - see https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/prefers-reduced-motion
Can we make the scroll behaviour more reactive based on the above?
| // Reset search and filters | ||
| setSearchTerm(''); | ||
| setDebouncedSearchTerm(''); | ||
| setCurrentMatchIndex(-1); | ||
| setTotalMatches(0); | ||
| setSearchCache(new Map()); |
There was a problem hiding this comment.
If I'm expecting a debug message to appear and I've searched for it in the search bar, then refreshing the run log will clear the searched term. I think it would be good to keep the search bar content and filters the same.
Why?
Closes galasa-dev/projectmanagement#2481 with a shortened runLog container, added buttons to refresh and jump to top/ bottom.