Skip to content

Commit 188a965

Browse files
authored
[HUD] Reduce number of clicks for expanding grouping (#6069)
Reduce the number of clicks needed to expand/collapse a group by removing the part of the code that ensures that the first click only removes the highlighted component for job names/headers. This only changes the flow for clicking the headers, clicking jobs or commits still has the same behavior Example: Click on group -> group gets highlighted, and group expands Current behavior: Click on group again -> group gets unhighlighted Click on group again -> group gets collapsed This PR: Click on group again -> group gets highlighted, and group collapses This also means if something is highlighted, ex you have a job tooltip open, clicking on a group will highlight and expand that group immediately, while previously it would unhighlight and you would have to click again to expand Example: Click on job -> job gets highlighted Current behavior: Click on group -> job gets unhighlighted Click on group again -> group gets expanded This PR: Click on group -> job gets unhighlighted + group gets expanded Please click around on the HUD main page to see if you like this flow
1 parent 853a7f2 commit 188a965

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

torchci/components/GroupHudTableHeaders.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,6 @@ export function GroupHudTableHeader({ names }: { names: string[] }) {
6868
key={name}
6969
style={{ ...jobStyle }}
7070
onClick={(e: React.MouseEvent) => {
71-
if (pinnedId.name !== undefined || pinnedId.sha !== undefined) {
72-
return;
73-
}
7471
if (expandedGroups.has(name)) {
7572
expandedGroups.delete(name);
7673
setExpandedGroups(new Set(expandedGroups));

0 commit comments

Comments
 (0)