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

feat(demos): add compared to WC section with samples to compare components #14813

Open
wants to merge 42 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
07b602f
feat(sample): add compared to WC section with samples to compare comp…
didimmova Sep 24, 2024
ce7524f
feat(demos): clear out samples a bit more
didimmova Sep 24, 2024
cc79985
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Sep 24, 2024
f8959c2
feat(demos): update wc slider and igc fab button
didimmova Sep 24, 2024
9e0dcbb
fix(demos): revert igc fab button
didimmova Sep 24, 2024
d940c96
feat(demos): make igc components have igc components slotted in them
didimmova Sep 25, 2024
90c5434
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Sep 26, 2024
cba8da9
feat(demos): slot igc items directly in chip demo
didimmova Oct 1, 2024
192d5da
Merge branch 'master' into didimmova/angular-v-wc-samples
simeonoff Oct 1, 2024
8575910
demos(properties-panel): add initial spec file
simeonoff Oct 1, 2024
6a48e03
feat(properties-panel): add properties panel component
didimmova Oct 3, 2024
dc1e77d
feat(properties-panel): update template and ts file
didimmova Oct 8, 2024
5af8767
feat(properties-panel): make propertyChangeService and wrap the panel…
didimmova Oct 9, 2024
1f23f84
feat(property-panel): create service for event handling, use navdrawe…
didimmova Oct 11, 2024
f751d25
Merge pull request #14908 from IgniteUI/didimmova/property-panel
didimmova Oct 11, 2024
3a0411f
gc -m "feat(property-panel): enable adding custom controls"
didimmova Oct 16, 2024
48d4934
Merge pull request #14898 from IgniteUI/didimmova/property-panel-navd…
didimmova Oct 16, 2024
4d11622
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Oct 16, 2024
9cfe510
feat(demos): update mapping values and pageHeading
didimmova Oct 16, 2024
3e0f621
fix(badge): update badge sample
didimmova Oct 16, 2024
345d06a
feat(demos): add properties panel to carousel and chips demos
didimmova Oct 16, 2024
9612434
feat(dialog/dropdown/exp-panel): add properties panel
didimmova Oct 17, 2024
e5d89ce
feat(demos): separate inputs sample and add properties panel
didimmova Oct 17, 2024
5922fe2
feat(slider): add properties panel to slider sample
didimmova Oct 17, 2024
eff6286
feat(demos): update properties panel and add it to other components
didimmova Oct 22, 2024
1d14db4
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Oct 22, 2024
b5cdda3
feat(input-group): remove unnecessary imports from sample
didimmova Oct 22, 2024
88340b4
feat(progressbars): add progressbars samples
didimmova Oct 22, 2024
2651a1e
fix(button-group-demo): reverse ang vs wc selection functions
didimmova Oct 23, 2024
652ef7f
feat(demos): finish properties panel integration to samples
didimmova Oct 25, 2024
2e769fd
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Oct 25, 2024
ba46162
feat(properties-panel): use async pipe
didimmova Oct 28, 2024
0603944
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Oct 28, 2024
899d683
demos(properties-panel): fix NG0100 errors
simeonoff Oct 28, 2024
0767094
feat(demos): update getting properties and setting the config in cons…
didimmova Oct 29, 2024
4b1b0da
feat(demos): add aditional demos
didimmova Oct 31, 2024
abf38f4
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Nov 4, 2024
5b42c59
feat(samples): add new samples
didimmova Nov 4, 2024
8c9f380
feat(demos): add additional samples
didimmova Nov 11, 2024
ee092b9
demos(list): update list demo
didimmova Nov 11, 2024
cfd4675
Merge branch 'master' into didimmova/angular-v-wc-samples
didimmova Nov 11, 2024
18c2023
fix(demos): remove nav closing tag
didimmova Nov 11, 2024
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
93 changes: 93 additions & 0 deletions src/app/accordion-showcase/accordion-showcase.sample.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<h3 class="sample-title">Angular Accordion</h3>
<igx-accordion #accordion id="igx-accordion">
<igx-expansion-panel>
<igx-expansion-panel-header>
<igx-expansion-panel-title>HTML5</igx-expansion-panel-title>
</igx-expansion-panel-header>
<igx-expansion-panel-body>
<igx-accordion>
<igx-expansion-panel>
<igx-expansion-panel-header>
<igx-expansion-panel-title>First</igx-expansion-panel-title>
</igx-expansion-panel-header>
<igx-expansion-panel-body>
<div>
Content1
</div>
</igx-expansion-panel-body>
</igx-expansion-panel>
<igx-expansion-panel>
<igx-expansion-panel-header>
<igx-expansion-panel-title>Second</igx-expansion-panel-title>
</igx-expansion-panel-header>
<igx-expansion-panel-body>
<div>
Content2
</div>
</igx-expansion-panel-body>
</igx-expansion-panel>
</igx-accordion>
</igx-expansion-panel-body>
</igx-expansion-panel>
<igx-expansion-panel>
<igx-expansion-panel-header>
<igx-expansion-panel-title>CSS3</igx-expansion-panel-title>
</igx-expansion-panel-header>
<igx-expansion-panel-body>
<div class="example-content">
Cascading Style Sheets (CSS) is a style sheet language used for
describing the presentation of a document written in a markup language
like HTML
</div>
</igx-expansion-panel-body>
</igx-expansion-panel>
<igx-expansion-panel>
<igx-expansion-panel-header>
<igx-expansion-panel-title>SASS/SCSS</igx-expansion-panel-title>
</igx-expansion-panel-header>
<igx-expansion-panel-body>
<div class="example-content">
Sass is a preprocessor scripting language that is interpreted or
compiled into Cascading Style Sheets (CSS).
</div>
</igx-expansion-panel-body>
</igx-expansion-panel>
</igx-accordion>

