Skip to content
Closed
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
47 changes: 31 additions & 16 deletions app/components/version-list/row.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -94,21 +94,15 @@
{{/if}}

{{#if @version.featureList}}
<span local-class="num-features" data-test-feature-list>
{{svg-jar "checkbox"}}
{{@version.featureList.length}} {{if (eq @version.featureList.length 1) "Feature" "Features"}}

<Tooltip local-class="tooltip">
<ul local-class="feature-list">
{{#each @version.featureList as |feature|}}
<li>
{{svg-jar (if feature.isDefault "checkbox" "checkbox-empty")}}
{{feature.name}}
</li>
{{/each}}
</ul>
</Tooltip>
</span>
<button
type="button"
local-class="features-button"
{{on "click" this.toggleDropdown}}
>
<span local-class="num-features" data-test-feature-list>
{{svg-jar "checkbox"}}
{{@version.featureList.length}} {{if (eq @version.featureList.length 1) "Feature" "Features"}}</span>
</button>
{{/if}}
</div>
{{/if}}
Expand All @@ -117,4 +111,25 @@
<PrivilegedAction @userAuthorised={{this.isOwner}}>
<YankButton @version={{@version}} local-class="yank-button" />
</PrivilegedAction>
</div>
</div>

{{#if this.featuresOpen}}
<div
local-class="
row
features-panel
{{if @version.isHighestOfReleaseTrack "latest"}}
{{if @version.yanked "yanked"}}
{{if @version.isPrerelease "prerelease"}}
{{if this.focused "focused"}}
">
<ul local-class="feature-list">
{{#each @version.featureList as |feature|}}
<li>
{{svg-jar (if feature.isDefault "checkbox" "checkbox-empty")}}
{{feature.name}}
</li>
{{/each}}
</ul>
</div>
{{/if}}
5 changes: 5 additions & 0 deletions app/components/version-list/row.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default class VersionRow extends Component {
@service session;

@tracked focused = false;
@tracked featuresOpen = false;

get releaseTrackTitle() {
let { version } = this.args;
Expand Down Expand Up @@ -55,4 +56,8 @@ export default class VersionRow extends Component {
@action setFocused(value) {
this.focused = value;
}

@action toggleDropdown() {
this.featuresOpen = !this.featuresOpen;
}
}
33 changes: 33 additions & 0 deletions app/components/version-list/row.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,43 @@
text-transform: none;
}

.features-button {
text-align: center;
padding-top: var(--space-4xs);
position: relative;
cursor: help;
svg {
height: 1em;
width: auto;
margin-right: var(--space-4xs);
margin-bottom: -.2em;
}
}

.features-panel {
margin-top: var(--space-2xs);
letter-spacing: .7px;
font-size: 13px;
svg {
height: 1em;
width: auto;
margin-right: var(--space-4xs);
margin-bottom: -.1em;
}
}

.feature-list {
padding: 0;
margin: var(--space-2xs) var(--space-3xs);
list-style: none;
user-select: text;

li {
padding: var(--space-4xs);
}
li svg {
vertical-align: middle;
}
}

.yank-button {
Expand Down
Loading