-
Notifications
You must be signed in to change notification settings - Fork 183
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
feat(dialog): add more dialog options to BrnDialogDefaultOptions #610
base: main
Are you sure you want to change the base?
Conversation
* change closeDelay to 100 default * use closeDelay input value * use defaultOptions values for input signal defaults
Maybe i have to check it again. But the reason why i didn't add more properties to the defaultOptions is because is felt misleading. You would have to add it to the helm component as well, otherwise it won't work. I am a big fan of the inject defaultOptions pattern but it doesnt work that good for components. Maybe I am wrong and had some other mistakes in my code while trying, but thats why i refactored back to the mutableSignals instead of the default options. If it really works this way i would rather remove all mutable signals, than leaving 2 ways to set the values. |
I thought this is common practices to provide default input, where the component inputs cannot be used. Not sure why it didn't work before, but looks like that the only option For me it seems to work, try it out with hm-alert-dialog and add state open to I guess we will still need the mutableSignals for inputs which may change for other inputs like in the trigger directives. |
I just nearly went crazy because it really works. But maybe it was seen too serious by me. As written in my first comment, i like the defaultOptions pattern a lot and would love this to be the default way to set the options. You are right, not all of them can be removed! The following should be able to remove:
|
* state open w/ initial page load throws errors with OutputRef and dialog position is wrong
* fix default options scrollStrategy type * expose default options for alert dialog and popover
* remove unused imports
Thanks for this improvement. LGTM!!! I just wanted to point out, that it is a potential breaking change for users that use their own helm components, because they have to add the |
I updated the breaking change section |
PR Checklist
Please check if your PR fulfills the following requirements:
guidelines: https://github.com/goetzrobin/spartan/blob/main/CONTRIBUTING.md#-commit-message-guidelines
PR Type
What kind of change does this PR introduce?
Which package are you modifying?
What is the current behavior?
Closes #608
What is the new behavior?
Does this PR introduce a breaking change?
provideBrnDialogDefaultOptions
needs to be added toHlmAlertDialogComponent
Other information