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

WIP ✨ Add ticket edition before printing #16

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
14 changes: 7 additions & 7 deletions src/app/components/configuration/configuration.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ h2 {
flex-direction: row;
justify-content: flex-start;
align-items: stretch;
padding: 10px 0px 40px;
padding: 10px 0 40px;
}

.form-section-title {
Expand All @@ -25,7 +25,7 @@ h2 {
}

.form-section {
padding: 0px 20px 20px 10px;
padding: 0 20px 20px 10px;
background: #eee;
margin: 5px 0 5px 20px;
border-radius: 5px;
Expand All @@ -40,7 +40,7 @@ h2 {
}

.centered-form-section {
padding: 0px 20px 20px 10px;
padding: 0 20px 20px 10px;
background: #eee;
margin: 5px 0 5px 20px;
border-radius: 5px;
Expand Down Expand Up @@ -97,7 +97,7 @@ h2 {
.center-self {
display: flex;
align-items: center;
margin: 30px 0px 10px;
margin: 30px 0 10px;
justify-content: flex-start;
}

Expand All @@ -118,8 +118,8 @@ h2 {
color: #369;
text-align: center;
border-radius: 50%;
margin: 0px 20px 0px 5px;
box-shadow: 2px 2px 4px 0px #ccc;
margin: 0 20px 0 5px;
box-shadow: 2px 2px 4px 0 #ccc;
}

.number-circle + div {
Expand Down Expand Up @@ -211,7 +211,7 @@ h2 {

/* overrding button margins */
button {
margin: 0px 20px 10px 20px;
margin: 0 20px 10px 20px;
}

form p {
Expand Down
6 changes: 3 additions & 3 deletions src/app/components/configuration/configuration.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<h1>Configuration</h1>
<h2>Let's configure which Jira tickets to print and the space they'll take on a post-it.</h2>
</div>
<button (click)="onSkip()" [disabled]="!preExistingData">Skip</button>
<button (click)="onSkip()" [disabled]="!preExistingData" class="regular-button">Skip</button>
</div>
<div>
<div>
Expand Down Expand Up @@ -34,7 +34,7 @@ <h2>Let's configure which Jira tickets to print and the space they'll take on a
<span class="bar"></span>
<label>Project key</label>
</div>
<button [disabled]="!projectKey" (click)="getIssueTypes()" id="fetch">{{ submittedProjectKey ? "Synchronize with Jira" : "Fetch" }}</button>
<button [disabled]="!projectKey" (click)="getIssueTypes()" id="fetch" class="regular-button">{{ submittedProjectKey ? "Synchronize with Jira" : "Fetch" }}</button>
</div>
</div>
<div *ngIf="submittedProjectKey" class= "form-section size-limited scrollbar">
Expand Down Expand Up @@ -104,7 +104,7 @@ <h2>Let's configure which Jira tickets to print and the space they'll take on a
</div>
</div>
<div *ngIf="submittedProjectKey" class="centered">
<button [disabled]='!submittedProjectKey || form.invalid ' (click)="onSubmit()">Save</button>
<button [disabled]='!submittedProjectKey || form.invalid' (click)="onSubmit()" class="regular-button">Save</button>
</div>
</form>
</div>
Expand Down
125 changes: 114 additions & 11 deletions src/app/components/formatted-tickets/formatted-tickets.component.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ html, body {
padding: 3mm;
width: 120mm;
height: 70mm;
overflow: hidden;
display: flex;
flex-flow: column nowrap;
justify-content: flex-start;
Expand All @@ -47,7 +46,6 @@ html, body {
padding: 0mm;
width: 126mm;
height: 76mm;
overflow: hidden;
display: flex;
flex-flow: row nowrap;
justify-content: flex-start;
Expand Down Expand Up @@ -218,7 +216,7 @@ p {
background-position: 260% -25%;
}

.issue-container > .tickeykey {
.issue-container .tickeykey {
border-bottom: 1px solid black;
height: 14%;
width: 17mm;
Expand All @@ -229,28 +227,28 @@ p {
align-self: flex-start;
}

.issue-container > .summary {
.issue-container .summary {
font-size: 1em;
overflow: hidden;
margin: 1mm;
flex: 1;
}

.issue-container > .badge {
.issue-container .badge {
align-self: flex-start;
font-size: 0.6em;
margin: 4px 0px 0px 0px;
}

.issue-container > div {
.issue-container div {
display: flex;
justify-content: space-between;
margin: 0px 0px -2mm 0px;
padding-top: 1mm;
border-top: 1px solid black;
}

.issue-container > div > p {
.issue-container div > p {
margin: 0px;
}

Expand Down Expand Up @@ -290,28 +288,133 @@ p {
}
}

@media screen {
/*==================================================
* Shadow effect
* ===============================================*/
@media screen {
.full-ticket, .divided-ticket {
position: relative;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3), 0 0 40px rgba(0, 0, 0, 0.1) inset;
}
.full-ticket:before, .full-ticket:after, .divided-ticket:before, .divided-ticket:after {
content: "";
/* content: "";
position: absolute;
z-index: -1;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
top: 50%;
bottom: 0;
left: 10px;
right: 10px;
border-radius: 100px / 10px;
border-radius: 100px / 10px; */
}
.full-ticket:after, .divided-ticket:after {
right: 10px;
left: auto;
transform: skew(8deg) rotate(3deg);
}
}

/*==================================================
* Hover effect
* ===============================================*/
.overlay {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
height: 100%;
width: 100%;
border-radius: 3px;
}

.overlay-background {
opacity: 0;
transition: .3s ease;
background-color: black;
height: 100%;
width: 100%;
border-radius: 3px;
}

.full-ticket:hover {
cursor: pointer;
}

.full-ticket:hover .overlay div {
animation: 0.3s fadein both
}

.full-ticket:hover .overlay img {
opacity: 1;
transition: .3s ease;
}

.overlay img {
opacity: 0;
filter: invert(100%) sepia(0%) saturate(7500%) hue-rotate(319deg) brightness(105%) contrast(110%);
width: 160px;
height: 160px;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
text-align: center;
}

/*==================================================
* Edition styling
* ===============================================*/
.card-round-button {
display: inline-block;
position: absolute;
text-decoration: none;
bottom: -20px;
right: 80px;
background: #336699;
color: #FFF;
width: 40px;
height: 40px;
line-height: 20px;
border-radius: 50%;
text-align: center;
font-weight: bold;
vertical-align: middle;
overflow: hidden;
box-shadow: 0 2px 2px rgba(0, 0, 0, 0.29);
border-width: 0;
border-bottom: solid 3px #193d61;
transition: .4s;
margin: 0;
padding: 0;
}

.card-cancel-button {
right:130px;
background: #888888;
border-bottom: solid 3px #333333;
}

.card-round-button:active {
top: none;
position: absolute;
-ms-transform: translateY(2px);
-webkit-transform: translateY(2px);
transform: translateY(2px);
box-shadow: 0 0 1px rgba(0, 0, 0, 0.15);
border-bottom: none;
}

.card-round-button:hover {
box-shadow: inset 10px 10px 40px 5px rgba(0,0,0,0.2);
}

@keyframes fadein {
from { opacity: 0; }
to { opacity: 0.35; }
}

.permanent-opacity {
animation: 0.3s fadein both;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,43 @@
</div>
<h1>{{sprintName}}</h1>
<div class="flexcontainer">
<div class="full-ticket" *ngFor="let issue of fullPostitIssues">
<div class="full-ticket" *ngFor="let issue of fullPostitIssues; index as i">
<ng-container *ngTemplateOutlet="(fullTicketInEdition !== i) ? fullticket : fullticketform; context: { $implicit: i }">
</ng-container>
</div>
<ng-container *ngFor="let issues of smallPostitIssues">
<div class="divided-ticket" *ngFor="let chunk of issues | chunks: 3; let i = index; let last = last">
<div class="issue-container" *ngFor="let issue of chunk">
<p class="tickeykey">{{issue.key | ticketkey}}</p>
<p class="badge" *ngFor="let component of issue.components">{{component}}</p>
<p class="summary">{{issue.summary}}</p>
<p class="complexity" *ngIf="issue.complexity">{{issue.complexity}}</p>
<div *ngIf="isTimeTracked">
<p>.../...</p>
<p>... J</p>
<p>.../...</p>
</div>
</div>
</div>
</ng-container>
</div>

<ng-template #fullticket let-i>
<div>
<div class="story-header">
<p class="tickeykey">{{issue.key | ticketkey}}</p>
<p class="epic">{{ issue.epic?(issue.epic.name | uppercase):"."}}</p>
<p class="tickeykey">{{fullPostitIssues[i].key | ticketkey}}</p>
<p class="epic">{{ fullPostitIssues[i].epic?(fullPostitIssues[i].epic?.name | uppercase):"."}}</p>
</div>
<div class="story-content">
<div class="story-information">
<div class="components">
<p class="badge" *ngFor="let component of issue.components">{{component}}</p>
<p class="badge" *ngFor="let component of fullPostitIssues[i].components">{{component}}</p>
</div>
<p class="summary">{{issue.summary}}</p>
<p class="summary">{{fullPostitIssues[i].summary}}</p>
</div>
<div class="story-side">
<img src="../../assets/assignee.svg" alt="assignee photo area">
<p *ngIf="issue.complexity">{{issue.complexity}}</p>
<p *ngIf="fullPostitIssues[i].complexity">{{fullPostitIssues[i].complexity}}</p>
</div>
</div>
<div *ngIf="isTimeTracked" class="story-footer">
Expand All @@ -31,20 +53,35 @@ <h1>{{sprintName}}</h1>
<img src="../../assets/end.svg" alt="end date">
</div>
</div>
<div *ngIf="!fullTicketInEdition && fullTicketInEdition !== 0" class="overlay" (click)="enterFullTicketEditionMode(i)">
<div class="overlay-background"></div>
<img src="../../assets/pencil-black.svg">
</div>
<div *ngIf="fullTicketInEdition !== null" class="overlay">
<div class="overlay-background permanent-opacity"></div>
</div>
</div>
<ng-container *ngFor="let issues of smallPostitIssues">
<div class="divided-ticket" *ngFor="let chunk of issues | chunks: 3; let i = index; let last = last">
<div class="issue-container" *ngFor="let issue of chunk">
<p class="tickeykey">{{issue.key | ticketkey}}</p>
<p class="badge" *ngFor="let component of issue.components">{{component}}</p>
<p class="summary">{{issue.summary}}</p>
<p class="complexity" *ngIf="issue.complexity">{{issue.complexity}}</p>
<div *ngIf="isTimeTracked">
<p>.../...</p>
<p>... J</p>
<p>.../...</p>
</ng-template>

<ng-template #fullticketform>
<form [formGroup]="fullTicketForm" (ngSubmit)="onFullTicketSubmit()" *ngIf="fullTicketInEdition != null">
<div class="story-header">
<p class="tickeykey">{{fullPostitIssues[fullTicketInEdition].key | ticketkey}}</p>
<input class="epic" formControlName="epic">
</div>
<div class="story-content">
<div class="story-information">
<div class="components">
<p class="badge" *ngFor="let component of fullPostitIssues[fullTicketInEdition].components">{{component}}</p>
</div>
<textarea class="summary" formControlName="summary"></textarea>
</div>
<div class="story-side">
<img src="../../assets/assignee.svg" alt="assignee photo area">
<input formControlName="complexity">
</div>
</div>
</ng-container>
</div>
<button type="button" (click)="exitFullTicketEditionMode()" class="card-round-button card-cancel-button">&#10008;</button>
<button class="card-round-button" type="submit">&#10003;</button>
</form>
</ng-template>
Loading