From 8d981dbd4fccc2a9d7052551873d6b681ce21a41 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 5 Oct 2018 17:06:28 +0200 Subject: [PATCH] refactor(schematics): better margin for drag-drop schematic * Improves the margin of the drag-drop schematic containers. Since the component does not have any inner padding, the containers would show up at the edge of the page. This happens if someone just runs `ng add @angular/cdk` and `ng g @angular/cdk:drag-drop myComponent`. * Indents wrapped attributes in HTML template files. The goal of the schematics should be also to generate resources that can be used for learning. Right now it's not 100% clear where the child element starts (see: https://google.github.io/styleguide/htmlcssguide.html#HTML_Line-Wrapping) --- .../__name@dasherize__.component.__styleext__ | 2 +- .../__name@dasherize__.component.html | 11 ++++------- .../__name@dasherize__.component.html | 8 ++++---- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/cdk/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ b/src/cdk/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ index 23d2d43c874b..5b31cd8a60b4 100644 --- a/src/cdk/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ +++ b/src/cdk/schematics/ng-generate/drag-drop/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.__styleext__ @@ -1,7 +1,7 @@ .container { width: 400px; max-width: 100%; - margin: 0 25px 25px 0; + margin: 0 20px; display: inline-block; vertical-align: top; } diff --git a/src/lib/schematics/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html b/src/lib/schematics/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html index fb1893dcb1fc..8fa0b5e6df82 100644 --- a/src/lib/schematics/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +++ b/src/lib/schematics/nav/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html @@ -1,11 +1,8 @@ - + Menu Link 1 diff --git a/src/lib/schematics/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html b/src/lib/schematics/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html index e18f4fdec106..20c4502525eb 100644 --- a/src/lib/schematics/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html +++ b/src/lib/schematics/table/files/__path__/__name@dasherize@if-flat__/__name@dasherize__.component.html @@ -17,9 +17,9 @@ + [length]="dataSource.data.length" + [pageIndex]="0" + [pageSize]="50" + [pageSizeOptions]="[25, 50, 100, 250]">