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

docs(examples): refactor #1239

Merged
merged 72 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
88c0a75
feat(example-styles): introduce new example-styles package
jul-lam Apr 15, 2024
f05c30a
fix(example-styles): remove aggrid from global styles since it is notโ€ฆ
jul-lam Apr 15, 2024
ab45c1f
fix(documentation): adapt code-runtimes to handle style files
jul-lam Apr 15, 2024
856d4ae
fix(documentation): remove unused method
jul-lam Apr 15, 2024
ac65d65
fix(documentation): adapt playground files
jul-lam Apr 15, 2024
303488c
fix(documentation): adapt playground index file
jul-lam Apr 15, 2024
cfb04b6
fix(documentation): add code runtime aggrid support to allow completeโ€ฆ
jul-lam Apr 16, 2024
ab2edcd
fix(example-styles): add aggrid support for test-apps in global.css
jul-lam Apr 16, 2024
4b57556
fix: push updated pnpm-lock
jul-lam Apr 16, 2024
c12ab29
fix(test-apps): use central style file
jul-lam Apr 16, 2024
03975f9
Merge branch 'main' into docs/centralized-example-styles
jul-lam Apr 16, 2024
fe756a5
fix(example-styles): remove aggrid from global styles
jul-lam Apr 16, 2024
1283a38
fix(documentation): add show css file logic
jul-lam Apr 16, 2024
2a4552f
fix(documentation): unwanted overflow
jul-lam Apr 16, 2024
73502b6
fix(example-styles): add dist folder to ensure correct build with turbo
jul-lam Apr 16, 2024
ec684c3
Merge branch 'main' into docs/centralized-example-styles
jul-lam Apr 16, 2024
db6df6c
fix: gitignore files
jul-lam Apr 16, 2024
5cb7ea5
fix: use correct copyright year
jul-lam Apr 16, 2024
ea738fb
fix(documentation): remove aggrid from code runtimes
jul-lam Apr 16, 2024
20dd4b3
fix(html-test-app): refactor examples
jul-lam Apr 18, 2024
483d478
fix(react-test-app): refactor examples
jul-lam Apr 18, 2024
1651559
fix(html-test-app): adapt some examples
jul-lam Apr 18, 2024
188e7fc
fix(vue-test-app): refactor examples
jul-lam Apr 23, 2024
840f3cf
fix: reset echarts examples
jul-lam Apr 23, 2024
b01b5a1
fix(angular-test-app): refactor examples
jul-lam Apr 23, 2024
1d0a60d
fix: add message and loading examples to vue and angular
jul-lam Apr 24, 2024
4e1e23e
fix(react-test-app): refactor main.tsx
jul-lam Apr 24, 2024
b126ab1
fix(html-test-app): refactor react examples
jul-lam Apr 24, 2024
1924dc2
fix(angular-test-app): spilt aggrid example into ts and html
jul-lam Apr 24, 2024
a079665
feat: add compare examples script for utility usage
jul-lam Apr 24, 2024
bb8a8e9
fix(react-test-app): change loading example to match preview
jul-lam Apr 24, 2024
009b9b2
fix(angular-test-app): add loading example
jul-lam Apr 24, 2024
5b95b7b
fix(vue-test-app): add loading example
jul-lam Apr 24, 2024
59e695f
Merge branch 'main' into docs/centralized-example-styles
jul-lam Apr 29, 2024
aecf6c7
fix: change styles package logic to default import
jul-lam Apr 30, 2024
ff5f9ad
fix: import not working
jul-lam Apr 30, 2024
1e6dc6c
fix: pnpm-lock
jul-lam Apr 30, 2024
35d00de
Merge branch 'main' into docs/centralized-example-styles
jul-lam May 6, 2024
883bf3d
Merge branch 'main' into docs/refactor-examples
jul-lam May 6, 2024
3dfab22
fix: update imports to new styles logic
jul-lam May 6, 2024
c8418ad
fix: work in review changes
jul-lam May 7, 2024
ea8881b
fix: include aggrid into coderuntimes
jul-lam May 7, 2024
078fac5
Merge branch 'main' into docs/centralized-example-styles
jul-lam May 7, 2024
a123cc8
fix: change to npm in coderuntime
jul-lam May 7, 2024
1a42b91
Merge branch 'main' into docs/centralized-example-styles
jul-lam May 8, 2024
cc4052a
Merge branch 'docs/centralized-example-styles' into docs/refactor-exaโ€ฆ
jul-lam May 8, 2024
f9a669a
feat: add style sheets
jul-lam May 14, 2024
d0c65b4
fix: adapt angular coderuntime for aggrid
jul-lam May 14, 2024
9a8173b
fix: remove disableStackBlitz
jul-lam May 14, 2024
9777e41
Merge branch 'main' into docs/refactor-examples
jul-lam May 14, 2024
a5bf645
fix: refactor code and add missing themeSwitches
jul-lam May 14, 2024
9a1e3de
Merge branch 'docs/centralized-example-styles' of https://github.com/โ€ฆ
jul-lam May 14, 2024
62c6951
Merge branch 'docs/centralized-example-styles' into docs/refactor-exaโ€ฆ
jul-lam May 14, 2024
7bf4d98
Merge branch 'docs/refactor-examples' of https://github.com/siemens/iโ€ฆ
jul-lam May 14, 2024
24e9ffa
Merge branch 'main' into docs/refactor-examples
jul-lam May 16, 2024
e5f9298
Merge remote-tracking branch 'refs/remotes/origin/main' into docs/refโ€ฆ
matthiashader Jul 23, 2024
bb416f4
fix(docs/general): adaptions
matthiashader Jul 24, 2024
7fdd533
fix(docs/general): adaptions
matthiashader Jul 26, 2024
1cc19e7
fix(docs/refactor-examples): vrts
matthiashader Jul 26, 2024
3c603e5
fix(docs/refactor-examples): adaptions
matthiashader Jul 26, 2024
cc324e5
Merge remote-tracking branch 'origin/docs/refactor-examples' into docโ€ฆ
matthiashader Jul 26, 2024
ffbb7ca
fix(docs/refactor-examples): adapt vrts
matthiashader Jul 26, 2024
4e6d598
fix(docs/refactor-examples): adaptions
matthiashader Aug 1, 2024
7be9ba8
Merge remote-tracking branch 'refs/remotes/origin/main' into docs/refโ€ฆ
matthiashader Aug 2, 2024
dc35221
fix(docs/refactor-examples): adaptions
matthiashader Aug 5, 2024
6f88856
fix(docs/refactor-examples): adapt vrts
matthiashader Aug 5, 2024
736bac0
Merge remote-tracking branch 'origin/docs/refactor-examples' into docโ€ฆ
matthiashader Aug 5, 2024
b8b2ae1
fix(docs/refactor-examples): adapt vrts
matthiashader Aug 5, 2024
027c01a
fix(docs/refactor-examples): change order
matthiashader Aug 5, 2024
60c1750
fix(docs/refactor-examples): removed NavigationTest component
matthiashader Aug 13, 2024
6bd06ff
fix(docs/refactor-examples): adapt vrt & adaptions on utils, test
matthiashader Aug 13, 2024
89cdf6a
fix(docs/refactor-examples): remove console log
matthiashader Aug 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"prepare": "pnpm git-hooks && pnpm disable-telemetry",
"disable-telemetry": "turbo telemetry disable",
"git-hooks": "husky install",
"compare-examples": "node ./scripts/compare-preview-examples-across-test-apps.js",
"ci:version": "pnpm changeset version && pnpm i --lockfile-only",
"ci:publish": "pnpm changeset publish",
"ts-run": "tsx"
Expand Down
921 changes: 636 additions & 285 deletions packages/angular-test-app/src/app/app-routing.module.ts

