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

Only toggle the stages on click, not on hover #151

Merged
merged 1 commit into from
Oct 17, 2019
Merged
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
14 changes: 8 additions & 6 deletions front-end/components/Status/JobsAndStages/jobs-and-stages.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<template>
<div class="detail-jobs-and-stages" @mouseleave="clearSelectedStage">
<div class="detail-jobs-and-stages">
<div class="detail-stages" v-if="stages.length > 0">
<div
class="detail-stage"
:class="getStageClasses(stage)"
v-for="stage in stages"
:key="stage"
@mouseenter="selectStage(stage)"
@click="toggleStage(stage)"
>
{{ stage }}
</div>
Expand Down Expand Up @@ -64,10 +64,11 @@ export default {

return 'pending';
},
clearSelectedStage() {
this.selectedStage = null;
},
selectStage(stage) {
toggleStage(stage) {
if (this.selectedStage === stage) {
return (this.selectedStage = null);
}

this.selectedStage = stage;
},
},
Expand Down Expand Up @@ -162,6 +163,7 @@ export default {
margin: 5px 0
min-width: 0
flex-shrink: 1
cursor: pointer

&:first-child
margin-left: 5px
Expand Down