Skip to content

Commit 0a23928

Browse files
author
Salma Alam-Naylor
committed
Added cta to click notes on fretboard, unskipped all tests
1 parent 81e4298 commit 0a23928

31 files changed

+218
-46
lines changed

apps/fretonator-web/src/app/common/footer/footer.component.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
.footer__thanksCopy {
1717
@include font_bodyCopy();
1818
color: var(--offwhite);
19+
text-align: center;
1920
}
2021

2122
.footer__creditsTitle {
@@ -24,6 +25,7 @@
2425
margin-bottom: pxToRem($grid-unit);
2526
color: var(--peach);
2627
font-weight: var(--font-weight-bold);
28+
text-align: center;
2729
}
2830

2931
.footer__creditsList {

apps/fretonator-web/src/app/common/fretonator/fretonator.component.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,13 @@
5454
</div>
5555
</div>
5656

57+
<h4 class="fretonator__playCta">
58+
<span class="fretonator__playCtaIcon">
59+
<app-speaker-svg></app-speaker-svg>
60+
</span>
61+
Tap notes on the fretboard for sound!
62+
</h4>
63+
5764
<div class="infoContainer">
5865
<app-scale-map [mode]="mode"
5966
[scale]="scale"

apps/fretonator-web/src/app/common/fretonator/fretonator.component.scss

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
@import "../../../styles/vars";
22
@import "../../../styles/functions";
33
@import "../../../styles/mixins";
4+
@import "../../../styles/typography";
45

56
.fretboard__container {
67
margin-top: pxToRem($grid-unit * 1);
@@ -256,3 +257,20 @@
256257
display: none;
257258
}
258259
}
260+
261+
.fretonator__playCta {
262+
@include font_bodyCopy();
263+
font-size: pxToRem(14);
264+
display: flex;
265+
justify-content: center;
266+
align-items: center;
267+
margin-top: pxToRem($grid-unit * 4);
268+
color: var(--grey);
269+
}
270+
271+
.fretonator__playCtaIcon {
272+
display: flex;
273+
height: pxToRem($grid-unit * 3);
274+
width: pxToRem($grid-unit * 3);
275+
margin-right: pxToRem($grid-unit);
276+
}

apps/fretonator-web/src/app/common/fretonator/fretonator.component.spec.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,23 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
33
import { FretonatorComponent } from './fretonator.component';
44
import { FretonatorModule } from './fretonator.module';
55
import { Component } from '@angular/core';
6-
import { dIonianFretMappings } from '../fret-map/fret-map.service.testConstants';
76

