Skip to content

Commit

Permalink
Match styling from other page titles and get above z-index of the tim…
Browse files Browse the repository at this point in the history
…eline (#24068)
  • Loading branch information
philrenaud authored Sep 26, 2024
1 parent 6fb59ca commit c07806e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 30 deletions.
9 changes: 9 additions & 0 deletions ui/app/styles/components/timeline.scss
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,12 @@
}
}
}

.versions-page-header {
z-index: $z-base + 1;
margin-bottom: 2rem;

.hds-page-header__main {
flex-direction: unset;
}
}
58 changes: 28 additions & 30 deletions ui/app/templates/jobs/job/versions.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,38 @@
<JobSubnav @job={{this.job}} />
<section class="section">

<Hds::PageHeader as |PH|>
<Hds::PageHeader class="versions-page-header" as |PH|>
<PH.Actions>
<Hds::SegmentedGroup as |S|>
<S.Dropdown data-test-diff-facet as |dd|>
<dd.ToggleButton
@text={{if this.diffVersion (concat "Diff against version " this.diffVersion) "Diff against previous version" }}
@color="secondary"
/>
<Hds::Dropdown data-test-diff-facet as |dd|>
<dd.ToggleButton
@text={{if this.diffVersion (concat "Diff against version " this.diffVersion) "Diff against previous version" }}
@color="secondary"
/>
<dd.Radio
name="diff"
checked={{eq this.diffVersion ""}}
{{on "change" (action this.setDiffVersion "")}}
>
previous version
</dd.Radio>
{{#each this.optionsDiff key="label" as |option|}}
<dd.Radio
name="diff"
checked={{eq this.diffVersion ""}}
{{on "change" (action this.setDiffVersion "")}}
>
previous version
{{on "change" (action this.setDiffVersion
option.value
)}}
@value={{option.label}}
checked={{eq this.diffVersion option.value}}
data-test-dropdown-option={{option.label}}
>
{{option.label}}
</dd.Radio>
{{#each this.optionsDiff key="label" as |option|}}
<dd.Radio
name="diff"
{{on "change" (action this.setDiffVersion
option.value
)}}
@value={{option.label}}
checked={{eq this.diffVersion option.value}}
data-test-dropdown-option={{option.label}}
>
{{option.label}}
</dd.Radio>
{{else}}
<dd.Generic data-test-dropdown-empty>
No versions
</dd.Generic>
{{/each}}
</S.Dropdown>
</Hds::SegmentedGroup>
{{else}}
<dd.Generic data-test-dropdown-empty>
No versions
</dd.Generic>
{{/each}}
</Hds::Dropdown>
</PH.Actions>
</Hds::PageHeader>

Expand Down

0 comments on commit c07806e

Please sign in to comment.