Upgrade to Pro — share decks privately, control downloads, hide ads and more …

It's "just" a string - Learnings from building ...

It's "just" a string - Learnings from building a component library

#ngde2019
Thomas Pink @thpnk and Fabian Friedl @fabian_friedl

Avatar for Fabian Friedl

Fabian Friedl

August 31, 2019
Tweet

Other Decks in Programming

Transcript

  1. The Dynatrace component library is used by 300+ Developers in

    multiple apps, teams and locations around the globe.
  2. We want to provide high quality, easy to use and

    consistent components that scale.
  3. Real world component libraries at scale Katrin Freihofner & Stefan

    Baumgartner j.mp/component-libraries-at-scale
  4. <dt-card title="Until it's not <strong>just</strong> a string"></dt-card> <dt-card title="Some very

    cool title that is just a string"></dt-card> Project management UX requirements
  5. <dt-select [(value)]="selectedValue"> <dt-option value="">--Please choose an option--</dt-option> <dt-option value="Americano">Americano</dt-option> <dt-option

    value="Caffé Latte">Caffé Latte</dt-option> <dt-option value="Caffé macchiato">Caffé macchiato</dt-option> <dt-option value="Cappuccino ">Cappuccino</dt-option> <dt-option value="Espresso">Espresso</dt-option> </dt-select> <select> <option value="">--Please choose an option--</option> <option value="Americano">Americano</option> <option value="Caffé Latte">Caffé Latte</option> <option value="Caffé macchiato">Caffé macchiato</option> <option value="Cappuccino ">Cappuccino</option> <option value="Espresso">Espresso</option> </select>
  6. <dt-select [(value)]="selectedValue"> <dt-option value="">--Please choose an option--</dt-option> <dt-option value="Americano">Americano</dt-option> <dt-option

    value="Caffé Latte">Caffé Latte</dt-option> <dt-option value="Caffé macchiato">Caffé macchiato</dt-option> <dt-option value="Cappuccino ">Cappuccino</dt-option> <dt-option value="Espresso">Espresso</dt-option> </dt-select> <mat-select [(value)]="selectedValue"> <mat-option value="">--Please choose an option--</mat-option> <mat-option value="Americano">Americano</mat-option> <mat-option value="Caffé Latte">Caffé Latte</mat-option> <mat-option value="Caffé macchiato">Caffé macchi</mat-option> <mat-option value="Cappuccino ">Cappuccino</mat-option> <mat-option value="Espresso">Espresso</mat-option> </mat-select>
  7. <dt-card> <dt-card-title>L-W8-64-APMDay3</dt-card-title> <dt-card-subtitle>Linux (x84, 64bit)</dt-card-subtitle> Network traffic </dt-card> <dt-tile> <dt-tile-icon>

    <dt-icon name="agent"></dt-icon> </dt-tile-icon> <dt-tile-title>L-W8-64-APMDay3</dt-tile-title> <dt-tile-subtitle>Linux (x84, 64bit)</dt-tile-subtitle> Network traffic </dt-tile>
  8. options = [{ value: 1, label: 'first'}, { value: 2,

    label: 'second'}]; <dt-select> <dt-option *ngFor="let option of options” [value]=“option.value"> {{option.label}} </dt-option> </dt-select> <dt-select [options]="options"></dt-select> ✕ ✓
  9. @Component({ selector: 'dt-select' }) export class DtSelect {} @Component({ selector:

    ‘dt-filter-field' }) export class DtFilterField {} <div class="dt-filter-field-panel"> <input dtInput [value]="filterValue" /> </div>
  10. /** Wether the inline editor is required */ @Input() get

    required(): boolean { return this._required; } set required(value: boolean) { this._required = coerceBooleanProperty(value); } /** @internal Wether the input is focused or not */ _inputFocused = false; private _destroy$ = new Subject<void>();
  11. /** * Title of the cta card. * * @deprecated

    Use `<dt-empty-state>` in combination with * `<dt-card>` instead. * @breaking-change To be removed with 6.0.0. */ @Directive({ selector: 'dt-cta-card-title', exportAs: 'dtCtaCardTitle', host: { class: 'dt-cta-card-title', }, }) export class DtCtaCardTitle {}
  12. <dt-card> <dt-card-subtitle>Some subtitle</dt-card-subtitle> <dt-card-title-actions> <button dt-button variant="secondary">Add to dashboard</button> <button

    dt-button variant="secondary">Edit</button> </dt-card-title-actions> The card is not an interactive element, therefore there are no hover, active or disabled states. </dt-card>