87
describe('FretonatorComponent', () => {
9-
108
@Component({
119
selector: 'app-fretonator-spec',
1210
template: `
13-
<app-fretonator></app-fretonator>
14-
`,
11+
<app-fretonator [scale]="['C', 'D', 'E']"
12+
[fretMap]="[
13+
{ string: 'A', fret: 0, displayName: 'A', degree: 'dominant' },
14+
{ string: 'A', fret: 2, displayName: 'B', degree: 'submediant' }]">
15+
</app-fretonator>
16+
`
1517
})
1618
class FretonatorComponentSpec {
1719
}
1820

19-
let component: FretonatorComponent;
20-
let fixture: ComponentFixture<FretonatorComponent>;
21+
let component: FretonatorComponentSpec;
22+
let fixture: ComponentFixture<FretonatorComponentSpec>;
2123

2224
beforeEach(async(() => {
2325
TestBed.configureTestingModule({
@@ -27,13 +29,12 @@ describe('FretonatorComponent', () => {
2729
}));
2830

2931
beforeEach(() => {
30-
fixture = TestBed.createComponent(FretonatorComponent);
32+
fixture = TestBed.createComponent(FretonatorComponentSpec);
3133
component = fixture.componentInstance;
32-
component.fretMap = dIonianFretMappings;
3334
fixture.detectChanges();
3435
});
3536

36-
xit('should create', () => {
37+
it('should create', () => {
3738
expect(component).toBeTruthy();
3839
});
3940
});

apps/fretonator-web/src/app/common/fretonator/fretonator.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ChordMapModule } from './chord-map/chord-map.module';
66
import { IntervalMapModule } from './interval-map/interval-map.module';
77
import { ScaleMapModule } from './scale-map/scale-map.module';
88
import { IsTheoreticalScalePipe } from './is-theoretical-scale.pipe';
9+
import { SpeakerModule } from '../svgs/speaker/speaker.module';
910

1011
@NgModule({
1112
declarations: [
@@ -17,7 +18,8 @@ import { IsTheoreticalScalePipe } from './is-theoretical-scale.pipe';
1718
CommonModule,
1819
ChordMapModule,
1920
IntervalMapModule,
20-
ScaleMapModule
21+
ScaleMapModule,
22+
SpeakerModule
2123
],
2224
exports: [
2325
FretonatorComponent

apps/fretonator-web/src/app/common/fretonator/scale-map/scale-map.component.html

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ <h2 class="infoBlock__title">About Theoretical Scales
4444
aria-label="Theoretical Scales Info Close"
4545
type="button"
4646
(click)="toggleTheoreticalScaleInfo()">
47-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
48-
<path fill="#474350" fill-rule="evenodd"
49-
d="M14 1.41L12.59 0 7 5.59 1.41 0 0 1.41 5.59 7 0 12.59 1.41 14 7 8.41 12.59 14 14 12.59 8.41 7z"></path>
50-
</svg>
47+
<app-cross-svg></app-cross-svg>
5148
</button>
5249
</h2>
5350
<p class="infoBlock__copy">A theoretical scale or <em>impossible key</em> is a key whose key signature has at least
@@ -69,10 +66,7 @@ <h2 class="infoBlock__title">About Scale Degrees
6966
aria-label="Scale Degrees Info Close"
7067
type="button"
7168
(click)="toggleScaleMapInfo()">
72-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
73-
<path fill="#474350" fill-rule="evenodd"
74-
d="M14 1.41L12.59 0 7 5.59 1.41 0 0 1.41 5.59 7 0 12.59 1.41 14 7 8.41 12.59 14 14 12.59 8.41 7z"></path>
75-
</svg>
69+
<app-cross-svg></app-cross-svg>
7670
</button>
7771
</h2>
7872
<p class="infoBlock__copy">

apps/fretonator-web/src/app/common/fretonator/scale-map/scale-map.component.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,15 +138,12 @@
138138
background-color: transparent;
139139
height: pxToRem(44);
140140
width: pxToRem(44);
141+
padding: pxToRem($grid-unit);
141142
display: flex;
142143
justify-content: center;
143144
align-items: center;
144145
cursor: pointer;
145-
146-
svg {
147-
height: 50%;
148-
width: 50%;
149-
}
146+
color: var(--grey);
150147
}
151148

152149
.infoBlock__copy {

apps/fretonator-web/src/app/common/fretonator/scale-map/scale-map.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { DisplayScaleDegreesPipe } from './display-scale-degrees.pipe';
55
import { GetEnharmonicEquivalentPipe } from './get-enharmonic-equivalent.pipe';
66
import { RouterModule } from '@angular/router';
77
import { GetEnharmonicRouterLinkPipe } from './get-enharmonic-router-link.pipe';
8+
import { CrossModule } from '../../svgs/cross/cross.module';
89

910

1011
@NgModule({
@@ -14,7 +15,8 @@ import { GetEnharmonicRouterLinkPipe } from './get-enharmonic-router-link.pipe';
1415
],
1516
imports: [
1617
CommonModule,
17-
RouterModule
18+
RouterModule,
19+
CrossModule
1820
]
1921
})
2022
export class ScaleMapModule { }

apps/fretonator-web/src/app/common/header/__snapshots__/header.component.spec.ts.snap

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ exports[`HeaderComponent should match snapshot 1`] = `
2020
>
2121
<path
2222
d="M302.39 1410.89v42.7h61.43v15.05h-61.43v49.53h-17.5v-122.5h86.45v15.22zM499.93 1518.17l-26.42-37.63c-3.27.24-5.84.35-7.7.35h-30.28v37.28H418v-122.5h47.78q23.79 0 37.45 11.37t13.65 31.33q0 14.18-7 24.15T490 1477l29 41.17zm-9.27-59.33q8.74-7.17 8.75-20.47t-8.75-20.37q-8.76-7.1-25.38-7.09h-29.75V1466h29.75q16.62 0 25.38-7.16zM658.74 1502.94v15.23h-88.9v-122.5h86.45v15.22h-68.95v37.63h61.43v14.87h-61.43v39.55zM739.79 1410.89h-42v-15.22h101.32v15.22h-42v107.28h-17.32zM861 1511.43a60.22 60.22 0 01-23.36-22.49 64.65 64.65 0 010-64A60.29 60.29 0 01861 1402.4a72.43 72.43 0 0166.68 0 59.84 59.84 0 0123.32 22.4 65.59 65.59 0 010 64.23 59.77 59.77 0 01-23.27 22.4 72.35 72.35 0 01-66.68 0zm57.67-13.56a45 45 0 0017-16.89 49.73 49.73 0 000-48.13 44.94 44.94 0 00-17-16.88 48.09 48.09 0 00-24.24-6.13A49 49 0 00870 1416a44.51 44.51 0 00-17.15 16.88 49.66 49.66 0 000 48.13 44.6 44.6 0 0017.15 16.86 49.1 49.1 0 0024.41 6.12 48.19 48.19 0 0024.28-6.12zM1116.21 1395.67v122.5h-14.35l-73.5-91.35v91.35h-17.5v-122.5h14.35l73.5 91.35v-91.35zM1256.49 1487.54h-65.1l-13.48 30.63h-18l55.47-122.5h17.33l55.65 122.5H1270zm-6.13-14l-26.42-60-26.43 60zM1343.06 1410.89h-42v-15.22h101.32v15.22h-42v107.28h-17.32zM1464.3 1511.43a60.17 60.17 0 01-23.37-22.49 64.71 64.71 0 010-64 60.24 60.24 0 0123.37-22.49 72.41 72.41 0 0166.67 0 59.8 59.8 0 0123.28 22.4 65.59 65.59 0 010 64.23 59.73 59.73 0 01-23.28 22.4 72.33 72.33 0 01-66.67 0zm57.66-13.56a45 45 0 0017-16.89 49.66 49.66 0 000-48.13 44.94 44.94 0 00-17-16.88 48.09 48.09 0 00-24.24-6.13 49 49 0 00-24.41 6.13 44.58 44.58 0 00-17.15 16.88 49.73 49.73 0 000 48.13 44.67 44.67 0 0017.15 16.89 49.13 49.13 0 0024.41 6.12 48.19 48.19 0 0024.28-6.12zM1696 1518.17l-26.42-37.63c-3.27.24-5.84.35-7.7.35h-30.28v37.28h-17.5v-122.5h47.78q23.79 0 37.45 11.37t13.65 31.33q0 14.18-7 24.15t-20 14.52l29 41.13zm-9.27-59.33q8.74-7.17 8.75-20.47t-8.75-20.39q-8.76-7.1-25.38-7.09h-29.75V1466h29.75q16.65 0 25.41-7.16zM1080.78 1060.28L1134 968a14.91 14.91 0 002-7.49V487.93a7.5 7.5 0 00-7.5-7.5h-54.18a7.5 7.5 0 00-7.5 7.5v568.61a7.5 7.5 0 0013.96 3.74zM1229.85 480.43h-54.19a7.5 7.5 0 00-7.5 7.5v392.72a7.5 7.5 0 0014 3.75l53.18-92.27a15 15 0 002-7.49V487.93a7.5 7.5 0 00-7.49-7.5zM925.71 480.43h-54.18a7.5 7.5 0 00-7.5 7.5v472.59a14.91 14.91 0 002 7.49l53.18 92.27a7.5 7.5 0 0014-3.74V487.93a7.5 7.5 0 00-7.5-7.5zM1363.08 480.43h-86a7.5 7.5 0 00-7.5 7.5v216.84a7.5 7.5 0 0014 3.74l105.53-183.09a30 30 0 00-26.03-44.99zM764.66 792.13l53.18 92.27a7.5 7.5 0 0014-3.75V487.93a7.5 7.5 0 00-7.5-7.5h-54.19a7.5 7.5 0 00-7.5 7.5v296.71a15 15 0 002.01 7.49zM1027.09 480.43h-54.18a7.5 7.5 0 00-7.5 7.5v648.48a15 15 0 002 7.49l6.6 11.44a30 30 0 0052 0l6.6-11.44a15 15 0 002-7.49V487.93a7.5 7.5 0 00-7.52-7.5zM730.46 487.93a7.5 7.5 0 00-7.5-7.5h-86a30 30 0 00-26 45l105.5 183.08a7.5 7.5 0 0014-3.74z"
23-
fill="#f9f9f9"
2423
/>
2524
</svg>
2625
</app-logo-with-text>

apps/fretonator-web/src/app/common/header/header.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
cursor: pointer;
2222
margin-left: auto;
2323
margin-right: auto;
24+
color: var(--offwhite);
2425

2526
@include focus_accessible();
2627

0 commit comments

Comments
 (0)