Skip to content

Commit 1598bfd

Browse files
authored
Users/benfeely/docs perf (#4)
* Fix bug in import. * Add some margin below triangle. * Updates to triangles to support user controlled size. * Updates to the rendering style, showing content. * Extra fix. * Done updating performance profiles. * Add dot-count to the triangles. * Toggle profile images zoomed and not. * Improve the layout a bit for fabric component docs. * Fix format for output under buttons. * Switching from Material to Semantic UI for demo. There is already an Angular version for Material, so not much point of enabling Material React components in Angular. * Add basic support for Semantic UI button.
1 parent 2bfafcc commit 1598bfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+628
-197
lines changed

.angular-cli.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@
9999
"tags": []
100100
},
101101
{
102-
"name": "material",
102+
"name": "semantic-ui",
103103
"appRoot": "",
104-
"root": "libs/material/src",
104+
"root": "libs/semantic-ui/src",
105105
"test": "../../../test.js",
106106
"tags": []
107107
},

apps/demo/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ import { NgModule } from '@angular/core';
22
import { NxModule } from '@nrwl/nx';
33

44
import { AngularReactBrowserModule } from '@angular-react/core';
5-
import { FabButtonComponent, FabDialogModule } from '@angular-react/fabric';
5+
import { FabDialogModule, FabButtonModule } from '@angular-react/fabric';
66
import { AppComponent } from './app.component';
77

88

99
@NgModule({
10-
imports: [AngularReactBrowserModule, NxModule.forRoot(), FabButtonComponent, FabDialogModule],
10+
imports: [AngularReactBrowserModule, NxModule.forRoot(), FabButtonModule, FabDialogModule],
1111
declarations: [AppComponent],
1212
bootstrap: [AppComponent]
1313
})

apps/docs/src/app/app-routing.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
DocsComponent,
88
FabricComponent,
99
LandingComponent,
10-
MaterialComponent,
10+
SemanticUiComponent,
1111
MixedPerfComponent,
1212
PerformanceComponent,
1313
ProfilesComponent,
@@ -26,7 +26,7 @@ const routes: Routes = [
2626
{ path: 'components', component: ComponentDocsComponent, children: [
2727
{ path: '', redirectTo: 'fabric', pathMatch: 'full' },
2828
{ path: 'fabric', component: FabricComponent },
29-
{ path: 'material', component: MaterialComponent },
29+
{ path: 'semantic-ui', component: SemanticUiComponent },
3030
] },
3131
{ path: 'docs', component: DocsComponent },
3232
];

apps/docs/src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { AppRoutingModule } from './app-routing.module';
1313
import { ReactComponentsModule } from './react-components';
1414
import { AppComponent } from './app.component';
1515
import { FabricModule } from './fabric.module';
16+
import { SemanticModule } from './semantic.module';
1617

1718

1819
@NgModule({
@@ -23,6 +24,7 @@ import { FabricModule } from './fabric.module';
2324
BrowserAnimationsModule,
2425
MaterialModule,
2526
FabricModule,
27+
SemanticModule,
2628

2729
SharedModule,
2830
ReactComponentsModule,

apps/docs/src/app/components/components.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ import { IconsComponent } from './icons/icons.component';
1212
import { SubNavComponent } from './sub-nav/sub-nav.component';
1313
import { SharedModule } from '../shared';
1414
import { FabricModule } from '../fabric.module';
15+
import { PageHeaderComponent } from './page-header/page-header.component';
1516

1617

1718
const components = [
1819
DotComponent,
1920
IconsComponent,
2021
NavbarComponent,
22+
PageHeaderComponent,
2123
SubNavComponent,
2224
TriangleComponent,
2325
];

apps/docs/src/app/components/dot/dot.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[style.top]="y"
77
[style.color]="color"
88
[style.background-color]="backgroundColor"
9+
[style.font-size]="size"
910
(mouseenter)="onMouseEnter($event)"
1011
(mouseleave)="onMouseLeave($event)"
1112
>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<ng-content></ng-content>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
:host {
2+
display: flex;
3+
// flex-direction: row;
4+
// justify-content: last-baseline;
5+
6+
/deep/ {
7+
h1, h2, h3, h4, h5, h6 {
8+
display: inline-block;
9+
margin: 0;
10+
padding-bottom: 4px;
11+
margin-right: 10px;
12+
}
13+
14+
div {
15+
flex-grow: 1;
16+
}
17+
18+
button {
19+
margin-left: -8px;
20+
}
21+
}
22+
23+
}

apps/docs/src/app/containers/component-docs/material/material.component.spec.ts renamed to apps/docs/src/app/components/page-header/page-header.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { MaterialComponent } from './material.component';
3+
import { PageHeaderComponent } from './page-header.component';
44

5-
describe('MaterialComponent', () => {
6-
let component: MaterialComponent;
7-
let fixture: ComponentFixture<MaterialComponent>;
5+
describe('PageHeaderComponent', () => {
6+
let component: PageHeaderComponent;
7+
let fixture: ComponentFixture<PageHeaderComponent>;
88

99
beforeEach(async(() => {
1010
TestBed.configureTestingModule({
11-
declarations: [ MaterialComponent ]
11+
declarations: [ PageHeaderComponent ]
1212
})
1313
.compileComponents();
1414
}));
1515

1616
beforeEach(() => {
17-
fixture = TestBed.createComponent(MaterialComponent);
17+
fixture = TestBed.createComponent(PageHeaderComponent);
1818
component = fixture.componentInstance;
1919
fixture.detectChanges();
2020
});
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Component, OnInit } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app-page-header',
5+
templateUrl: './page-header.component.html',
6+
styleUrls: ['./page-header.component.scss']
7+
})
8+
export class PageHeaderComponent implements OnInit {
9+
10+
constructor() { }
11+
12+
ngOnInit() {
13+
}
14+
15+
}

0 commit comments

Comments
 (0)