Skip to content
This repository has been archived by the owner on Dec 8, 2022. It is now read-only.

Sectioned modal #1068

Merged
merged 180 commits into from
Sep 27, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
10f04bd
Vertical tab demo stub.
Blackbaud-AdamHickey Jul 11, 2017
7beab00
Adding basic vertical tab component.
Blackbaud-AdamHickey Jul 11, 2017
8e11023
Add menu and item components.
Blackbaud-AdamHickey Jul 11, 2017
76e2f9d
Update hover css.
Blackbaud-AdamHickey Jul 11, 2017
98c645b
Adding expand and collapse functionality.
Blackbaud-AdamHickey Jul 12, 2017
c0dc34b
Move vertical tabs under tabset.
Blackbaud-AdamHickey Jul 13, 2017
3ae9ce1
Add collapse animations.
Blackbaud-AdamHickey Jul 13, 2017
574316d
Merge branch 'master' of https://github.com/blackbaud/skyux2 into ver…
Blackbaud-AdamHickey Aug 1, 2017
f25ab14
Adding vertical height animation.
Blackbaud-AdamHickey Aug 1, 2017
73fc080
Change animation time.
Blackbaud-AdamHickey Aug 1, 2017
ef89910
Add constants for open and closed tab state.
Blackbaud-AdamHickey Aug 2, 2017
cf34ef6
Add highlighting to tab item. Fixing margins.
Blackbaud-AdamHickey Aug 2, 2017
507e742
Add outline on focus.
Blackbaud-AdamHickey Aug 2, 2017
89e5690
Show content when subgroup is selected.
Blackbaud-AdamHickey Aug 3, 2017
b7f30ac
Add left border on selected row.
Blackbaud-AdamHickey Aug 3, 2017
6cf4435
Don't inactivate tab if clicked twice.
Blackbaud-AdamHickey Aug 3, 2017
b096cdc
Open group if child item is active.
Blackbaud-AdamHickey Aug 3, 2017
627de29
Rename tab componenets. Update demo.
Blackbaud-AdamHickey Aug 3, 2017
16dd99a
Get tabs from tab service instead of dom query.
Blackbaud-AdamHickey Aug 3, 2017
b13d0d8
Add bolding to group header when sub item selected.
Blackbaud-AdamHickey Aug 7, 2017
b3af3aa
Add disabled and open inputs to group.
Blackbaud-AdamHickey Aug 7, 2017
6fb4cdf
Update documentation.
Blackbaud-AdamHickey Aug 7, 2017
a5182ef
Add media query for mobile.
Blackbaud-AdamHickey Aug 7, 2017
4be9bb9
Hide and show tabs on mobile.
Blackbaud-AdamHickey Aug 7, 2017
d0ca711
Show and hide tabs on mobile.
Blackbaud-AdamHickey Aug 7, 2017
a6d1114
Hide tabs when switching from wide to mobile.
Blackbaud-AdamHickey Aug 7, 2017
832b7aa
Tabs should take up full screen on mobile.
Blackbaud-AdamHickey Aug 7, 2017
8a66591
Remove fixed width.
Blackbaud-AdamHickey Aug 8, 2017
c660269
Add slide in animation.
Blackbaud-AdamHickey Aug 8, 2017
186a2cf
Fix lint errors.
Blackbaud-AdamHickey Aug 8, 2017
1949bb6
Use ngif to show and hide tab group.
Blackbaud-AdamHickey Aug 8, 2017
881d319
Fix lint error.
Blackbaud-AdamHickey Aug 8, 2017
f98660f
Fix switching from mobile to widescreen.
Blackbaud-AdamHickey Aug 8, 2017
1f2afba
Add test for loading vertical tab.
Blackbaud-AdamHickey Aug 9, 2017
fcf3837
Adding test for clicking tab.
Blackbaud-AdamHickey Aug 10, 2017
0d72198
Add test for closing group.
Blackbaud-AdamHickey Aug 10, 2017
9da6441
Add test for mobile.
Blackbaud-AdamHickey Aug 10, 2017
17704f3
Test for mobile.
Blackbaud-AdamHickey Aug 10, 2017
972a83f
Add test for mobile to widescreen switch.
Blackbaud-AdamHickey Aug 10, 2017
5a19a78
Add test for empty group.
Blackbaud-AdamHickey Aug 11, 2017
40a84f9
Fixing test.
Blackbaud-AdamHickey Aug 11, 2017
491a97b
Add visual tab tests.
Blackbaud-AdamHickey Aug 11, 2017
8b7596d
Fix lint warnings.
Blackbaud-AdamHickey Aug 14, 2017
d6905eb
Merge branch 'master' of https://github.com/blackbaud/skyux2 into ver…
Blackbaud-AdamHickey Aug 14, 2017
7bbb099
Changing name of test file.
Blackbaud-AdamHickey Aug 14, 2017
7cc2f88
Adding visual test.
Blackbaud-AdamHickey Aug 14, 2017
08bc38f
Update visual test.
Blackbaud-AdamHickey Aug 14, 2017
06dcd21
Add tab test.
Blackbaud-AdamHickey Aug 14, 2017
9bca2e1
Update test.
Blackbaud-AdamHickey Aug 14, 2017
82da583
Update test.
Blackbaud-AdamHickey Aug 14, 2017
7d2425c
Add browser sleep
Blackbaud-AdamHickey Aug 14, 2017
7a7d127
Add mobile tests.
Blackbaud-AdamHickey Aug 14, 2017
760de61
Remove browser sleep calls.
Blackbaud-AdamHickey Aug 14, 2017
a1c1eba
Adding window resize.
Blackbaud-AdamHickey Aug 14, 2017
2ad58d6
Subscribe to window size changes.
Blackbaud-AdamHickey Aug 15, 2017
9bcb3f8
Adding visual tests.
Blackbaud-AdamHickey Aug 15, 2017
d4610cb
Update tab styles.
Blackbaud-AdamHickey Aug 15, 2017
a8c8b1c
Use chevron component.
Blackbaud-AdamHickey Aug 15, 2017
2edf339
Add independent scrolling.
Blackbaud-AdamHickey Aug 15, 2017
4fb58bc
Use onpush changedetection.
Blackbaud-AdamHickey Aug 15, 2017
ec603a2
Fix tests.
Blackbaud-AdamHickey Aug 15, 2017
8e526ea
Fix animation bug when showing tabs.
Blackbaud-AdamHickey Aug 16, 2017
20b097f
Update padding on group so border shows evenly.
Blackbaud-AdamHickey Aug 16, 2017
2a35202
Add test for disabled group.
Blackbaud-AdamHickey Aug 16, 2017
726a523
Add test for clicking two tabs.
Blackbaud-AdamHickey Aug 16, 2017
89b59fa
Fixing animation in IE.
Blackbaud-AdamHickey Aug 16, 2017
05f85f7
style cleanup
Blackbaud-ToddRoberts Aug 18, 2017
e0ecb0a
update with new mixin
Blackbaud-ToddRoberts Aug 18, 2017
8326139
Merge branch 'master' of https://github.com/blackbaud/skyux2 into ver…
Blackbaud-AdamHickey Aug 18, 2017
5191b6c
Add extra padding for blue outline.
Blackbaud-AdamHickey Aug 18, 2017
6b94ca6
Merge
Blackbaud-AdamHickey Aug 23, 2017
403b209
Use existing slide animation.
Blackbaud-AdamHickey Aug 24, 2017
eca97f3
Merge branch 'master' of https://github.com/blackbaud/skyux2 into ver…
Blackbaud-AdamHickey Aug 28, 2017
d390a35
Rename sky-tab-group
Blackbaud-AdamHickey Aug 28, 2017
128749b
Add enter and leave transitions for animating component hidden by ngif.
Blackbaud-AdamHickey Aug 28, 2017
cce1941
Remove unnecessary div.
Blackbaud-AdamHickey Aug 28, 2017
147950b
Remove unnecessary div
Blackbaud-AdamHickey Aug 28, 2017
ff0881b
unsubscribe from observables.
Blackbaud-AdamHickey Aug 28, 2017
282a7f9
Rename click method.
Blackbaud-AdamHickey Aug 28, 2017
02175f2
Make groups and tabs tabbable.
Blackbaud-AdamHickey Aug 29, 2017
77bf128
Add outline on tab sub item when tabbing only.
Blackbaud-AdamHickey Aug 29, 2017
62903f3
Add test for tabbing.
Blackbaud-AdamHickey Aug 29, 2017
8d07612
Use display none instead of visibility.
Blackbaud-AdamHickey Aug 29, 2017
f3caf7b
Merge branch 'master' of https://github.com/blackbaud/skyux2 into ver…
Blackbaud-AdamHickey Aug 30, 2017
87651ab
Remove unused variable.
Blackbaud-AdamHickey Aug 30, 2017
d8731c5
Fix lint warnings.
Blackbaud-AdamHickey Aug 30, 2017
91e80dc
Add sectioned form demo page.
Blackbaud-AdamHickey Aug 30, 2017
1bd35c7
Update demo to use modal.
Blackbaud-AdamHickey Aug 30, 2017
f5bf690
Merge branch 'master' into vertical-tabs
Blackbaud-SteveBrush Aug 30, 2017
f8256c7
Add sky sectioned modal form component.
Blackbaud-AdamHickey Aug 30, 2017
b41f938
Add index changed event.
Blackbaud-AdamHickey Aug 30, 2017
a0829c7
Move tab content to the right.
Blackbaud-AdamHickey Aug 30, 2017
6877001
Add components for demo form.
Blackbaud-AdamHickey Aug 30, 2017
8160b83
Add scss files for demo.
Blackbaud-AdamHickey Aug 30, 2017
50198ab
Add height to form container.
Blackbaud-AdamHickey Aug 31, 2017
0f6562d
Separate vertical tab documentation.
Blackbaud-AdamHickey Sep 6, 2017
e4dbe24
Merge branch 'vertical-tabs' of https://github.com/blackbaud/skyux2 i…
Blackbaud-AdamHickey Sep 6, 2017
c33acc2
Merge branch 'master' of https://github.com/blackbaud/skyux2 into ver…
Blackbaud-AdamHickey Sep 6, 2017
ff431dc
Add tab header count.
Blackbaud-AdamHickey Sep 6, 2017
4525f85
Set the animation state so the initial load is not animated.
Blackbaud-AdamHickey Sep 6, 2017
7a7d969
Add active changed event for new tab click.
Blackbaud-AdamHickey Sep 6, 2017
8b21d87
Add optional to tab properties.
Blackbaud-AdamHickey Sep 6, 2017
128a65e
Add aria-selected attribute.
Blackbaud-AdamHickey Sep 6, 2017
4ea13e5
Merge
Blackbaud-AdamHickey Sep 7, 2017
fbcb897
Update phone demo page.
Blackbaud-AdamHickey Sep 7, 2017
11246c2
Add demo files to docs page.
Blackbaud-AdamHickey Sep 7, 2017
acc1dac
Remove demo scss files.
Blackbaud-AdamHickey Sep 7, 2017
a0ec1bb
Add active and disabled inputs.
Blackbaud-AdamHickey Sep 7, 2017
43225a2
Merge branch 'vertical-tabs' of https://github.com/blackbaud/skyux2 i…
Blackbaud-AdamHickey Sep 7, 2017
c3646a6
Add console logging for save and cancel.
Blackbaud-AdamHickey Sep 7, 2017
d0e16e3
Fix expression changed error.
Blackbaud-AdamHickey Sep 7, 2017
9b91906
Merge.
Blackbaud-AdamHickey Sep 7, 2017
fd98ce4
Default to second vertical tab in sectioned modal.
Blackbaud-AdamHickey Sep 7, 2017
0dfa78c
Add flex basis to content window.
Blackbaud-AdamHickey Sep 7, 2017
f605db3
Add form section component.
Blackbaud-AdamHickey Sep 8, 2017
e86e2aa
Add required class to tab.
Blackbaud-AdamHickey Sep 8, 2017
16235b1
Rename demo form components.
Blackbaud-AdamHickey Sep 8, 2017
a718a12
Add flex to form elements.
Blackbaud-AdamHickey Sep 8, 2017
02b9f3f
Remove tab index from chevron component. Disable tabbing on vertical …
Blackbaud-AdamHickey Sep 11, 2017
a4d5bcf
Use anchor instead of div for tab.
Blackbaud-AdamHickey Sep 11, 2017
f7c4b61
Merge branch 'master' of https://github.com/blackbaud/skyux2 into ver…
Blackbaud-AdamHickey Sep 11, 2017
c56049f
Remove unnecessary mark for changes.
Blackbaud-AdamHickey Sep 12, 2017
c02770f
Fix test.
Blackbaud-AdamHickey Sep 12, 2017
121de30
Merge branch 'vertical-tabs' of https://github.com/blackbaud/skyux2 i…
Blackbaud-AdamHickey Sep 12, 2017
c291702
Fix demo information component.
Blackbaud-AdamHickey Sep 12, 2017
f72d2ff
Update properties.
Blackbaud-AdamHickey Sep 12, 2017
e7f9af3
Fix lint warning.
Blackbaud-AdamHickey Sep 12, 2017
5ce0bbb
Merge branch 'vertical-tabs' of https://github.com/blackbaud/skyux2 i…
Blackbaud-AdamHickey Sep 12, 2017
8d92a5f
style tweaks + standardization
Blackbaud-ToddRoberts Sep 12, 2017
e5d57c9
Add test for sectioned form.
Blackbaud-AdamHickey Sep 12, 2017
77aec8f
Update code review items.
Blackbaud-AdamHickey Sep 12, 2017
d667b19
Merge
Blackbaud-AdamHickey Sep 12, 2017
aa62b4f
Merge branch 'vertical-tabs' of https://github.com/blackbaud/skyux2 i…
Blackbaud-AdamHickey Sep 13, 2017
83e8fae
Add tests for sectioned modal.
Blackbaud-AdamHickey Sep 13, 2017
cd310fd
Add test for empty sections.
Blackbaud-AdamHickey Sep 13, 2017
cbb125c
Add additional tests.
Blackbaud-AdamHickey Sep 13, 2017
486a720
Add test.
Blackbaud-AdamHickey Sep 13, 2017
b98b262
Add empty visual test.
Blackbaud-AdamHickey Sep 14, 2017
8990d44
Update vertical tab service index changed.
Blackbaud-AdamHickey Sep 14, 2017
da39d3a
Add test to service spec.
Blackbaud-AdamHickey Sep 14, 2017
4033938
Add components to visual test.
Blackbaud-AdamHickey Sep 14, 2017
a8cb50f
Update visual test.
Blackbaud-AdamHickey Sep 14, 2017
1f5d66c
Update html test.
Blackbaud-AdamHickey Sep 14, 2017
05a9a0e
Update test.
Blackbaud-AdamHickey Sep 14, 2017
6ca4c31
Update test.
Blackbaud-AdamHickey Sep 14, 2017
0968df3
Merge
Blackbaud-AdamHickey Sep 14, 2017
437e221
Fix sectioned form selector
Blackbaud-AdamHickey Sep 14, 2017
0465d3d
Add visual tests.
Blackbaud-AdamHickey Sep 14, 2017
9e97aba
Merge
Blackbaud-AdamHickey Sep 14, 2017
7dc8794
Add pagetitle
Blackbaud-AdamHickey Sep 14, 2017
96f4575
Fix merge error.
Blackbaud-AdamHickey Sep 14, 2017
2b56bde
Fix merge mistake.
Blackbaud-AdamHickey Sep 14, 2017
9e50745
Update demo. Use event output.
Blackbaud-AdamHickey Sep 15, 2017
cb0a83f
Update tests.
Blackbaud-AdamHickey Sep 15, 2017
cdeedb2
Update classnames.
Blackbaud-AdamHickey Sep 15, 2017
a9a432c
Doc tweaks for sectioned form. (#1074)
blackbaud-johnly Sep 15, 2017
6166409
Add mixin for required field. Remove unnecessary style.
Blackbaud-AdamHickey Sep 15, 2017
d410103
Merge branch 'sectioned-modal' of https://github.com/blackbaud/skyux2…
Blackbaud-AdamHickey Sep 15, 2017
13a68e1
Merge branch 'master' of https://github.com/blackbaud/skyux2 into sec…
Blackbaud-AdamHickey Sep 18, 2017
1744dae
Merge
Blackbaud-AdamHickey Sep 18, 2017
4ed79b6
Adding mobile support.
Blackbaud-AdamHickey Sep 18, 2017
764fdf2
Refactor tab service.
Blackbaud-AdamHickey Sep 19, 2017
f595bac
uncomment test.
Blackbaud-AdamHickey Sep 19, 2017
29f9c30
Add arrows to vertical tabs on mobile.
Blackbaud-AdamHickey Sep 19, 2017
8e88c93
Add invalid field class.
Blackbaud-AdamHickey Sep 19, 2017
0ad872e
Fix tests.
Blackbaud-AdamHickey Sep 19, 2017
b3e1488
Add test for code coverage.
Blackbaud-AdamHickey Sep 20, 2017
abbd5da
Fix broken group animation.
Blackbaud-AdamHickey Sep 20, 2017
2ae9321
Update right arrow color. Add test for coverage.
Blackbaud-AdamHickey Sep 20, 2017
effab11
Merge branch 'master' of https://github.com/blackbaud/skyux2 into sec…
Blackbaud-AdamHickey Sep 20, 2017
42b85ec
Add visual tests.
Blackbaud-AdamHickey Sep 20, 2017
8a38bbb
Add required attribute to input on demo
Blackbaud-AdamHickey Sep 21, 2017
2cf7790
Adding service for required and invalid sections (#1101)
Blackbaud-AdamHickey Sep 22, 2017
b604823
Fix build failure.
Blackbaud-AdamHickey Sep 22, 2017
ddad1d2
Fix spacing.
Blackbaud-AdamHickey Sep 22, 2017
c0b711d
Add sectioned form demo example outside of a modal.
Blackbaud-AdamHickey Sep 25, 2017
ce7e914
Merge branch 'master' into sectioned-modal
Blackbaud-SteveBrush Sep 26, 2017
0943b69
Update test names.
Blackbaud-AdamHickey Sep 26, 2017
abf9871
Merge branch 'master' of https://github.com/blackbaud/skyux2 into sec…
Blackbaud-AdamHickey Sep 26, 2017
5115a41
Merge branch 'master' into sectioned-modal
Blackbaud-SteveBrush Sep 27, 2017
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: 1 addition & 0 deletions skyux-spa-visual-tests/src/app/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export class HomeComponent {
'radio',
'repeater',
'search',
'sectioned-form',
'sort',
'tabs',
'text-expand',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="sky-emphasized" style="margin-bottom: 5px;">
<label>Home</label>
</div>
<div>410 17th Street</div>
<div>Denver, CO 80202-4402</div>

<div class="sky-emphasized" style="margin: 5px 0 5px 0;">
<label>Vacation</label>
</div>
<div>3345 Franciscan Way</div>
<div>Tampa, FL 10255-0098</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Component } from '@angular/core';

@Component({
selector: 'sky-demo-address-form',
templateUrl: './demo-address-form.component.html'
})
export class SkyDemoAddressFormComponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<div style="display: flex;">
<div style="margin-right: 10px; flex: 1;">
<label
for="inputName"
class="sky-control-label"
[ngClass]="{'sky-control-label-required': nameRequired}"
>
Name
</label>
<input
class="sky-form-control"
[ngModel]="name"
(ngModelChange)="nameChange($event)"
id="inputName"
type="text"
>
</div>
<div style="margin-right: 10px; flex: 1;">
<label
for="inputId"
class="sky-control-label"
>
Id
</label>
<input
class="sky-form-control"
[ngModel]="id"
id="inputId"
type="text"
>
</div>
</div>

<div style="margin-top: 10px;">
<sky-checkbox [(ngModel)]="nameRequired">
<sky-checkbox-label>
Mark 'Name' required
</sky-checkbox-label>
</sky-checkbox>
</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import { Component, Output, EventEmitter } from '@angular/core';

@Component({
selector: 'sky-demo-information-form',
templateUrl: './demo-information-form.component.html'
})
export class SkyDemoInformationFormComponent {
public name: string = '';
public id: string = '5324901';

@Output()
public requiredChange = new EventEmitter<boolean>();

private _nameRequired: boolean = false;

public get nameRequired() {
return this._nameRequired;
}

public set nameRequired(value: boolean) {
this._nameRequired = value;
this.emitRequiredChange();
}

public nameChange(newName: string) {
this.name = newName;
this.emitRequiredChange();
}

private emitRequiredChange() {
if (this.nameRequired && !this.name) {
this.requiredChange.emit(true);
} else {
this.requiredChange.emit(false);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div>
<div>
<span class="sky-emphasized">Home</span> 303.997.3301
</div>
<div>
<span class="sky-emphasized">Mobile</span> 888.387.1211
</div>
<div>
<span class="sky-emphasized">Work</span> 303.997.2000
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Component } from '@angular/core';

@Component({
selector: 'sky-demo-phone-form',
templateUrl: './demo-phone-form.component.html'
})
export class SkyDemoPhoneFormComponent {}
1 change: 1 addition & 0 deletions skyux-spa-visual-tests/src/app/sectioned-form/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<sectioned-form-visual></sectioned-form-visual>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<div id="screenshot-sectioned-form" style="padding-left: 15px;">
<sky-sectioned-form>
<sky-sectioned-form-section heading="Basic information">
<sky-demo-information-form >
</sky-demo-information-form>
</sky-sectioned-form-section>
<sky-sectioned-form-section heading="Addresses" itemCount="2" active="true">
<sky-demo-address-form></sky-demo-address-form>
</sky-sectioned-form-section>
<sky-sectioned-form-section heading="Phone numbers" itemCount="3">
<sky-demo-phone-form></sky-demo-phone-form>
</sky-sectioned-form-section>
</sky-sectioned-form>
</div>

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ChangeDetectionStrategy, Component} from '@angular/core';

@Component({
selector: 'sectioned-form-visual',
templateUrl: './sectioned-form-visual.component.html',
changeDetection: ChangeDetectionStrategy.OnPush
})
export class SectionedFormVisualComponent {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
import { SkyVisualTest } from '../../../config/utils/visual-test-commands';
import { element, by, browser } from 'protractor';

describe('Sectioned form', () => {

it('should match previous sectioned form screenshot', () => {
return SkyVisualTest.setupTest('sectioned-form')
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'sectioned-form',
selector: '#screenshot-sectioned-form'
});
});
});

it('should match previous sectioned form screenshot after clicking first tab', () => {
return SkyVisualTest.setupTest('sectioned-form')
.then(() => {

let tabs = element.all(by.css('sky-vertical-tab'));

// click first tab
tabs.get(0).click();

return SkyVisualTest.compareScreenshot({
screenshotName: 'sectioned-form-first',
selector: '#screenshot-sectioned-form'
});
});
});

it('should match previous sectioned form screenshot after clicking second tab', () => {
return SkyVisualTest.setupTest('sectioned-form')
.then(() => {

let tabs = element.all(by.css('sky-vertical-tab'));

// click second tab
tabs.get(1).click();

return SkyVisualTest.compareScreenshot({
screenshotName: 'sectioned-form-second',
selector: '#screenshot-sectioned-form'
});
});
});

it('should match previous sectioned form screenshot on mobile', () => {
return SkyVisualTest.setupTest('sectioned-form', 480)
.then(() => {
return SkyVisualTest.compareScreenshot({
screenshotName: 'sectioned-form-mobile',
selector: '#screenshot-sectioned-form'
});
});
});

it('should match previous sectioned form screenshot after resizing to mobile', () => {
return SkyVisualTest.setupTest('sectioned-form')
.then(() => {

// resize to mobile
browser.driver.manage().window().setSize(480, 800);
browser.sleep(1000);

return SkyVisualTest.compareScreenshot({
screenshotName: 'sectioned-form-to-mobile',
selector: '#screenshot-sectioned-form'
});
});
});

it('should match previous sectioned form screenshot after resizing to widescreen', () => {
return SkyVisualTest.setupTest('sectioned-form')
.then(() => {

// resize to mobile
browser.driver.manage().window().setSize(480, 800);
browser.sleep(1000);

// resize to widescreen
browser.driver.manage().window().setSize(1000, 800);
browser.sleep(1000);

return SkyVisualTest.compareScreenshot({
screenshotName: 'sectioned-form-to-widescreen',
selector: '#screenshot-sectioned-form'
});
});
});
});
7 changes: 6 additions & 1 deletion src/app/app-extras.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import { SkyTilesDemoTile1Component } from './components/tiles/tiles-demo-tile1.
import { SkyTilesDemoTile2Component } from './components/tiles/tiles-demo-tile2.component';
import { SkyWizardDemoFormComponent } from './components/wizard/wizard-demo-form.component';

