Skip to content

Commit b6bd686

Browse files
committed
refactor(test-results-bar): simplify collapse button handling
Remove the onCollapseButtonClick arg from TopSection and move the collapse button out of TopSection into the main component template. This consolidates the collapse button logic and prepares for future UI refinements related to log section resizing.
1 parent 676f340 commit b6bd686

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

app/components/course-page/test-results-bar/index.hbs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
>
2525
{{#if this.isExpanded}}
2626
<CoursePage::TestResultsBar::TopSection
27-
@onCollapseButtonClick={{this.handleCollapseButtonClick}}
2827
@activeTabSlug={{this.activeTabSlug}}
2928
@onActiveTabSlugChange={{fn (mut this.activeTabSlug)}}
3029
@availableTabSlugs={{this.availableTabSlugs}}
@@ -47,9 +46,12 @@
4746
/>
4847
{{/if}}
4948

50-
<div class="absolute top-[3px] left-0 right-0 flex items-center justify-center">
51-
{{! TODO: Add this back when we have a way to resize the logs section. }}
52-
{{! <div class="w-20 h-1 rounded-full bg-gray-700 cursor-ns-resize hover:bg-gray-600"></div> }}
49+
<div
50+
class="absolute top-0 right-0 flex px-6 py-5 items-center justify-center text-gray-500 hover:text-gray-400"
51+
{{on "click" this.handleCollapseButtonClick}}
52+
role="button"
53+
>
54+
{{svg-jar "x" class="w-5 h-5 fill-current"}}
5355
</div>
5456
{{/if}}
5557
</div>

app/components/course-page/test-results-bar/top-section.hbs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,4 @@
1010
/>
1111
{{/each}}
1212
</ul>
13-
<div class="flex items-center justify-center text-gray-500 hover:text-gray-400" {{on "click" @onCollapseButtonClick}} role="button">
14-
{{svg-jar "x" class="w-5 h-5 fill-current"}}
15-
</div>
1613
</div>

app/components/course-page/test-results-bar/top-section.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ interface Signature {
77
Args: {
88
activeTabSlug: string;
99
availableTabSlugs: string[];
10-
onCollapseButtonClick: () => void;
1110
onActiveTabSlugChange: (slug: string) => void;
1211
};
1312
}

0 commit comments

Comments
 (0)