Skip to content

Commit

Permalink
Dashboard: anchor links on team groups
Browse files Browse the repository at this point in the history
#1554

Signed-off-by: Gabriel Dumitrescu <gdumitrescu@pivotal.io>
  • Loading branch information
mhuangpivotal authored and pivotal-gabriel-dumitrescu committed Sep 11, 2017
1 parent 9f4d4f6 commit cd954b9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
6 changes: 6 additions & 0 deletions web/acceptance/spec/dashboard_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@
end
end

it 'anchors URL links on team groups' do
login
visit dash_route('/dashboard')
expect(page).to have_css('.dashboard-team-group', id: team_name)
end

private

def login
Expand Down
11 changes: 9 additions & 2 deletions web/assets/css/dashboard.less
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
.dashboard {
padding: 45px 25px 0 45px;
padding: 0 25px 0 45px;
}

.dashboard-team-group {
padding-top: 55px;

&:first-of-type {
padding-top: 45px;
}
}

.dashboard-team-pipelines {
display: flex;
flex-flow: row wrap;
justify-content: space-between;
margin-bottom: 55px;
}

.dashboard-team-name {
Expand Down
16 changes: 8 additions & 8 deletions web/bindata.go

Large diffs are not rendered by default.

7 changes: 3 additions & 4 deletions web/elm/src/Dashboard.elm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Concourse.Pipeline
import Date exposing (Date)
import Dict exposing (Dict)
import Html exposing (Html)
import Html.Attributes exposing (class, classList, href, src)
import Html.Attributes exposing (class, classList, id, href, src)
import RemoteData
import Task exposing (Task)
import Time exposing (Time)
Expand Down Expand Up @@ -162,10 +162,9 @@ type alias PipelineState =

viewGroup : Maybe Time -> String -> List PipelineState -> Html msg
viewGroup now teamName pipelines =
Html.div [ class "dashboard-team-group" ]
Html.div [ id teamName, class "dashboard-team-group" ]
[ Html.div [ class "dashboard-team-name" ]
[ Html.text teamName
]
[ Html.text teamName ]
, Html.div [ class "dashboard-team-pipelines" ]
(List.map (viewPipeline now) pipelines)
]
Expand Down

0 comments on commit cd954b9

Please sign in to comment.