-
Notifications
You must be signed in to change notification settings - Fork 2
Release 2.1.0 #30
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
base: master
Are you sure you want to change the base?
Release 2.1.0 #30
Changes from all commits
5da6cb5
db18e62
e7fb00d
680a528
71252a3
b6b069f
44d395f
5a60cb3
360655b
2996490
97fe0e9
2b0ecfb
b60c760
3f706cb
ac7e0cd
ba28244
ab85397
58830d9
d18b24b
e9793d9
9fbded8
47af2f7
ff8cb62
7aa8b26
dc056d9
4bb65be
801cd32
690b835
ff5bf06
9201b63
64308d0
60a15d2
eec18ea
09312e1
5bf80c6
9b380eb
25f819f
0be33a8
dc733e6
956a98c
9983fc8
dd50cba
020ecfd
c9b7fa2
1c6ba63
f5df106
77a3d63
e5daa2f
3c41e30
68377b5
c173387
6a4460d
6094167
9528c05
cf2a8b5
fc78a5a
d0c96e9
636a552
4142aaa
62182da
5b1962f
8f31d26
2a2bf47
e558a7a
5cc1e88
9f96b8f
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 |
|---|---|---|
|
|
@@ -87,4 +87,4 @@ | |
| padding-right: 9px; | ||
| height: 42px; | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,15 @@ | ||
| <h2 mat-dialog-title>Change referenced data values</h2> | ||
| <h2 mat-dialog-title>Change referenced data value{{dataSet.length > 1 ? 's' : ''}}</h2> | ||
| <mat-dialog-content class="netgrif-input"> | ||
| <mat-form-field fxFlex *ngFor="let data of dataSet"> | ||
| <mat-label>{{data.id}}</mat-label> | ||
| <input type="number" step="1" matInput [(ngModel)]="data.value"> | ||
| <input type="number" step="1" min="0" matInput [(ngModel)]="data.value" [formControl]="valueCtrl"> | ||
| <mat-error *ngIf="valueCtrl.errors && valueCtrl.errors.required">Value is required</mat-error> | ||
| <mat-error *ngIf="valueCtrl.errors && valueCtrl.errors.validValue">Value can not be a negative number</mat-error> | ||
| </mat-form-field> | ||
|
Comment on lines
3
to
8
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. Critical: Shared FormControl breaks multi-field editing. All input fields in the loop share the same
Each data item needs its own FormControl or the component should use template-driven forms with separate Since the AI summary indicates valueCtrl was introduced in the TypeScript file, you'll need to refactor the component to either: Option 1: Remove the FormControl and use template-driven validation: - <input type="number" step="1" min="0" matInput [(ngModel)]="data.value" [formControl]="valueCtrl">
- <mat-error *ngIf="valueCtrl.errors && valueCtrl.errors.required">Value is required</mat-error>
- <mat-error *ngIf="valueCtrl.errors && valueCtrl.errors.validValue">Value can not be a negative number</mat-error>
+ <input type="number" step="1" min="0" matInput [(ngModel)]="data.value" required>
+ <mat-error>Value is required and cannot be negative</mat-error>And update the save button to check if any data.value is invalid. Option 2: Use FormArray with individual controls for each data item (requires more changes in the TypeScript file).
🤖 Prompt for AI Agents |
||
| <span *ngIf="dataSet.length === 0">No referenced data found</span> | ||
| </mat-dialog-content> | ||
| <mat-dialog-actions> | ||
| <button mat-flat-button color="primary" [mat-dialog-close]="dataSet"> | ||
| <button mat-flat-button color="primary" [mat-dialog-close]="dataSet" [disabled]="valueCtrl.invalid"> | ||
| <mat-icon>done</mat-icon> | ||
| <span>Save</span> | ||
| </button> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| <h2 mat-dialog-title>Change marking of place {{CanvasNodeElement.pretty(place)}}</h2> | ||
| <mat-dialog-content class="netgrif-input"> | ||
| <mat-form-field fxFlex> | ||
| <mat-label>Tokens</mat-label> | ||
| <input type="number" min="0" step="1" matInput [(ngModel)]="place.marking" [formControl]="markingCtrl"> | ||
| <mat-error *ngIf="markingCtrl.errors && markingCtrl.errors.required">Number of tokens is required</mat-error> | ||
| <mat-error *ngIf="markingCtrl.errors && markingCtrl.errors.validMultiplicity">Number of tokens must be a non-negative integer</mat-error> | ||
| </mat-form-field> | ||
| </mat-dialog-content> | ||
| <mat-dialog-actions> | ||
| <button mat-flat-button color="primary" [mat-dialog-close]="place.marking" [disabled]="markingCtrl.invalid"> | ||
| <mat-icon>done</mat-icon> | ||
| <span>Save</span> | ||
| </button> | ||
| </mat-dialog-actions> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| mat-dialog-content { | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| mat-dialog-actions { | ||
| justify-content: flex-end; | ||
| } |
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.
🧹 Nitpick | 🔵 Trivial
Consider dynamically injecting the version number.
Hardcoding the version
"2.1.0"in the template creates a maintenance burden—it must be manually updated with each release and risks drifting out of sync withpackage.json.♻️ Suggested approach
Inject the version from the component:
Then in the component class, read the version from
package.jsonor an environment variable:Ensure
resolveJsonModuleandallowSyntheticDefaultImportsare enabled intsconfig.json.🤖 Prompt for AI Agents