-
Notifications
You must be signed in to change notification settings - Fork 309
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
NAS-132300 / 25.04 / Create a configurable full-page form with glossary section and help #11091
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #11091 +/- ##
===========================================
- Coverage 82.36% 58.87% -23.49%
===========================================
Files 1632 1634 +2
Lines 57356 57490 +134
Branches 5928 5963 +35
===========================================
- Hits 47241 33847 -13394
- Misses 10115 23643 +13528 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
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.
Also Save button is not clickable for me when I fill in the form. (I don't see any validation errors).
searchControl = this.formBuilder.control(''); | ||
searchOptions = signal<Option[]>([]); | ||
onSubmit = output(); | ||
buttonText = input.required<string>(); |
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.
This part is a bit hard to read. Let's group inputs and outputs and add protected/private for other fields.
searchMap = input<Map<string, string>>(); | ||
pageTitle = input.required<string>(); | ||
isLoading = input.required<boolean>(); | ||
subscription = new Subscription(); |
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.
Not used.
formGroup = input.required<FormGroup>(); | ||
requiredRoles = input<Role[]>(); | ||
searchMap = input<Map<string, string>>(); | ||
pageTitle = input.required<string>(); |
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.
I think this component is trying to have too much responsibility. I don't think it needs to take care of page header or save button. It could just be a component responsible for form glossary that can be included on other pages.
@@ -89,6 +96,19 @@ export class InstanceWizardComponent implements OnInit { | |||
}))), | |||
); | |||
|
|||
protected searchMap = new Map<string, string>([ |
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.
For this pull master and see ixRegisteredControl
and NavigateAndInteractService
. We could extend the former to also include control labels.
}), | ||
)); | ||
|
||
protected isEnvironmentValid = toSignal(this.form.controls.environmentVariables.valueChanges.pipe( |
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.
Would be good to come with a way to avoid this. Maybe you could come up with a way for a section to figure out which fields are rendered underneath it via contentChildren
or some sort of injection.
Changes:
Introduces configurable full-page form with glossary section and help
Testing:
Test the containers wizard. It should work correctly