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

fix: Clean up the new v2 layout #1076

Merged
merged 2 commits into from
Jul 2, 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
1 change: 0 additions & 1 deletion app/v2/pipeline/events/index/template.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{page-title "Index"}}
<div>v2 event index route</div>
{{outlet}}
1 change: 0 additions & 1 deletion app/v2/pipeline/events/show/template.hbs
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
{{page-title "Show"}}
<div>v2 event show route</div>
{{outlet}}
132 changes: 132 additions & 0 deletions app/v2/pipeline/events/styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
@use 'screwdriver-colors' as colors;

@mixin styles {
display: grid;

grid-template-areas:
'pipeline-tab pipeline-tab'
'pipeline-events pipeline-event-main-content';

grid-template-rows: 3.75rem;
grid-template-columns: 26rem;

.pipeline-tab {
grid-area: pipeline-tab;

display: grid;
padding-top: 8px;
padding-bottom: 1px;

ul.nav-tabs.nav {
border: none;

li {
border-bottom: 0.2rem solid colors.$sd-white;
padding-left: 1rem;
padding-right: 1rem;
text-align: center;

&.active {
border-bottom-color: #1c64f2;
}

a {
&.active {
color: #1c64f2;
}

color: #6b7280;
border: none;
padding: 8px 16px 9px 16px;
}
}
}
}

.pipeline-events {
grid-area: pipeline-events;

border: 1px solid #cbd5e1;
background-color: white;

// scroll
display: flex;
flex-direction: column;
overflow: hidden;

.search-filter-bar {
display: flex;
padding: 12px 24px;
justify-content: space-between;

.search-filter {
display: flex;
align-items: center;
gap: 12px;

.search {
}
.filter {
}
}

.new-event {
cursor: pointer;
}

.img {
width: 18px;
height: 18px;
}
}

.event-cards {
overflow-y: scroll;

.event-card {
border-top: 1px solid #cbd5e1;
}
.event-card:first-child {
border-top: none;
}

.event-card-group {
// padding-bottom: 10px;
// margin: 0.5rem 0.25rem;
margin-top: 0.75rem;
margin-bottom: 0.75rem;

// border: 1px solid #cbd5e1;
border-top: 1px solid #cbd5e1;
border-bottom: 1px solid #cbd5e1;
// border-radius: 0.25rem;

position: relative;

.event-card-group-toggle {
position: absolute;

display: flex;
width: 100%;
flex-wrap: wrap;
justify-content: flex-end;

cursor: pointer;

.badge {
color: #007bff;
}
}

div.event-card:nth-child(1),
div.event-card:nth-child(2) {
border-top: none;
}
}
}
}

.pipeline-workflow-graph {
grid-area: pipeline-event-main-content;
}
}
31 changes: 21 additions & 10 deletions app/v2/pipeline/events/template.hbs
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
{{page-title "Events"}}

<div class="pipeline-content">
<div class="pipeline-tab">
<BsNav @type="tabs" as |nav|>
<nav.item>
<nav.link-to @route="v2.pipeline.events">Events</nav.link-to>
</nav.item>
<nav.item>
<nav.link-to @route="v2.pipeline.pulls">Pull Requests</nav.link-to>
</nav.item>
<nav.item>
<nav.link-to @route="v2.pipeline.jobs">Jobs</nav.link-to>
</nav.item>
</BsNav>
</div>

<div class="pipeline-events">
<div class="search-filter-bar">