Large diffs are not rendered by default.

443 changes: 244 additions & 199 deletions packages/angular-test-app/src/app/app.module.ts

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ import { AfterViewInit, Component, ElementRef, ViewChild } from '@angular/core';
@Component({
selector: 'app-example',
templateUrl: './about-and-legal.html',
styles: [
`
@import 'example-styles/dist/application.css';
`,
],
})
export default class AboutAndLegal implements AfterViewInit {
@ViewChild('menu', { read: ElementRef })
Expand Down
15 changes: 15 additions & 0 deletions packages/angular-test-app/src/preview-examples/aggrid.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!--
SPDX-FileCopyrightText: 2024 Siemens AG

SPDX-License-Identifier: MIT

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->

<ag-grid-angular
style="height: 12rem; width: 100%"
class="ag-theme-alpine-dark ag-theme-ix"
[gridOptions]="gridOptions"
>
</ag-grid-angular>
91 changes: 43 additions & 48 deletions packages/angular-test-app/src/preview-examples/aggrid.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,52 @@
*/

import { Component } from '@angular/core';
import { ColDef } from 'ag-grid-community';
import { GridOptions } from 'ag-grid-community';

@Component({
selector: 'app-example',
template: `
<ag-grid-angular
style="height: 12rem; width: 100%"
class="ag-theme-alpine-dark ag-theme-ix"
[columnDefs]="columnDefs"
[rowData]="rowData"
rowSelection="multiple"
suppressCellFocus
checkboxSelection
></ag-grid-angular>
`,
templateUrl: './aggrid.html',
})
export default class AGGrid {
columnDefs: ColDef[] = [
{
field: 'type',
headerName: 'Type',
resizable: true,
checkboxSelection: true,
},
{
field: 'status',
headerName: 'Status',
resizable: true,
sortable: true,
filter: true,
},
{ field: 'hwVersion', headerName: 'HW version', resizable: true },
];
rowData = [
{
type: 'Equipment',
status: 'Normal',
hwVersion: '2.0',
checked: false,
},
{
type: 'Positioner',
status: 'Maintenance',
hwVersion: '1.0',
checked: true,
},
{
type: 'Pressure sensor',
status: 'Unknown',
hwVersion: 'N/A',
checked: false,
},
];
gridOptions = {
columnDefs: [
{
field: 'type',
headerName: 'Type',
resizable: true,
checkboxSelection: true,
},
{
field: 'status',
headerName: 'Status',
resizable: true,
sortable: true,
filter: true,
},
{ field: 'hwVersion', headerName: 'HW version', resizable: true },
],
rowData: [
{
type: 'Equipment',
status: 'Normal',
hwVersion: '2.0',
checked: false,
},
{
type: 'Positioner',
status: 'Maintenance',
hwVersion: '1.0',
checked: true,
},
{
type: 'Pressure sensor',
status: 'Unknown',
hwVersion: 'N/A',
checked: false,
},
],
rowSelection: 'multiple',
suppressCellFocus: true,
checkboxSelection: true,
} as GridOptions;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<!--
SPDX-FileCopyrightText: 2024 Siemens AG

SPDX-License-Identifier: MIT

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->

<ix-application [appSwitchConfig]="appSwitchConfig">
<ix-application-header name="My Application">
<div class="placeholder-logo" slot="logo"></div>
Expand All @@ -8,10 +17,7 @@
</ix-menu>

<ix-content>
<ix-content-header
slot="header"
header-title="My Content Page"
>
<ix-content-header slot="header" header-title="My Content Page">
</ix-content-header>
</ix-content>
</ix-application>
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { AppSwitchConfiguration } from '@siemens/ix';
@Component({
selector: 'app-example',
templateUrl: './application-app-switch.html',
styles: [`@import 'example-styles/dist/application.css'`],
})
export default class ApplicationAppSwitchExample {
appSwitchConfig: AppSwitchConfiguration = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<!--
SPDX-FileCopyrightText: 2024 Siemens AG

SPDX-License-Identifier: MIT

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->

<ix-application application-name="Application name" [breakpoints]="breakpoints">
<ix-application-header name="My Application">
<div class="placeholder-logo" slot="logo"></div>
Expand All @@ -20,19 +29,35 @@
<ix-menu-item>Item 2</ix-menu-item>
</ix-menu>
<ix-content>
<ix-content-header
slot="header"
header-title="Choose breakpoint"
>
<ix-content-header slot="header" header-title="Choose breakpoint">
</ix-content-header>

<input id="small" type="radio" name="layout" value="sm" (change)="onCheckedChange('sm')" />
<input
id="small"
type="radio"
name="layout"
value="sm"
(change)="onCheckedChange('sm')"
/>
<label for="small">Small</label>

<input id="medium" type="radio" name="layout" value="md" (change)="onCheckedChange('md')" checked />
<input
id="medium"
type="radio"
name="layout"
value="md"
(change)="onCheckedChange('md')"
checked
/>
<label for="medium">Medium</label>

<input id="large" type="radio" name="layout" value="lg" (change)="onCheckedChange('lg')" />
<input
id="large"
type="radio"
name="layout"
value="lg"
(change)="onCheckedChange('lg')"
/>
<label for="large">Large</label>
</ix-content>
</ix-application>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import { Breakpoint } from '@siemens/ix';

@Component({
selector: 'app-example',
styles: [
`
@import 'example-styles/dist/application.css';
`,
],
templateUrl: './application-breakpoints.html',
})
export default class ApplicationBreakpointExample {
Expand Down
14 changes: 10 additions & 4 deletions packages/angular-test-app/src/preview-examples/application.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
<!--
SPDX-FileCopyrightText: 2024 Siemens AG

SPDX-License-Identifier: MIT

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->

<ix-application>
<ix-application-header name="My Application">
<div class="placeholder-logo" slot="logo"></div>
Expand All @@ -8,10 +17,7 @@
</ix-menu>

<ix-content>
<ix-content-header
slot="header"
header-title="My Content Page"
>
<ix-content-header slot="header" header-title="My Content Page">
</ix-content-header>
</ix-content>
</ix-application>
5 changes: 5 additions & 0 deletions packages/angular-test-app/src/preview-examples/application.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,10 @@ import { Component } from '@angular/core';
@Component({
selector: 'app-example',
templateUrl: './application.html',
styles: [
`
@import 'example-styles/dist/application.css';
`,
],
})
export default class ApplicationExample {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ import { Component } from '@angular/core';
@Component({
selector: 'app-example',
template: `
<ix-avatar image="https://www.gravatar.com/avatar/00000000000000000000000000000000"></ix-avatar>
<ix-avatar
image="https://www.gravatar.com/avatar/00000000000000000000000000000000"
></ix-avatar>
`,
})
export default class AvatarImage {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@ import { Component } from '@angular/core';
@Component({
selector: 'app-example',
template: `
<ix-basic-navigation>
<ix-basic-navigation applicationName="Application name">
<div class="placeholder-logo" slot="logo"></div>
<ix-menu>
<ix-menu-item>Item 1</ix-menu-item>
<ix-menu-item>Item 2</ix-menu-item>
</ix-menu>
</ix-basic-navigation>
`,
styles: [
`
@import 'example-styles/dist/basic-navigation.css';
`,
],
})
export default class BasicNavigation {}
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ import { Component } from '@angular/core';
@Component({
selector: 'app-example',
template: `
<ix-blind label="Example" icon="info" sublabel="Sublabel">
<ix-blind label="Example" icon="info">
<ix-icon-button
id="context-menu"
slot="header-actions"
ghost
icon="context-menu"
icon-color="color-primary"
></ix-icon-button>
<ix-dropdown trigger="context-menu">test</ix-dropdown>
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
Expand All @@ -31,5 +32,10 @@ import { Component } from '@angular/core';
sit amet.
</ix-blind>
`,
styles: [
`
@import 'example-styles/dist/blind.css';
`,
],
})
export default class Blind {}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
-->

<ix-blind icon="bulb" label="Insight" sublabel="sublabel">
<div>Insight content</div>
</ix-blind>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ import { Component } from '@angular/core';

@Component({
selector: 'app-example',
templateUrl: './blind.html',
templateUrl: './blind-variants.html',
styles: [
`
@import 'example-styles/dist/blind.css';
`,
],
})
export default class Blind {}
Loading
Loading