<h3 class="sample-title">WC Accordion</h3>
<igc-accordion #accordion>
<igc-expansion-panel class="my-expansion-panel" id="html5" [collapsed]="false">
<span slot="title">HTML5</span>
<div>
<igc-accordion>
<igc-expansion-panel>
<span slot="title">First</span>
<div>
Content1
</div>
</igc-expansion-panel>
<igc-expansion-panel>
<span slot="title">Second</span>
<div>
Content2
</div>
</igc-expansion-panel>
</igc-accordion>
</div>
</igc-expansion-panel>
<igc-expansion-panel class="my-expansion-panel" id="css" [collapsed]="true">
<span slot="title">CSS3</span>
<div class="example-content">
Cascading Style Sheets (CSS) is a style sheet language used for
describing the presentation of a document written in a markup language
like HTML
</div>
</igc-expansion-panel>
<igc-expansion-panel class="my-expansion-panel" class="my-expansion-panel" id="scss" [collapsed]="false">
<span slot="title">SASS/SCSS</span>
<div class="example-content">
Sass is a preprocessor scripting language that is interpreted or
compiled into Cascading Style Sheets (CSS).
</div>
</igc-expansion-panel>
</igc-accordion>
3 changes: 3 additions & 0 deletions src/app/accordion-showcase/accordion-showcase.sample.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#igx-accordion {
margin-bottom: 42px;
}
16 changes: 16 additions & 0 deletions src/app/accordion-showcase/accordion-showcase.sample.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { IGX_ACCORDION_DIRECTIVES } from 'igniteui-angular';
import { IgcAccordionComponent, IgcExpansionPanelComponent, defineComponents } from 'igniteui-webcomponents';

defineComponents(IgcAccordionComponent, IgcExpansionPanelComponent);

@Component({
selector: 'app-accordion-showcase-sample',
templateUrl: 'accordion-showcase.sample.html',
styleUrls: ['accordion-showcase.sample.scss'],
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [FormsModule, IGX_ACCORDION_DIRECTIVES]
})
export class AccordionShowcaseSampleComponent {}
31 changes: 27 additions & 4 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,18 @@
<!--Style guide-->
<span igxDrawerItem [isHeader]="true">Style</span>