<span class="search-filter">
Expand All @@ -22,7 +36,7 @@
{{#if this.isGroupedEvents}}
{{#each this.groupedEvents as |eventGroup| }}
<Newui::EventCardGroup
@selectedEventId={{this.selectedEventId}}
@selectedEventId={{this.selectedEventId}}
@pipelineId={{this.pipelineId}}
@lastSuccessful={{this.lastSuccessful}}
@latestCommit={{this.latestCommit}}
Expand All @@ -31,20 +45,17 @@
{{/each}}
{{else}}
{{#each this.events as |event|}}
<Newui::EventCard @event={{event}}
@selectedEventId={{this.selectedEventId}}
<Newui::EventCard @event={{event}}
@selectedEventId={{this.selectedEventId}}
@pipelineId={{this.pipelineId}}
@lastSuccessful={{this.lastSuccessful}}
@latestCommit={{this.latestCommit}}
/>
{{/each}}
{{/if}}
</div>
{{outlet}}
</div>

<div class="pipeline-workflowgraph">
<div class="workflowgraph-chart">
WorkflowGraph placeholder for event {{this.selectedEventId}}
</div>
</div>
<div class="pipeline-workflow-graph" />

{{outlet}}
150 changes: 14 additions & 136 deletions app/v2/pipeline/styles.scss
Original file line number Diff line number Diff line change
@@ -1,150 +1,28 @@
@use 'screwdriver-colors' as colors;
@use 'events/styles' as events;

@mixin styles {
.pipeline-content {
.pipeline-page {
display: grid;
height: 100%;

grid-template-columns: 50px;
grid-template-rows: auto;
grid-template-columns: 4rem;
grid-auto-rows: min-content auto;

grid-template-areas: 'pipeline-nav pipeline-main';
grid-template-areas:
'pipeline-nav pipeline-header'
'pipeline-nav pipeline-main';

.pipeline-main-content {
.pipeline-header {
grid-area: pipeline-header;
}

.pipeline-tab {
grid-area: pipeline-tab;

display: grid;
padding-top: 8px;
padding-bottom: 1px;

ul.nav-tabs.nav {
border: none;

li {
border-bottom: 3px solid colors.$sd-white;
padding-left: 1rem;
padding-right: 1rem;
text-align: center;

&.active {
border-bottom-color: #1c64f2;
}

a {
&.active {
color: #1c64f2;
}

color: #6b7280;
border: none;
padding: 8px 16px 9px 16px;
}
}
}
}

.pipeline-content {
grid-area: pipeline-content;

border: 1px solid #cbd5e1;
background-color: white;

// scroll
height: 100dvh;
display: flex;
flex-direction: column;
overflow: hidden;

.search-filter-bar {
display: flex;
padding: 12px 24px;
justify-content: space-between;

.search-filter {
display: flex;
align-items: center;
gap: 12px;

.search {
}
.filter {
}
}

.new-event {
cursor: pointer;
}

.img {
width: 18px;
height: 18px;
}
}

.event-cards {
overflow-y: scroll;

.event-card {
border-top: 1px solid #cbd5e1;
}
.event-card:first-child {
border-top: none;
}

.event-card-group {
// padding-bottom: 10px;
// margin: 0.5rem 0.25rem;
margin-top: 0.75rem;
margin-bottom: 0.75rem;

// border: 1px solid #cbd5e1;
border-top: 1px solid #cbd5e1;
border-bottom: 1px solid #cbd5e1;
// border-radius: 0.25rem;

position: relative;

.event-card-group-toggle {
position: absolute;

display: flex;
width: 100%;
flex-wrap: wrap;
justify-content: flex-end;

cursor: pointer;

.badge {
color: #007bff;
}
}

div.event-card:nth-child(1),
div.event-card:nth-child(2) {
border-top: none;
}
}
}
}
.pipeline-header {
grid-area: pipeline-header;
}

.pipeline-main-content.grid {
.pipeline-main-content {
grid-area: pipeline-main;
min-width: 300px;
display: grid;
overflow: scroll;

grid-template-areas:
'pipeline-header pipeline-header'
'pipeline-tab pipeline-tab'
'pipeline-content pipeline-workflowgraph';

grid-template-rows: 80px 52px 1fr;
grid-template-columns: 366px 8fr;
&.grid {
@include events.styles;
}
}
}
}
Loading