Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: (Core) unify the naming of the cozy property #3662

Merged
merged 1 commit into from
Oct 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
Default Bar
</fd-docs-section-title>
<description>
The default mode of the Bar component is Desktop. For Tablet and Mobile use the Cosy mode by adding
<code>[cosy]="true"</code> to <code>fd-bar</code>
The default mode of the Bar component is Desktop. For Tablet and Mobile use the Cozy mode by adding
<code>[cozy]="true"</code> to <code>fd-bar</code>
</description>

<component-example>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<description
>The Bar component is a container that holds titles, buttons and input controls. Its content is distributed in three
areas - left, middle and right. The Bar has 2 modes - <code>Desktop (default)</code> and
<code>Tablet/Mobile (cosy)</code>.</description
<code>Tablet/Mobile (cozy)</code>.</description
>
<import module="barModule"></import>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
</fd-popover-control>
<fd-popover-body>
<div fd-popover-body-header>
<div fd-bar [cosy]="true">
<div fd-bar [cozy]="true">
<div fd-bar-left>
<fd-bar-element>Cosy Header</fd-bar-element>
<fd-bar-element>Cozy Header</fd-bar-element>
</div>
</div>
</div>
Expand All @@ -38,9 +38,9 @@
</fd-popover-control>
<fd-popover-body>
<div fd-popover-body-header>
<div fd-bar [cosy]="true">
<div fd-bar [cozy]="true">
<div fd-bar-left>
<fd-bar-element>Cosy Header</fd-bar-element>
<fd-bar-element>Cozy Header</fd-bar-element>
</div>
</div>
</div>
Expand All @@ -50,7 +50,7 @@
</li>
</ul>
<div fd-popover-body-footer>
<div fd-bar [barDesign]="'footer'" [cosy]="true">
<div fd-bar [barDesign]="'footer'" [cozy]="true">
<div fd-bar-right>
<fd-bar-element>
<button fd-button label="Save" [fdType]="'emphasized'" [compact]="true"></button>
Expand All @@ -70,12 +70,12 @@
</fd-popover-control>
<fd-popover-body>
<div fd-popover-body-header>
<div fd-bar [barDesign]="'header-with-subheader'" [cosy]="true">
<div fd-bar [barDesign]="'header-with-subheader'" [cozy]="true">
<div fd-bar-left>
<fd-bar-element>Cosy Header</fd-bar-element>
<fd-bar-element>Cozy Header</fd-bar-element>
</div>
</div>
<div fd-bar [barDesign]="'subheader'" [cosy]="true">
<div fd-bar [barDesign]="'subheader'" [cozy]="true">
<div fd-bar-middle>
<fd-bar-element>Cozy Subheader</fd-bar-element>
</div>
Expand All @@ -89,7 +89,7 @@
</ul>

