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

Update REPL examples #1028

Merged
merged 1 commit into from
Sep 27, 2024
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 @@ -59,5 +59,9 @@ <h1>References</h1>
<button mat-list-item (click)="startExample('math')">Math</button>
<button mat-list-item (click)="startExample('bind')">Bind</button>
</mat-action-list>
<p>CEL Spec</p>
<mat-action-list>
<button mat-list-item (click)="startExample('cel-spec-test')">CEL Spec Test Types</button>
</mat-action-list>
</mat-expansion-panel>
</mat-accordion>
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,20 @@ const examples = new Map<string, Example>([
"request": {
commands: [
`%option --enable_partial_eval`,
`%declare x : int`,
`%let y : int = 10`,
`x > y || y > 10`,
`%declare unk_a : bool`,
`%declare unk_b : bool`,
`%let err = 1 / 0 > 2`,
`true || false`,
`true || unk_a`,
`true || err`,
`false || unk_a`,
`false || err`,
`unk_a || true`,
`unk_a || false`,
`unk_a || err`,
`unk_a || unk_a`,
`unk_a || unk_b`,
`unk_a || true || err`,
]
}
}],
Expand Down Expand Up @@ -171,6 +182,19 @@ const examples = new Map<string, Example>([
]
}
}],
[
"cel-spec-test",
{
request: {
commands: [
`%load_descriptors --pkg 'cel-spec-test-types'`,
`%option --container "google.api.expr.test.v1"`,
`%let pb3 = proto3.TestAllTypes{}`,
`%let pb2 = proto2.TestAllTypes`,
`pb3 == proto3.TestAllTypes{}`
]
}
}],
]);

/**
Expand Down
24 changes: 13 additions & 11 deletions repl/appengine/web/src/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,17 @@ $theme: mat.m2-define-light-theme(
)
);

// Include theme styles for "core" features like ripples and elevation.
@include mat.core-theme($theme);
html {
// Include theme styles for "core" features like ripples and elevation.
@include mat.core-theme($theme);

// Include theme styles for each component used in the application.
@include mat.button-theme($theme);
@include mat.fab-theme($theme);
@include mat.icon-theme($theme);
@include mat.form-field-theme($theme);
@include mat.input-theme($theme);
@include mat.sidenav-theme($theme);
@include mat.expansion-theme($theme);
@include mat.list-theme($theme);
// Include theme styles for each component used in the application.
@include mat.button-theme($theme);
@include mat.fab-theme($theme);
@include mat.icon-theme($theme);
@include mat.form-field-theme($theme);
@include mat.input-theme($theme);
@include mat.sidenav-theme($theme);
@include mat.expansion-theme($theme);
@include mat.list-theme($theme);
}