-
Notifications
You must be signed in to change notification settings - Fork 516
feat(layout): Form
add default options
#11016
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: main
Are you sure you want to change the base?
Conversation
Tests completed successfully ✅Good job 🔥 |
View your CI Pipeline Execution ↗ for commit b7e5809.
☁️ Nx Cloud last updated this comment at |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #11016 +/- ##
==========================================
- Coverage 64.70% 64.44% -0.27%
==========================================
Files 1299 1310 +11
Lines 17253 17467 +214
Branches 2476 2571 +95
==========================================
+ Hits 11163 11256 +93
- Misses 5945 5954 +9
- Partials 145 257 +112
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
BundleMonUnchanged files (5)
Total files change -10B 0% Groups updated (1)
Final result: ✅ View report in BundleMon website ➡️ |
protected readonly nothing = tuiWithStyles(TuiFormStyles); | ||
|
||
public size: TuiFormOptions['size'] = this.options.size; | ||
|
||
@Input('tuiForm') |
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.
No need for an alias
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.
Alias was removed
tuiButtonOptionsProvider(TuiForm), | ||
tuiNotificationOptionsProvider(TuiForm), | ||
projectSize(TUI_BUTTON_OPTIONS, (size) => size), | ||
projectSize(TUI_NOTIFICATION_OPTIONS, (size) => size), | ||
projectSize(TUI_HEADER_OPTIONS, (size) => HEADER_SIZE[size]!), |
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.
What if we drop type of HEADER_SIZE
and add as const
? We can then change type in projectSize to TuiHandler<TuiFormOptions['size'], string>
and get rid of !
?
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.
Changed. Did you want something like this?
Added default values and a provider to override directive
tuiForm
parameters at a global or more local level. This way we can define the required size once and not specify it every time in the templates.Fixes #11010