-
-
Notifications
You must be signed in to change notification settings - Fork 18
Fix dialogs markup #1709
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 dialogs markup #1709
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,41 +1,40 @@ | ||||||
| <h1 mat-dialog-title>Delete <strong>{{ connectionName }}</strong> connection</h1> | ||||||
| <form #deleteConnectionForm="ngForm" class="form" (ngSubmit)="deleteConnection()"> | ||||||
| <mat-dialog-content> | ||||||
| <p class="mat-body"> | ||||||
| Before you delete the connection, please let us know why. | ||||||
| Every bit of feedback helps! | ||||||
| </p> | ||||||
| <br> | ||||||
| <form action="" #deleteConnectionForm="ngForm" class="form"> | ||||||
| <mat-radio-group required | ||||||
| name="reasons" | ||||||
| class="radio-group" | ||||||
| [(ngModel)]="reason"> | ||||||
| <mat-radio-button value='missing-features' class="radio-button"> | ||||||
| Missing features I need | ||||||
| </mat-radio-button> | ||||||
| <mat-radio-button value='technical-issues' class="radio-button"> | ||||||
| Technical issues | ||||||
| </mat-radio-button> | ||||||
| <mat-radio-button value='another-product' class="radio-button"> | ||||||
| Another product | ||||||
| </mat-radio-button> | ||||||
| <mat-radio-button value='other' class="radio-button"> | ||||||
| Other | ||||||
| </mat-radio-button> | ||||||
| </mat-radio-group> | ||||||
| <mat-form-field appearance="outline" class="message"> | ||||||
| <mat-label>Anything you want to share? (optional)</mat-label> | ||||||
| <textarea matInput resizeToFitContent rows="8" name="message" | ||||||
| [(ngModel)]="message" | ||||||
| ></textarea> | ||||||
| </mat-form-field> | ||||||
| </form> | ||||||
| <mat-radio-group required | ||||||
| name="reasons" | ||||||
| class="radio-group" | ||||||
| [(ngModel)]="reason"> | ||||||
| <mat-radio-button value='missing-features' class="radio-button"> | ||||||
| Missing features I need | ||||||
| </mat-radio-button> | ||||||
| <mat-radio-button value='technical-issues' class="radio-button"> | ||||||
| Technical issues | ||||||
| </mat-radio-button> | ||||||
| <mat-radio-button value='another-product' class="radio-button"> | ||||||
| Another product | ||||||
| </mat-radio-button> | ||||||
| <mat-radio-button value='other' class="radio-button"> | ||||||
| Other | ||||||
| </mat-radio-button> | ||||||
| </mat-radio-group> | ||||||
| <mat-form-field appearance="outline" class="message"> | ||||||
| <mat-label>Anything you want to share? (optional)</mat-label> | ||||||
| <textarea matInput resizeToFitContent rows="8" name="message" | ||||||
| [(ngModel)]="message" | ||||||
| ></textarea> | ||||||
| </mat-form-field> | ||||||
| </mat-dialog-content> | ||||||
| <mat-dialog-actions align="end"> | ||||||
| <button mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button> | ||||||
| <button mat-flat-button color="warn" | ||||||
| [disabled]="submitting" | ||||||
| (click)="deleteConnection()"> | ||||||
| <button type="button" mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button> | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Duplicate The button has both Proposed fix- <button type="button" mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button>
+ <button type="button" mat-flat-button mat-dialog-close="cancel">Abort</button>📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||
| <button type="submit" mat-flat-button color="warn" | ||||||
| [disabled]="submitting"> | ||||||
| Proceed | ||||||
| </button> | ||||||
| </mat-dialog-actions> | ||||||
| </mat-dialog-actions> | ||||||
| </form> | ||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,18 @@ | ||
| <h1 mat-dialog-title>Name your connection</h1> | ||
|
|
||
| <form (ngSubmit)="save()"> | ||
| <mat-dialog-content class="rename-dialog__content"> | ||
| <p class="rename-dialog__description">Give your hosted database a friendly title so you can find it easily.</p> | ||
| <mat-form-field appearance="outline" class="rename-dialog__field"> | ||
| <mat-label>Connection title</mat-label> | ||
| <input matInput [(ngModel)]="title" placeholder="e.g. Production DB, Staging, My App" (keyup.enter)="save()" cdkFocusInitial> | ||
| <input matInput [(ngModel)]="title" name="title" placeholder="e.g. Production DB, Staging, My App" cdkFocusInitial> | ||
| </mat-form-field> | ||
| </mat-dialog-content> | ||
|
|
||
| <mat-dialog-actions align="end" class="rename-dialog__actions"> | ||
| <button type="button" mat-button mat-dialog-close>Skip</button> | ||
| <button type="button" mat-flat-button color="accent" [disabled]="!title.trim() || saving" (click)="save()"> | ||
| <button type="submit" mat-flat-button color="accent" [disabled]="!title.trim() || saving"> | ||
| {{ saving ? 'Saving...' : 'Save' }} | ||
| </button> | ||
| </mat-dialog-actions> | ||
| </form> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,16 +1,16 @@ | ||
| <h1 mat-dialog-title>Rename <strong>{{ data.databaseName }}</strong></h1> | ||
| <form (ngSubmit)="save()"> | ||
| <mat-dialog-content> | ||
| <mat-form-field appearance="outline" class="rename-dialog__field"> | ||
| <mat-label>Connection name</mat-label> | ||
| <input matInput [(ngModel)]="title" placeholder="e.g. Production DB, Staging, My App" | ||
| (keyup.enter)="save()" cdkFocusInitial> | ||
| <input matInput [(ngModel)]="title" name="title" placeholder="e.g. Production DB, Staging, My App" cdkFocusInitial> | ||
| </mat-form-field> | ||
| </mat-dialog-content> | ||
| <mat-dialog-actions align="end"> | ||
| <button type="button" mat-flat-button mat-dialog-close>Cancel</button> | ||
| <button type="button" mat-flat-button color="accent" | ||
| [disabled]="!title.trim() || submitting()" | ||
| (click)="save()"> | ||
| <button type="submit" mat-flat-button color="accent" | ||
| [disabled]="!title.trim() || submitting()"> | ||
| {{ submitting() ? 'Saving...' : 'Save' }} | ||
| </button> | ||
| </mat-dialog-actions> | ||
| </form> |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,36 +1,35 @@ | ||||||||||
| <h1 mat-dialog-title>Delete <strong>{{ userEmail }}</strong> account</h1> | ||||||||||
| <form #deleteConnectionForm="ngForm" class="form" (ngSubmit)="openDeleteConfirmation()"> | ||||||||||
| <mat-dialog-content> | ||||||||||
| <p class="mat-body"> | ||||||||||
| Tell us why are you deleting your account. | ||||||||||
| </p> | ||||||||||
| <br> | ||||||||||
| <form action="" #deleteConnectionForm="ngForm" class="form"> | ||||||||||
| <mat-radio-group required | ||||||||||
| name="reasons" | ||||||||||
| class="radio-group" | ||||||||||
| [(ngModel)]="reason"> | ||||||||||
| <div *ngFor="let reasonItem of reasonsList"> | ||||||||||
| <mat-radio-button [value]="reasonItem.id" class="radio-button"> | ||||||||||
| {{ reasonItem.caption }} | ||||||||||
| </mat-radio-button> | ||||||||||
| <p *ngIf="reasonItem.message && reason === reasonItem.id" | ||||||||||
| [innerHtml]="reasonItem.message" | ||||||||||
| class="mat-body-1 radio-group__message"> | ||||||||||
| </p> | ||||||||||
| </div> | ||||||||||
| </mat-radio-group> | ||||||||||
| <mat-form-field appearance="outline" class="message"> | ||||||||||
| <mat-label>Anything you want to share? (optional)</mat-label> | ||||||||||
| <textarea matInput resizeToFitContent rows="3" name="message" | ||||||||||
| [(ngModel)]="message" | ||||||||||
| ></textarea> | ||||||||||
| </mat-form-field> | ||||||||||
| </form> | ||||||||||
| <mat-radio-group required | ||||||||||
| name="reasons" | ||||||||||
| class="radio-group" | ||||||||||
| [(ngModel)]="reason"> | ||||||||||
| <div *ngFor="let reasonItem of reasonsList"> | ||||||||||
| <mat-radio-button [value]="reasonItem.id" class="radio-button"> | ||||||||||
| {{ reasonItem.caption }} | ||||||||||
| </mat-radio-button> | ||||||||||
| <p *ngIf="reasonItem.message && reason === reasonItem.id" | ||||||||||
| [innerHtml]="reasonItem.message" | ||||||||||
| class="mat-body-1 radio-group__message"> | ||||||||||
| </p> | ||||||||||
| </div> | ||||||||||
| </mat-radio-group> | ||||||||||
| <mat-form-field appearance="outline" class="message"> | ||||||||||
| <mat-label>Anything you want to share? (optional)</mat-label> | ||||||||||
| <textarea matInput resizeToFitContent rows="3" name="message" | ||||||||||
| [(ngModel)]="message" | ||||||||||
| ></textarea> | ||||||||||
| </mat-form-field> | ||||||||||
| </mat-dialog-content> | ||||||||||
| <mat-dialog-actions align="end"> | ||||||||||
| <button mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button> | ||||||||||
| <button mat-flat-button color="warn" | ||||||||||
| (click)="openDeleteConfirmation()"> | ||||||||||
| <button type="button" mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button> | ||||||||||
|
||||||||||
| <button type="button" mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button> | |
| <button type="button" mat-flat-button mat-dialog-close="cancel">Abort</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate mat-dialog-close attribute.
The Abort button has mat-dialog-close specified twice. The second instance with the value will override the first, but this is likely unintentional and should be cleaned up.
🔧 Proposed fix
- <button type="button" mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button>
+ <button type="button" mat-flat-button mat-dialog-close="cancel">Abort</button>📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| <button type="button" mat-flat-button mat-dialog-close mat-dialog-close="cancel">Abort</button> | |
| <button type="button" mat-flat-button mat-dialog-close="cancel">Abort</button> |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@frontend/src/app/components/user-settings/account-delete-dialog/account-delete-dialog.component.html`
at line 30, The Abort button element in account-delete-dialog.component.html
incorrectly includes the mat-dialog-close attribute twice; remove the duplicate
plain mat-dialog-close attribute and keep the value form
mat-dialog-close="cancel" on the <button> so the dialog close payload is
explicit (locate the Abort button element in
account-delete-dialog.component.html and delete the redundant mat-dialog-close
occurrence).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mat-dialog-closeis duplicated on this button (mat-dialog-close mat-dialog-close="cancel"). Please remove the redundant attribute and keep a single close value/binding to avoid invalid markup.