Skip to content

Commit

Permalink
fix: (Platform) add tooltip to the components (#3785)
Browse files Browse the repository at this point in the history
* platform tool tip adding

platform tool tip adding

* update the tooltip in paltform

update the tooltip in paltform

* adding title to the examples to add tooltip

adding title to the examples to add tooltip

* fixing accessability broken changes

fixing accessability broken changes
  • Loading branch information
Lokanathan-k committed Nov 10, 2020
1 parent b43484b commit 1ee2824
Show file tree
Hide file tree
Showing 23 changed files with 294 additions and 125 deletions.
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
<fdp-info-label [type]="'numeric'" [color]="'2'" [ariaLabel]="'Aria Label sample'">Aria Label</fdp-info-label>
<br>
<br>
<fdp-info-label
type="numeric"
color="2"
ariaLabel="Aria Label sample"
label="Aria Label"
title="Aria Label sample"
></fdp-info-label>
<br />
<br />
<table id="student">
<tr>
<th id="name">Name</th>
<th>Grade</th>
<th id="status">Status</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>B</td>
<td>
<fdp-info-label [type]="'numeric'" [color]="'2'" [ariaLabelledBy]="'name status'">
Success
</fdp-info-label>
</td>
</tr>
</table>
<tr>
<th id="name">Name</th>
<th>Grade</th>
<th id="status">Status</th>
</tr>
<tr>
<td>Alfreds Futterkiste</td>
<td>B</td>
<td>
<fdp-info-label
type="numeric"
color="2"
ariaLabelledBy="name status"
title="Success"
label="Success"
></fdp-info-label>
</td>
</tr>
</table>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<fdp-info-label>Default Label</fdp-info-label>
<fdp-info-label title="Default Label" label="Default Label"></fdp-info-label>
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Component, OnInit } from '@angular/core';
import { Component } from '@angular/core';

@Component({
selector: 'fdp-platform-info-label-example',
templateUrl: './platform-info-label-example.component.html'
selector: 'fdp-platform-info-label-example',
templateUrl: './platform-info-label-example.component.html'
})
export class PlatformInfoLabelExampleComponent {}

Expand All @@ -24,7 +24,6 @@ export class PlatformInfoLableTextIconExampleComponent {}
})
export class PlatformInfoLableNumericIconExampleComponent {}


