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

feat(BCheckbox)!: Implement reverse and without label #1823

Closed
wants to merge 4 commits into from

Conversation

dwgray
Copy link
Contributor

@dwgray dwgray commented Mar 21, 2024

Describe the PR

Implement the reverse and without-label features of checkboxes and radio buttons.

Reverse is implemented as a property on BFormCheckbox and BFormCheckboxGroup
Without Labels is implemented by not including the form-checkbox class when there is no default slot

In addition:

  • Implemented and tested the same properties in BFormRadio and BFormRadioGroup
  • Updated the documentation for BFromCheckbox and BFGormCheckboxGroup
  • Made scope option in the ComponentReference data (because it is)
  • Removed input and change events from BFormCheckboxGroup - these events were removed from BFromCheckbox so it doesn't seem like it makes sense to keep them in the group.

I believe that this PR brings us to parity with BSV legacy and BS5. There is some more clean-up to do with BFormRadio, I didn't intend to touch that at all, but since there was a shared component I did the minimum to get the core feature I was working on to work with Radio controls.

Small replication

A small replication or video walkthrough can help demonstrate the changes made. This is optional, but can help observe the intended changes. A mentioned issue that contains a replication also works.

PR checklist

What kind of change does this PR introduce? (check at least one)

  • Bugfix 🐛 - fix(...)
  • Feature - feat(...)
  • ARIA accessibility - fix(...)
  • Documentation update - docs(...)
  • Other (please describe)

The PR fulfills these requirements:

  • [ x ] Pull request title and all commits follow the Conventional Commits convention or has an override in this pull request body This is very important, as the CHANGELOG is generated from these messages, and determines the next version type. Pull requests that do not follow conventional commits or do not have an override will be denied

BREAKINGCHANGE: BFormCheckboxGroup and BFormRadioGroup no longer emit input or change events - please use update:modelValue instead

Copy link

stackblitz bot commented Mar 21, 2024

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@dwgray dwgray changed the title feat(BCheckBox): Implement reverse and without label feat(BCheckbox): Implement reverse and without label Mar 21, 2024
required: toRef(() => props.required),
buttons: toRef(() => props.buttons),
disabled: toRef(() => props.disabled),
})

watch(modelValue, (newValue) => {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a fan of this change, emitting events for this when it really is just a copy of modelvalue is strange. However, first: it needs to be labeled as a breaking change commit. Second: BFormRadioGroup also has this same code, but it is not removed.

@dwgray dwgray changed the title feat(BCheckbox): Implement reverse and without label feat(BCheckbox)!: Implement reverse and without label Mar 22, 2024
@dwgray dwgray closed this Mar 22, 2024
@dwgray
Copy link
Contributor Author

dwgray commented Mar 22, 2024

Closing the PR and opening #1825 with amended commit messages

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.

None yet

2 participants