<span *ngFor="let item of styleLinks" igxDrawerItem igxRipple routerLinkActive="igx-nav-drawer__item--active" routerLink="{{item.link}}">
<igx-icon>{{item.icon}}</igx-icon>
<span class="navdrawer-ellipsis">{{item.name}}</span>
</span>
<span *ngFor="let item of styleLinks" igxDrawerItem igxRipple routerLinkActive="igx-nav-drawer__item--active" routerLink="{{item.link}}">
<igx-icon>{{item.icon}}</igx-icon>
<span class="navdrawer-ellipsis">{{item.name}}</span>
</span>

<!--WC Comparisons-->
<span igxDrawerItem [isHeader]="true">Compared to WC</span>

<span *ngFor="let item of WcCompareLinks" igxDrawerItem igxRipple routerLinkActive="igx-nav-drawer__item--active" routerLink="{{item.link}}">
<igx-icon>{{item.icon}}</igx-icon>
<span class="navdrawer-ellipsis">{{item.name}}</span>
</span>
</ng-template>

<ng-template *ngIf="drawerState.miniVariant" igxDrawerMini>
Expand All @@ -56,6 +64,21 @@
</ng-template>
</igx-nav-drawer>

@let config = (propertyChangeService.panelConfig$ | async | keyvalue)?.length > 0;

<igx-nav-drawer
*ngIf="config"
#paneldrawer
[pin]="true"
position="right"
[isOpen]="config"
id="paneldrawer">

<ng-template igxDrawer>
<app-properties-panel></app-properties-panel>
</ng-template>
</igx-nav-drawer>

<div [style.paddingLeft]="drawerState.miniVariant && !drawerState.pin ? '60px' : null" class="content">
<app-page-header [title]="urlString"></app-page-header>
<div class="sample-wrapper">
Expand Down
4 changes: 4 additions & 0 deletions src/app/app.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
.test {
color: red;
}

#paneldrawer {
--igx-nav-drawer-size: 27rem;
}
165 changes: 161 additions & 4 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { Component, OnInit, ViewChild, HostBinding } from '@angular/core';
import { Component, OnInit, ViewChild, HostBinding, inject } from '@angular/core';
import { Router, NavigationStart, NavigationEnd, RouterLinkActive, RouterLink, RouterOutlet } from '@angular/router';
import { filter } from 'rxjs/operators';
import { IgxNavigationDrawerComponent, IgxIconService, IgxRippleDirective } from 'igniteui-angular';
import { PageHeaderComponent } from './pageHeading/pageHeading.component';
import { IgxIconComponent } from '../../projects/igniteui-angular/src/lib/icon/icon.component';
import { NgFor, NgIf } from '@angular/common';
import { CommonModule } from '@angular/common';
import { IgxNavDrawerTemplateDirective, IgxNavDrawerItemDirective, IgxNavDrawerMiniTemplateDirective } from '../../projects/igniteui-angular/src/lib/navigation-drawer/navigation-drawer.directives';
import { PropertiesPanelComponent } from './properties-panel/properties-panel.component';
import { PropertyChangeService } from './properties-panel/property-change.service';