@Component({
selector: 'fdp-platform-info-label-aria-label-example',
templateUrl: './platform-info-label-aria-label-example.component.html',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<fdp-info-label [type]="'numeric'" [color]="'2'" style="margin-right: 20px;">6</fdp-info-label>
<fdp-info-label [type]="'numeric'" [color]="'2'" style="margin-right: 20px;">42k</fdp-info-label>
<fdp-info-label [type]="'numeric'" [color]="'2'" style="margin-right: 20px;">14.7</fdp-info-label>
<fdp-info-label [type]="'icon'" [color]="'5'" [glyph]="'hide'" style="margin-right: 20px;"></fdp-info-label>
<fdp-info-label type="numeric" color="2" label="6" style="margin-right: 20px" title="6"></fdp-info-label>
<fdp-info-label type="numeric" color="2" label="42k" style="margin-right: 20px" title="42k"></fdp-info-label>
<fdp-info-label type="numeric" color="2" label="14.7" style="margin-right: 20px" title="14.7"></fdp-info-label>
<fdp-info-label type="icon" color="5" glyph="hide" title="hide" style="margin-right: 20px"></fdp-info-label>
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<div style="margin-top: 10px;" *ngFor="let item of [1,2,3,4,5,6,7,8,9,10]">
<fdp-info-label [type]="'icon'" [color]="item" [glyph]="'hide'">info label</fdp-info-label>
</div>
<div style="margin-top: 10px" *ngFor="let item of [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]">
<fdp-info-label
type="icon"
[color]="item"
glyph="hide"
title="Info Label text and Icon"
label="Info label"
></fdp-info-label>
</div>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<div style="margin-top: 10px;" *ngFor="let item of [1,2,3,4,5,6,7,8,9,10]">
<fdp-info-label [color]="item">Info Label</fdp-info-label>
<div style="margin-top: 10px" *ngFor="let item of ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']">
<fdp-info-label [color]="item" title="Info Label text only" label="Info Label"></fdp-info-label>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
<fdp-object-marker glyph="add-favorite" ariaHidden="true" ariaLabel="favorite only icon"></fdp-object-marker>
<fdp-object-marker glyph="flag" ariaHidden="true" ariaLabel="Flag only icon"></fdp-object-marker>
<fdp-object-marker glyph="request" ariaHidden="true" ariaLabel="Request only icon"></fdp-object-marker>
<fdp-object-marker glyph="user-edit" ariaHidden="true" ariaLabel="Editable only icon"></fdp-object-marker>
<fdp-object-marker glyph="private" ariaHidden="true" ariaLabel="Private Icon only icon"></fdp-object-marker>
<fdp-object-marker
glyph="add-favorite"
ariaHidden="true"
ariaLabel="favorite only icon"
title="Favourite"
></fdp-object-marker>
<fdp-object-marker glyph="flag" ariaHidden="true" ariaLabel="Flag only icon" title="Flag"></fdp-object-marker>
<fdp-object-marker glyph="request" ariaHidden="true" ariaLabel="Request only icon" title="Request"></fdp-object-marker>
<fdp-object-marker
glyph="user-edit"
ariaHidden="true"
ariaLabel="Editable only icon"
title="Editable"
></fdp-object-marker>
<fdp-object-marker
glyph="private"
ariaHidden="true"
ariaLabel="Private Icon only icon"
title="Private"
></fdp-object-marker>
Original file line number Diff line number Diff line change
@@ -1,20 +1,44 @@
<fdp-object-status status="negative" glyph="status-negative" clickable="true" (click)="showObjectStatus()"
>Negative</fdp-object-status
>
<fdp-object-status status="critical" glyph="status-critical" clickable="true" (click)="showObjectStatus()"
>Critical</fdp-object-status
>
<fdp-object-status status="positive" glyph="status-positive" clickable="true" (click)="showObjectStatus()"
>Positive</fdp-object-status
>
<fdp-object-status status="informative" glyph="hint" clickable="true" (click)="showObjectStatus()"
>Informative</fdp-object-status
>
<fdp-object-status glyph="to-be-reviewed" clickable="true" (click)="showObjectStatus()">Default</fdp-object-status>
<fdp-object-status
status="negative"
glyph="status-negative"
clickable="true"
(click)="showObjectStatus()"
label="Negative"
></fdp-object-status>
<fdp-object-status
status="critical"
glyph="status-critical"
clickable="true"
(click)="showObjectStatus()"
label="Critical"
></fdp-object-status>
<fdp-object-status
status="positive"
glyph="status-positive"
clickable="true"
(click)="showObjectStatus()"
label="Positive"
></fdp-object-status>
<fdp-object-status
status="informative"
glyph="hint"
clickable="true"
(click)="showObjectStatus()"
label="Informative"
></fdp-object-status>
<fdp-object-status
glyph="to-be-reviewed"
clickable="true"
(click)="showObjectStatus()"
label="Default"
></fdp-object-status>
<br />
<br />
<ng-container *ngFor="let item of [1, 2, 3, 4, 5, 6, 7, 8]">
<fdp-object-status indicationColor="{{ item }}" clickable="true" (click)="showAlert(item)"
>Indication Color {{ item }}</fdp-object-status
>
<fdp-object-status
indicationColor="{{ item }}"
clickable="true"
(click)="showAlert(item)"
label="Indication Color {{ item }}"
></fdp-object-status>
</ng-container>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<fdp-object-status glyph="hide">Object Status</fdp-object-status>
<fdp-object-status glyph="hide" title="Default status" label="Object Status"></fdp-object-status>
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<ng-container *ngFor="let item of [1, 2, 3, 4, 5, 6, 7, 8]">
<fdp-object-status indicationColor="{{ item }}">Indication Color {{ item }}</fdp-object-status>
<fdp-object-status indicationColor="{{ item }}" label="Indication Color{{ item }}"></fdp-object-status>
</ng-container>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<fdp-object-status status="negative" glyph="status-negative">Negative</fdp-object-status>
<fdp-object-status status="critical" glyph="status-critical">Critical</fdp-object-status>
<fdp-object-status status="positive" glyph="status-positive">Positive</fdp-object-status>
<fdp-object-status status="informative" glyph="hint">Informative</fdp-object-status>
<fdp-object-status glyph="to-be-reviewed">Default</fdp-object-status>
<fdp-object-status status="negative" glyph="status-negative" label="Negative" title="Negative"></fdp-object-status>
<fdp-object-status status="critical" glyph="status-critical" label="Critical" title="Critical"></fdp-object-status>
<fdp-object-status status="positive" glyph="status-positive" label="Positive" title="Positive"></fdp-object-status>
<fdp-object-status status="informative" glyph="hint" label="Informative" title="Informative"></fdp-object-status>
<fdp-object-status glyph="to-be-reviewed" label="Default" title="Default"></fdp-object-status>
Original file line number Diff line number Diff line change
@@ -1,24 +1,39 @@
<fdp-object-status status="negative" glyph="status-negative" inverted="true"></fdp-object-status>
<fdp-object-status status="critical" glyph="status-critical" inverted="true"></fdp-object-status>
<fdp-object-status status="positive" glyph="status-positive" inverted="true"></fdp-object-status>
<fdp-object-status status="informative" glyph="hint" inverted="true"></fdp-object-status>
<fdp-object-status glyph="to-be-reviewed" inverted="true"></fdp-object-status>
<fdp-object-status
status="negative"
glyph="status-negative"
inverted="true"
title="Status Negative"
></fdp-object-status>
<fdp-object-status
status="critical"
glyph="status-critical"
inverted="true"
title="Status Critical"
></fdp-object-status>
<fdp-object-status
status="positive"
glyph="status-positive"
inverted="true"
title="Status Positive"
></fdp-object-status>
<fdp-object-status status="informative" glyph="hint" inverted="true" title="Status Informative"></fdp-object-status>
<fdp-object-status glyph="to-be-reviewed" inverted="true" title="Status Reviewed"></fdp-object-status>

<br /><br />

<fdp-object-status status="negative" inverted="true">Negative</fdp-object-status>
<fdp-object-status status="critical" inverted="true">Critical</fdp-object-status>
<fdp-object-status status="positive" inverted="true">Positive</fdp-object-status>
<fdp-object-status status="informative" inverted="true">Informative</fdp-object-status>
<fdp-object-status inverted="true">Default</fdp-object-status>
<fdp-object-status status="negative" inverted="true" label="Negative"></fdp-object-status>
<fdp-object-status status="critical" inverted="true" label="Critical"></fdp-object-status>
<fdp-object-status status="positive" inverted="true" label="Positive"></fdp-object-status>
<fdp-object-status status="informative" inverted="true" label="Informative"></fdp-object-status>
<fdp-object-status inverted="true" label="Default"></fdp-object-status>

<br /><br />

<fdp-object-status status="negative" inverted="true">5</fdp-object-status>
<fdp-object-status status="critical" inverted="true">20</fdp-object-status>
<fdp-object-status status="positive" inverted="true">2.99</fdp-object-status>
<fdp-object-status status="informative" inverted="true">10</fdp-object-status>
<fdp-object-status inverted="true">99+</fdp-object-status>
<fdp-object-status status="negative" inverted="true" title="5" label="5"></fdp-object-status>
<fdp-object-status status="critical" inverted="true" title="20" label="20"></fdp-object-status>
<fdp-object-status status="positive" inverted="true" title="2.99" label="2.99"></fdp-object-status>
<fdp-object-status status="informative" inverted="true" title="10" label="10"></fdp-object-status>
<fdp-object-status inverted="true" title="99+" label="99+"></fdp-object-status>

<br /><br />

Expand All @@ -30,14 +45,32 @@

<br /><br />

<fdp-object-status status="negative" glyph="status-negative" clickable="true" inverted="true"
>Negative</fdp-object-status
>
<fdp-object-status status="critical" glyph="status-critical" clickable="true" inverted="true"
>Critical</fdp-object-status
>
<fdp-object-status status="positive" glyph="status-positive" clickable="true" inverted="true"
>Positive</fdp-object-status
>
<fdp-object-status status="informative" glyph="hint" clickable="true" inverted="true">Informative</fdp-object-status>
<fdp-object-status glyph="to-be-reviewed" clickable="true" inverted="true">Default</fdp-object-status>
<fdp-object-status
status="negative"
glyph="status-negative"
clickable="true"
inverted="true"
label="Negative"
></fdp-object-status>
<fdp-object-status
status="critical"
glyph="status-critical"
clickable="true"
inverted="true"
label="Critical"
></fdp-object-status>
<fdp-object-status
status="positive"
glyph="status-positive"
clickable="true"
inverted="true"
label="Positive"
></fdp-object-status>
<fdp-object-status
status="informative"
glyph="hint"
clickable="true"
inverted="true"
label="Informative"
></fdp-object-status>
<fdp-object-status glyph="to-be-reviewed" clickable="true" inverted="true" label="Default"></fdp-object-status>
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<ng-container *ngFor="let item of [1, 2, 3, 4, 5, 6, 7, 8]">
<fdp-object-status indicationColor="{{ item }}" [clickable]="true" [inverted]="true"
>Indication Color {{ item }}</fdp-object-status
>
<fdp-object-status
indicationColor="{{ item }}"
[clickable]="true"
[inverted]="true"
label="Indication Color {{ item }}"
></fdp-object-status>
</ng-container>

0 comments on commit 1ee2824

Please sign in to comment.