skybrud / Skybrud.Umbraco.Redirects.Import

Import and export addon for Skybrud.Umbraco.Redirects.
MIT License
7 stars 11 forks source link

Replace traditional checkbox with checkbox componnent #24

Closed bjarnef closed 9 months ago

bjarnef commented 10 months ago

Should fix https://github.com/skybrud/Skybrud.Umbraco.Redirects.Import/issues/23 by replacing the traditional checkbox with <umb-checkbox> component.

abjerner commented 10 months ago

Thanks @bjarnef

I know the check box list property also does this, but weren't there some guidelines once that said the <umb-checkbox /> directive should only be used for a single check box, and not a list of check boxes?

bjarnef commented 10 months ago

@abjerner not really. There's nothing wrong using multiple checkboxes / checkbox list. Sometimes we can use a toggle or multiple toggles instead of checkboxes. Often I think toggles are for settings, but single/multiple checkboxes are still valid to use. Often when the options are optional and not required or when one has multiple choices.

abjerner commented 9 months ago

@bjarnef thanks again - I've now merged your PR 👍

I think there was something with checkbox lists, but maybe that has changed. Or maybe I just remember it wrong 🤷‍♂️

bjarnef commented 9 months ago

@abjerner regarding the <umb-checkbox> and <umb-radiobutton> components they have been rendered as list using ng-repeat and name attribute. Maybe you thought on checklist-model directive, which binded the selected values in an array: https://github.com/umbraco/Umbraco-CMS/blob/cceabf88cd276144858f6cc02084cb65750544ca/src/Umbraco.Web.UI.Client/src/common/directives/components/forms/checklistmodel.directive.js#L5