Skip to content

Commit ca06691

Browse files
committed
refactor(test-results-bar): wrap sections in flex container
Wrap TopSection and conditionally rendered LogsSection or AutofixSection inside a flex column container with consistent padding and border styles. This change ensures proper layout and styling, removing redundant borders and improving scroll behavior within the test results bar component.
1 parent d3c36a4 commit ca06691

File tree

1 file changed

+23
-21
lines changed
  • app/components/course-page/test-results-bar

1 file changed

+23
-21
lines changed

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

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -23,28 +23,30 @@
2323
data-test-contents
2424
>
2525
{{#if this.isExpanded}}
26-
<CoursePage::TestResultsBar::TopSection
27-
@activeTabSlug={{this.activeTabSlug}}
28-
@onActiveTabSlugChange={{fn (mut this.activeTabSlug)}}
29-
@availableTabSlugs={{this.availableTabSlugs}}
30-
class="mt-3 mb-3 px-6"
31-
/>
32-
33-
{{#if (eq this.activeTabSlug "logs")}}
34-
<CoursePage::TestResultsBar::LogsSection
35-
@activeStep={{@activeStep}}
36-
@currentStep={{@currentStep}}
37-
@repository={{@repository}}
38-
class="grow border-b border-gray-800 overflow-y-auto px-6"
39-
/>
40-
{{else if (eq this.activeTabSlug "autofix")}}
41-
<CoursePage::TestResultsBar::AutofixSection
42-
@activeStep={{@activeStep}}
43-
@currentStep={{@currentStep}}
44-
@repository={{@repository}}
45-
class="grow border-b border-gray-800 overflow-y-auto px-6"
26+
<div class="flex flex-col grow border-b border-gray-800 px-6">
27+
<CoursePage::TestResultsBar::TopSection
28+
@activeTabSlug={{this.activeTabSlug}}
29+
@onActiveTabSlugChange={{fn (mut this.activeTabSlug)}}
30+
@availableTabSlugs={{this.availableTabSlugs}}
31+
class="mt-3 mb-3"
4632
/>
47-
{{/if}}
33+
34+
{{#if (eq this.activeTabSlug "logs")}}
35+
<CoursePage::TestResultsBar::LogsSection
36+
@activeStep={{@activeStep}}
37+
@currentStep={{@currentStep}}
38+
@repository={{@repository}}
39+
class="grow overflow-y-auto"
40+
/>
41+
{{else if (eq this.activeTabSlug "autofix")}}
42+
<CoursePage::TestResultsBar::AutofixSection
43+
@activeStep={{@activeStep}}
44+
@currentStep={{@currentStep}}
45+
@repository={{@repository}}
46+
class="grow overflow-y-auto"
47+
/>
48+
{{/if}}
49+
</div>
4850

4951
<div
5052
class="absolute top-0 right-0 flex px-6 py-5 items-center justify-center text-gray-500 hover:text-gray-400"

0 commit comments

Comments
 (0)