Skip to content
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

[HxInputBase] Allow for CustomValidation Context and Propety and Add LabelType into application-wide Defaults #873

Conversation

mmonteagudo
Copy link
Contributor

@mmonteagudo mmonteagudo commented Aug 26, 2024

Linked Issue
#872

@hakenr
Copy link
Member

hakenr commented Sep 30, 2024

Input components (HxInputBase descendants) that do not support LabelType:

  • HxCheckbox, HxSwitch
  • HxCheckboxList, HxRadioButtonList
  • HxInputDateRange
  • HxInputRange
  • HxInputSelect - can we add support here?

...Adding LabelType to InputSettings will introduce this property to the settings/defaults of all inputs, which could lead to some confusion. I'm considering an alternative approach by adding a brand new ambient defaults such as HxSetup.Defaults.LabelType and HxSetup.Defaults.InputSize. I'll discuss this with my colleagues.

@hakenr hakenr self-assigned this Sep 30, 2024
@hakenr
Copy link
Member

hakenr commented Sep 30, 2024

@mmonteagudo Thanks a lot for your contribution! It made me further develop the idea of "global defaults for all inputs," and I’ve added HxSetup.Defaults for these global settings, which currently allow setting LabelType and InputSize.

Apologies for not accepting the custom validation parameters idea. I’m concerned that this feature could introduce more issues than the value it adds. We might revisit this later, but for now, I’ve decided against it, as there are possible workarounds that can help you achieve the same goal without the proposed changes.

@hakenr hakenr merged commit fd0b333 into havit:master Sep 30, 2024
1 check passed
@mmonteagudo
Copy link
Contributor Author

@mmonteagudo Thanks a lot for your contribution! It made me further develop the idea of "global defaults for all inputs," and I’ve added HxSetup.Defaults for these global settings, which currently allow setting LabelType and InputSize.

Apologies for not accepting the custom validation parameters idea. I’m concerned that this feature could introduce more issues than the value it adds. We might revisit this later, but for now, I’ve decided against it, as there are possible workarounds that can help you achieve the same goal without the proposed changes.

No worries, I understand.

That's an important feature for our implementation, so we are using it from our fork of Havit, so we just keep it up to date with latest updates and deploy a new package in our private package manager.

I do have a couple of customizations that works for our specific implementation, so I understand. :), Thanks for accepting the other change, that one was pretty important too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[HxInputBase] Application-wide default for LabelType
2 participants