<div fd-popover-body-footer>
<div fd-bar [barDesign]="'footer'" [cosy]="true">
<div fd-bar [barDesign]="'footer'" [cozy]="true">
<div fd-bar-right>
<fd-bar-element>
<button fd-button fdType="emphasized" label="Save" [compact]="true"></button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@
</fd-popover-control>
<fd-popover-body *ngIf="list1 && list1.length">
<div fd-popover-body-header>
<div fd-bar [barDesign]="'header-with-subheader'" [cosy]="true">
<div fd-bar [barDesign]="'header-with-subheader'" [cozy]="true">
<div fd-bar-left>
<fd-bar-element>Cosy Header</fd-bar-element>
<fd-bar-element>Cozy Header</fd-bar-element>
</div>
</div>
<div fd-bar [barDesign]="'subheader'" [cosy]="true">
<div fd-bar [barDesign]="'subheader'" [cozy]="true">
<div fd-bar-middle>
<fd-bar-element [fullWidth]="true"
>SubHeader Middle section with Full Width Element
Expand All @@ -79,7 +79,7 @@
</li>
</ul>
<div fd-popover-body-footer>
<div fd-bar [barDesign]="'footer'" [cosy]="true">
<div fd-bar [barDesign]="'footer'" [cozy]="true">
<div fd-bar-right>
<fd-bar-element>
<button fd-button label="Save" [fdType]="'emphasized'" [compact]="true"></button>
Expand Down
8 changes: 4 additions & 4 deletions libs/core/src/lib/bar/bar.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type BarDesignType = 'header' | 'subheader' | 'header-with-subheader' | '
/**
* The Bar component is a container that holds titles, buttons and input controls.
* Its content is distributed in three areas - left, middle and right.
* The Bar has 2 modes - Desktop (default) and Tablet/Mobile (cosy).
* The Bar has 2 modes - Desktop (default) and Tablet/Mobile (cozy).
*/
@Component({
// tslint:disable-next-line:component-selector
Expand Down Expand Up @@ -50,9 +50,9 @@ export class BarComponent implements OnChanges, OnInit, CssClassBuilder {
@Input()
size: SizeType = '';

/** Whether to apply cosy mode to the Bar. */
/** Whether to apply cozy mode to the Bar. */
@Input()
cosy: boolean;
cozy: boolean;

/** @hidden */
constructor(private _elementRef: ElementRef) {}
Expand All @@ -75,7 +75,7 @@ export class BarComponent implements OnChanges, OnInit, CssClassBuilder {
buildComponentCssClass(): string[] {
return [
'fd-bar',
this.cosy ? 'fd-bar--cozy' : '',
this.cozy ? 'fd-bar--cozy' : '',
this.barDesign ? `fd-bar--${this.barDesign}` : '',
this.inPage && !this.size ? 'fd-bar--page' : '',
this.inPage && this.size ? `fd-bar--page-${this.size}` : '',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
></fd-time>
</div>
<div fd-popover-body-footer *ngIf="showFooter">
<div fd-bar barDesign="footer" [cosy]="!compact">
<div fd-bar barDesign="footer" [cozy]="!compact">
<div fd-bar-right>
<fd-bar-element>
<button fd-button fdType="emphasized" label="Submit" [compact]="compact" (click)="submit()"></button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<footer fd-bar class="fd-dialog__footer" barDesign="footer" [cosy]="dialogConfig.mobile">
<footer fd-bar class="fd-dialog__footer" barDesign="footer" [cozy]="dialogConfig.mobile">
<ng-container *ngTemplateOutlet="footerTemplate ? footerTemplate : defaultTemplate"></ng-container>

<ng-template #defaultTemplate>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<header
fd-bar
[cosy]="dialogConfig.mobile"
[cozy]="dialogConfig.mobile"
[class]="'fd-dialog__header'"
[barDesign]="subHeaderTemplate ? 'header-with-subheader' : 'header'"
>
Expand All @@ -20,6 +20,6 @@
</ng-template>
</header>

<div fd-bar *ngIf="subHeaderTemplate" class="fd-dialog__subheader" barDesign="subheader" [cosy]="dialogConfig.mobile">
<div fd-bar *ngIf="subHeaderTemplate" class="fd-dialog__subheader" barDesign="subheader" [cozy]="dialogConfig.mobile">
<ng-container *ngTemplateOutlet="subHeaderTemplate"></ng-container>
</div>
4 changes: 2 additions & 2 deletions src/stories/bar/fd-bar.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const Bar = () => ({
<div style="padding:20px;">
<div fd-bar
[barDesign]="barDesignVar"
[cosy]="cosy"
[cozy]="cozy"
[inHomePage]="inHomePage"
[inPage]="inPage"
[size]="size">
Expand Down Expand Up @@ -82,7 +82,7 @@ export const Bar = () => ({
</div>
`,
props: {
cosy: boolean('cosy', false),
cozy: boolean('cozy', false),
showLeft: boolean('Show Left Section', true),
showRight: boolean('Show Right Section', true),
showMiddle: boolean('Show Middle Section', true),
Expand Down