import {
SkySectionedModalFormDemoComponent
} from './components/sectioned-form/sectioned-modal-form-demo.component';

import { SkyDemoComponentsModule } from './components/demo-components.module';

require('style-loader!./styles.scss');
Expand All @@ -25,7 +29,8 @@ require('style-loader!./styles.scss');
SkyTilesDemoTile2Component,
SkyWizardDemoFormComponent,
SkyFilterDemoModalComponent,
SkyListFiltersModalDemoComponent
SkyListFiltersModalDemoComponent,
SkySectionedModalFormDemoComponent
],
imports: [
SkyDemoComponentsModule,
Expand Down
60 changes: 60 additions & 0 deletions src/app/components/demo-components.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -872,6 +872,66 @@ export class SkyDemoComponentsService {
];
}
},
{
name: 'Sectioned form',
icon: 'object-group',
// tslint:disable-next-line
summary: `A sectioned form combines multiple forms and allows users to target specific, independent areas.`,
url: '/components/sectioned-form',
getCodeFiles: function () {
return [
{
name: 'sectioned-form-demo.component.html',
// tslint:disable-next-line
fileContents: require('!!raw-loader!./sectioned-form/sectioned-form-demo.component.html')
},
{
name: 'sectioned-form-demo.component.ts',
// tslint:disable-next-line
fileContents: require('!!raw-loader!./sectioned-form/sectioned-form-demo.component.ts'),
componentName: 'SkySectionedFormDemoComponent',
bootstrapSelector: 'sky-sectioned-form-demo'
},
{
name: 'sectioned-modal-form-demo.component.html',
// tslint:disable-next-line
fileContents: require('!!raw-loader!./sectioned-form/sectioned-modal-form-demo.component.html')
},
{
name: 'sectioned-modal-form-demo.component.ts',
// tslint:disable-next-line
fileContents: require('!!raw-loader!./sectioned-form/sectioned-modal-form-demo.component.ts')
},
{
name: 'demo-address-form.component.html',
// tslint:disable-next-line
fileContents: require('!!raw-loader!./sectioned-form/demo-address-form.component.html')
},
{
name: 'demo-address-form.component.ts',
fileContents: require('!!raw-loader!./sectioned-form/demo-address-form.component.ts')
},
{
name: 'demo-information-form.component.html',
// tslint:disable-next-line
fileContents: require('!!raw-loader!./sectioned-form/demo-information-form.component.html')
},
{
name: 'demo-information-form.component.ts',
// tslint:disable-next-line
fileContents: require('!!raw-loader!./sectioned-form/demo-information-form.component.ts')
},
{
name: 'demo-phone-form.component.html',
fileContents: require('!!raw-loader!./sectioned-form/demo-phone-form.component.html')
},
{
name: 'demo-phone-form.component.ts',
fileContents: require('!!raw-loader!./sectioned-form/demo-phone-form.component.ts')
}
];
}
},
{
name: 'Sort',
icon: 'sort',
Expand Down
11 changes: 11 additions & 0 deletions src/app/components/sectioned-form/demo-address-form.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<div class="sky-emphasized" style="margin-bottom: 5px;">
<label>Home</label>
</div>
<div>410 17th Street</div>
<div>Denver, CO 80202-4402</div>

<div class="sky-emphasized" style="margin: 5px 0 5px 0;">
<label>Vacation</label>
</div>
<div>3345 Franciscan Way</div>
<div>Tampa, FL 10255-0098</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Component } from '@angular/core';

@Component({
selector: 'sky-demo-address-form',
templateUrl: './demo-address-form.component.html'
})
export class SkyDemoAddressFormComponent {}
Loading