Fix/UI misc (#1606)

* stop expansion when description icon clicked

* add test for ensuring string sanitization

* rename log out to terminate in sessions component and remove sanitization bypass as unneeded

* remove unecessary instances of safe string
This commit is contained in:
Lucy C
2022-07-01 18:25:45 -06:00
committed by GitHub
parent 8ba932aa36
commit 6d805ae941
15 changed files with 41 additions and 50 deletions

View File

@@ -2,7 +2,7 @@
*ngIf="data.spec.description"
class="slot-start"
fill="clear"
(click)="presentAlertDescription()"
(click)="presentAlertDescription($event)"
>
<ion-icon name="help-circle-outline" slot="icon-only" size="small"></ion-icon>
</ion-button>

View File

@@ -10,6 +10,7 @@
size="small"
(click)="
presentUnionTagDescription(
$event,
unionSpec.tag.name,
unionSpec.tag.description
)
@@ -121,7 +122,7 @@
<ion-button
*ngIf="spec.description"
fill="clear"
(click)="presentAlertDescription(spec)"
(click)="presentAlertDescription($event, spec)"
style="--padding-start: 0"
>
<ion-icon

View File

@@ -300,7 +300,8 @@ export class FormObjectComponent {
await alert.present()
}
async presentAlertDescription(spec: ValueSpec) {
async presentAlertDescription(event: Event, spec: ValueSpec) {
event.stopPropagation()
const { name, description } = spec
const alert = await this.alertCtrl.create({
@@ -353,7 +354,12 @@ export class FormObjectComponent {
return `${key}-${index}-${this.objectId}`
}
async presentUnionTagDescription(name: string, description: string) {
async presentUnionTagDescription(
event: Event,
name: string,
description: string,
) {
event.stopPropagation()
const alert = await this.alertCtrl.create({
header: name,
message: description,
@@ -384,7 +390,8 @@ export class FormLabelComponent {
constructor(private readonly alertCtrl: AlertController) {}
async presentAlertDescription() {
async presentAlertDescription(event: Event) {
event.stopPropagation()
const { name, description } = this.data.spec
const alert = await this.alertCtrl.create({