Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ui] Versions page diff dropdown: z-index so you can click on labels #24068

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading