Merge pull request #562 from taigaio/us/1934/minimize_backlog_chart
Make burndown chart collapsible at the backlog panelstable
commit
0376fecf02
|
@ -6,6 +6,7 @@
|
||||||
### Features
|
### Features
|
||||||
- Ability to create single-line or multi-line custom fields. (thanks to [@artlepool](https://github.com/artlepool))
|
- Ability to create single-line or multi-line custom fields. (thanks to [@artlepool](https://github.com/artlepool))
|
||||||
- Add custom videoconference system.
|
- Add custom videoconference system.
|
||||||
|
- Make burndown chart collapsible at the backlog panel.
|
||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
- Improve performance: Show cropped images in timelines.
|
- Improve performance: Show cropped images in timelines.
|
||||||
|
|
|
@ -28,6 +28,7 @@ bindOnce = @.taiga.bindOnce
|
||||||
groupBy = @.taiga.groupBy
|
groupBy = @.taiga.groupBy
|
||||||
timeout = @.taiga.timeout
|
timeout = @.taiga.timeout
|
||||||
bindMethods = @.taiga.bindMethods
|
bindMethods = @.taiga.bindMethods
|
||||||
|
generateHash = @.taiga.generateHash
|
||||||
|
|
||||||
module = angular.module("taigaBacklog")
|
module = angular.module("taigaBacklog")
|
||||||
|
|
||||||
|
@ -644,7 +645,7 @@ BacklogDirective = ($repo, $rootscope, $translate) ->
|
||||||
|
|
||||||
_.map elements, (elm) ->
|
_.map elements, (elm) ->
|
||||||
input = $(elm).find("input:checkbox")
|
input = $(elm).find("input:checkbox")
|
||||||
input.prop('checked', true);
|
input.prop('checked', true)
|
||||||
checkSelected(input)
|
checkSelected(input)
|
||||||
|
|
||||||
target = angular.element(event.currentTarget)
|
target = angular.element(event.currentTarget)
|
||||||
|
@ -724,7 +725,6 @@ BacklogDirective = ($repo, $rootscope, $translate) ->
|
||||||
$el.find(".backlog-table-body").disableSelection()
|
$el.find(".backlog-table-body").disableSelection()
|
||||||
|
|
||||||
filters = $ctrl.getUrlFilters()
|
filters = $ctrl.getUrlFilters()
|
||||||
|
|
||||||
if filters.statuses ||
|
if filters.statuses ||
|
||||||
filters.tags ||
|
filters.tags ||
|
||||||
filters.q
|
filters.q
|
||||||
|
@ -903,6 +903,39 @@ UsPointsDirective = ($tgEstimationsService, $repo, $tgTemplate) ->
|
||||||
module.directive("tgBacklogUsPoints", ["$tgEstimationsService", "$tgRepo", "$tgTemplate", UsPointsDirective])
|
module.directive("tgBacklogUsPoints", ["$tgEstimationsService", "$tgRepo", "$tgTemplate", UsPointsDirective])
|
||||||
|
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
## Burndown graph directive
|
||||||
|
#############################################################################
|
||||||
|
ToggleBurndownVisibility = ($storage) ->
|
||||||
|
link = ($scope, $el, $attrs) ->
|
||||||
|
hash = generateHash(["is-burndown-grpahs-collapsed"])
|
||||||
|
toggleGraph = ->
|
||||||
|
if $scope.isBurndownGraphCollapsed
|
||||||
|
$(".js-toggle-burndown-visibility-button").removeClass("active")
|
||||||
|
$(".js-burndown-graph").removeClass("open")
|
||||||
|
else
|
||||||
|
$(".js-toggle-burndown-visibility-button").addClass("active")
|
||||||
|
$(".js-burndown-graph").addClass("open")
|
||||||
|
|
||||||
|
$scope.isBurndownGraphCollapsed = $storage.get(hash) or false
|
||||||
|
toggleGraph()
|
||||||
|
|
||||||
|
$el.on "click", ".js-toggle-burndown-visibility-button", ->
|
||||||
|
$scope.isBurndownGraphCollapsed = !$scope.isBurndownGraphCollapsed
|
||||||
|
$storage.set(hash, $scope.isBurndownGraphCollapsed)
|
||||||
|
toggleGraph()
|
||||||
|
|
||||||
|
$scope.$on "$destroy", ->
|
||||||
|
$el.off()
|
||||||
|
|
||||||
|
return {
|
||||||
|
scope: {}
|
||||||
|
link: link
|
||||||
|
}
|
||||||
|
|
||||||
|
module.directive("tgToggleBurndownVisibility", ["$tgStorage", ToggleBurndownVisibility])
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## Burndown graph directive
|
## Burndown graph directive
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
|
|
@ -919,7 +919,8 @@
|
||||||
"OPEN_TASKS": "open<br />tasks",
|
"OPEN_TASKS": "open<br />tasks",
|
||||||
"CLOSED_TASKS": "closed<br />tasks",
|
"CLOSED_TASKS": "closed<br />tasks",
|
||||||
"IOCAINE_DOSES": "iocaine<br />doses",
|
"IOCAINE_DOSES": "iocaine<br />doses",
|
||||||
"SHOW_STATISTICS_TITLE": "Show statistics"
|
"SHOW_STATISTICS_TITLE": "Show statistics",
|
||||||
|
"TOGGLE_BAKLOG_GRAPH": "Show/Hide burndown graph"
|
||||||
},
|
},
|
||||||
"SUMMARY": {
|
"SUMMARY": {
|
||||||
"PROJECT_POINTS": "project<br />points",
|
"PROJECT_POINTS": "project<br />points",
|
||||||
|
|
|
@ -7,9 +7,11 @@ div.wrapper(tg-backlog, ng-controller="BacklogController as ctrl",
|
||||||
include ../includes/modules/backlog-filters
|
include ../includes/modules/backlog-filters
|
||||||
section.main.backlog
|
section.main.backlog
|
||||||
include ../includes/components/mainTitle
|
include ../includes/components/mainTitle
|
||||||
|
|
||||||
|
div.backlog-summary(tg-toggle-burndown-visibility)
|
||||||
include ../includes/components/summary
|
include ../includes/components/summary
|
||||||
|
|
||||||
div.graphics-container.burndown-container
|
div.graphics-container.burndown-container.js-burndown-graph
|
||||||
div.burndown(tg-burndown-backlog-graph)
|
div.burndown(tg-burndown-backlog-graph)
|
||||||
include ../includes/modules/burndown
|
include ../includes/modules/burndown
|
||||||
|
|
||||||
|
|
|
@ -25,4 +25,5 @@ div.summary.large-summary
|
||||||
span.number(ng-bind="stats.iocaine_doses|default:'--'")
|
span.number(ng-bind="stats.iocaine_doses|default:'--'")
|
||||||
span.description(translate="BACKLOG.SPRINT_SUMMARY.IOCAINE_DOSES")
|
span.description(translate="BACKLOG.SPRINT_SUMMARY.IOCAINE_DOSES")
|
||||||
|
|
||||||
a.icon.icon-stats.toggle-analytics-visibility(href="", title="{{'BACKLOG.SPRINT_SUMMARY.SHOW_STATISTICS_TITLE' | translate}}")
|
div.stats.toggle-analytics-visibility(title="{{'BACKLOG.SPRINT_SUMMARY.SHOW_STATISTICS_TITLE' | translate}}")
|
||||||
|
include ../../../svg/graph.svg
|
||||||
|
|
|
@ -16,3 +16,7 @@ div.summary
|
||||||
div.summary-stats
|
div.summary-stats
|
||||||
span.number(ng-bind="stats.speed | number:0") --
|
span.number(ng-bind="stats.speed | number:0") --
|
||||||
span.description(translate="BACKLOG.SUMMARY.POINTS_PER_SPRINT")
|
span.description(translate="BACKLOG.SUMMARY.POINTS_PER_SPRINT")
|
||||||
|
|
||||||
|
|
||||||
|
div.stats.js-toggle-burndown-visibility-button(title="{{'BACKLOG.SPRINT_SUMMARY.TOGGLE_BAKLOG_GRAPH' | translate}}")
|
||||||
|
include ../../../svg/graph.svg
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
$summary-background: $grayer;
|
||||||
|
|
||||||
.summary {
|
.summary {
|
||||||
align-content: center;
|
align-content: center;
|
||||||
background: $grayer;
|
background: $summary-background;
|
||||||
color: $white;
|
color: $white;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
@ -16,9 +18,6 @@
|
||||||
color: $fresh-taiga;
|
color: $fresh-taiga;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.icon {
|
|
||||||
@extend %large;
|
|
||||||
}
|
|
||||||
.number {
|
.number {
|
||||||
@extend %xlarge;
|
@extend %xlarge;
|
||||||
@extend %bold;
|
@extend %bold;
|
||||||
|
@ -31,6 +30,47 @@
|
||||||
@extend %light;
|
@extend %light;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
|
.stats {
|
||||||
|
cursor: pointer;
|
||||||
|
height: 2rem;
|
||||||
|
margin-left: auto;
|
||||||
|
width: 2rem;
|
||||||
|
path {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
&:hover {
|
||||||
|
.graph,
|
||||||
|
.color-line {
|
||||||
|
fill: $fresh-taiga;
|
||||||
|
transition: fill .2s;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.active {
|
||||||
|
.white-line,
|
||||||
|
.color-line {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.graph {
|
||||||
|
fill: $green-taiga;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
svg {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
.graph,
|
||||||
|
.color-line {
|
||||||
|
fill: darken($gray-light, 20%);
|
||||||
|
transition: fill .2s;
|
||||||
|
}
|
||||||
|
.white-line {
|
||||||
|
fill: $summary-background;
|
||||||
|
}
|
||||||
|
.white-line,
|
||||||
|
.color-line {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.summary-progress-bar {
|
.summary-progress-bar {
|
||||||
|
@ -92,7 +132,7 @@
|
||||||
font-size: 1.4rem;
|
font-size: 1.4rem;
|
||||||
margin-right: .4rem;
|
margin-right: .4rem;
|
||||||
&.icon-stats {
|
&.icon-stats {
|
||||||
color: $gray;
|
color: $green-taiga;
|
||||||
float: right;
|
float: right;
|
||||||
transition: color .3s linear;
|
transition: color .3s linear;
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -103,9 +143,13 @@
|
||||||
color: $fresh-taiga;
|
color: $fresh-taiga;
|
||||||
}
|
}
|
||||||
&.active:hover {
|
&.active:hover {
|
||||||
color: $gray;
|
color: $green-taiga;
|
||||||
transition: color .3s linear;
|
transition: color .3s linear;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.graphics-container {
|
||||||
|
@include slide(300px, hidden, 0);
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 287.81297 236.94013">
|
||||||
|
<g transform="translate(-2.9e2 -5.7e2)">
|
||||||
|
<path class="graph" d="m4.7e2 5.7e2c-4.4 0-7.9 3.3-7.9 7.3v2e2c0 4.1 3.5 7.3 7.9 7.3h45c4.4 0 7.9-3.3 7.9-7.3v-2e2c0-4.1-3.5-7.3-7.9-7.3h-45zm-72 70c-4.4 0-7.9 3.3-7.9 7.3v1.3e2c0 4.1 3.5 7.3 7.9 7.3h45c4.4 0 7.9-3.3 7.9-7.3v-1.3e2c0-4.1-3.5-7.3-7.9-7.3h-45zm-72 62c-4.4 0-7.9 3.3-7.9 7.3v67c0 4.1 3.5 7.3 7.9 7.3h45c4.4 0 7.9-3.3 7.9-7.3v-67c0-4.1-3.5-7.3-7.9-7.3h-45z" />
|
||||||
|
<rect class="white-line" transform="rotate(-30)" rx="0" ry="0" height="28" width="3.1e2" y="8e2" x="-1.3e2"/>
|
||||||
|
<rect class="color-line" ry="0" rx="0" transform="rotate(-30)" height="28" width="3.1e2" y="8.3e2" x="-1.3e2"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 943 B |
Loading…
Reference in New Issue