@Component({
selector: 'app-root',
Expand All @@ -16,15 +18,15 @@ import { IgxNavDrawerTemplateDirective, IgxNavDrawerItemDirective, IgxNavDrawerM
IgxNavigationDrawerComponent,
IgxNavDrawerTemplateDirective,
IgxNavDrawerItemDirective,
NgFor,
RouterLinkActive,
RouterLink,
IgxIconComponent,
NgIf,
CommonModule,
IgxNavDrawerMiniTemplateDirective,
PageHeaderComponent,
RouterOutlet,
IgxRippleDirective,
PropertiesPanelComponent
],
})
export class AppComponent implements OnInit {
Expand All @@ -34,6 +36,8 @@ export class AppComponent implements OnInit {
@ViewChild('navdrawer', { read: IgxNavigationDrawerComponent, static: true })
public navdrawer;

protected propertyChangeService = inject(PropertyChangeService);

public urlString: string;

public drawerState = {
Expand Down Expand Up @@ -698,6 +702,159 @@ export class AppComponent implements OnInit {
}
].sort((componentLink1, componentLink2) => componentLink1.name > componentLink2.name ? 1 : -1);

public WcCompareLinks = [
{
link: '/accordion-showcase',
icon: 'radio_button_unchecked',
name: 'Accordion'
},
{
link: '/avatar-showcase',
icon: 'radio_button_unchecked',
name: 'Avatar'
},
{
link: '/badge-showcase',
icon: 'radio_button_unchecked',
name: 'Badge'
},
{
link: '/banner-showcase',
icon: 'radio_button_unchecked',
name: 'Banner'
},
{
link: '/button-showcase',
icon: 'radio_button_unchecked',
name: 'Buttons'
},
{
link: '/buttonGroup-showcase',
icon: 'radio_button_unchecked',
name: 'Button Group'
},
{
link: '/calendar-showcase',
icon: 'radio_button_unchecked',
name: 'Calendar'
},
{
link: '/card-showcase',
icon: 'radio_button_unchecked',
name: 'Card'
},
{
link: '/carousel-showcase',
icon: 'radio_button_unchecked',
name: 'Carousel'
},
{
link: '/checkbox-showcase',
icon: 'radio_button_unchecked',
name: 'Checkbox'
},
{
link: '/chip-showcase',
icon: 'radio_button_unchecked',
name: 'Chips'
},
{
link: '/circular-progress-showcase',
icon: 'radio_button_unchecked',
name: 'Circular Progress'
},
{
link: '/combo-showcase',
icon: 'radio_button_unchecked',
name: 'Combo'
},
{
link: '/datePicker-showcase',
icon: 'radio_button_unchecked',
name: 'Date Picker'
},
{
link: '/dialog-showcase',
icon: 'radio_button_unchecked',
name: 'Dialog'
},
{
link: '/dropDown-showcase',
icon: 'radio_button_unchecked',
name: 'DropDown'
},
{
link: '/expansionPanel-showcase',
icon: 'radio_button_unchecked',
name: 'Expansion Panel'
},
{
link: '/icon-button-showcase',
icon: 'radio_button_unchecked',
name: 'Icon Button'
},
{
link: '/input-group-showcase',
icon: 'radio_button_unchecked',
name: 'Input Group'
},
{
link: '/list-showcase',
icon: 'radio_button_unchecked',
name: 'List'
},
{
link: '/linear-progress',
icon: 'radio_button_unchecked',
name: 'Linear Progress'
},
{
link: '/radio-showcase',
icon: 'radio_button_unchecked',
name: 'Radio'
},
{
link: '/select-showcase',
icon: 'radio_button_unchecked',
name: 'Select'
},
{
link: '/slider-showcase',
icon: 'radio_button_unchecked',
name: 'Slider'
},
{
link: '/snackbar-showcase',
icon: 'radio_button_unchecked',
name: 'Snackbar'
},
{
link: '/stepper-showcase',
icon: 'radio_button_unchecked',
name: 'Stepper'
},
{
link: '/switch-showcase',
icon: 'radio_button_unchecked',
name: 'Switch'
},
{
link: '/tabs-showcase',
icon: 'radio_button_unchecked',
name: 'Tabs'
},
{
link: '/toast-showcase',
icon: 'radio_button_unchecked',
name: 'Toast'
},
{
link: '/tree-showcase',
icon: 'radio_button_unchecked',
name: 'Tree'
}
].sort((componentLink1, componentLink2) => componentLink1.name > componentLink2.name ? 1 : -1);

constructor(private router: Router, private iconService: IgxIconService) {
iconService.setFamily('fa-solid', { className: 'fa', type: 'font', prefix: 'fa-'});
iconService.setFamily('fa-brands', { className: 'fab', type: 'font' });
Expand Down
Loading
Loading