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 #1825

Merged
merged 4 commits into from Apr 2, 2024

Conversation

dwgray
Copy link
Contributor

@dwgray dwgray commented Mar 22, 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 in fix(): Remove @input in favor of @update:modelValue #1696 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:

  • 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

…ootstrap-vue-next#1696

BREAKINGCHANGE: BFormCheckboxGroup no longer emits 'change' and 'input' events, listen for 'update:modelValue' instead
BREAKINGCHANGE: BRadioGroup no longer emits 'change' and 'input' events, listen for 'update:modelValue' instead
Copy link

stackblitz bot commented Mar 22, 2024

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

@dwgray
Copy link
Contributor Author

dwgray commented Mar 22, 2024

@VividLemon I wasn't comfortable (or even sure it would work) doing a forced push to my branch to amend the commit messages that included the breaking change, so this is a new PR that includes the changes that you requested int #1823. The code changes are all in the most recent commit to update BFormRadioGroup and I amended the commit message for the BFormCheckboxGroup to include the ! and BREAKINGCHANGE footer. Sorry, I missed this originally, but the changes that removed those events from BFormCheckbox and BFormRadio didn't include a breaking change notice

@VividLemon
Copy link
Member

@VividLemon I wasn't comfortable (or even sure it would work) doing a forced push to my branch to amend the commit messages that included the breaking change, so this is a new PR that includes the changes that you requested int #1823. The code changes are all in the most recent commit to update BFormRadioGroup and I amended the commit message for the BFormCheckboxGroup to include the ! and BREAKINGCHANGE footer. Sorry, I missed this originally, but the changes that removed those events from BFormCheckbox and BFormRadio didn't include a breaking change notice

It doesn't really matter how you add commits to a PR, as I will squash merge them into one commit to preserve a linear history anyways. For example, one could have just as easily done git commit --allow-empty -m "" to add it. But I suppose this would require the knowledge that I intended to squash merge the commits

@dwgray
Copy link
Contributor Author

dwgray commented Mar 22, 2024

@VividLemon I wasn't comfortable (or even sure it would work) doing a forced push to my branch to amend the commit messages that included the breaking change, so this is a new PR that includes the changes that you requested int #1823. The code changes are all in the most recent commit to update BFormRadioGroup and I amended the commit message for the BFormCheckboxGroup to include the ! and BREAKINGCHANGE footer. Sorry, I missed this originally, but the changes that removed those events from BFormCheckbox and BFormRadio didn't include a breaking change notice

It doesn't really matter how you add commits to a PR, as I will squash merge them into one commit to preserve a linear history anyways. For example, one could have just as easily done git commit --allow-empty -m "" to add it. But I suppose this would require the knowledge that I intended to squash merge the commits

Good to know - do you generally squash merge commits? So if I had just made the change to BFormOptionGroup and fixed the title of the PR (which would be the default title for the squashed commit if I read this correctly, would that have addressed your original comment?

Not complaining - it was useful for me to figure out interactive rebasing in git, just want to make this smoother in the future...

@VividLemon
Copy link
Member

@VividLemon I wasn't comfortable (or even sure it would work) doing a forced push to my branch to amend the commit messages that included the breaking change, so this is a new PR that includes the changes that you requested int #1823. The code changes are all in the most recent commit to update BFormRadioGroup and I amended the commit message for the BFormCheckboxGroup to include the ! and BREAKINGCHANGE footer. Sorry, I missed this originally, but the changes that removed those events from BFormCheckbox and BFormRadio didn't include a breaking change notice

It doesn't really matter how you add commits to a PR, as I will squash merge them into one commit to preserve a linear history anyways. For example, one could have just as easily done git commit --allow-empty -m "" to add it. But I suppose this would require the knowledge that I intended to squash merge the commits

Good to know - do you generally squash merge commits? So if I had just made the change to BFormOptionGroup and fixed the title of the PR (which would be the default title for the squashed commit if I read this correctly, would that have addressed your original comment?

Not complaining - it was useful for me to figure out interactive rebasing in git, just want to make this smoother in the future...

if the commits == 1 then I rebase, if commits > 1 I squash, always. The long running branch is an issue for those using the same branch. Typically me with using a single main branch. I always run into this issue. But to fix this I either A: fix the commits with ANOTHER SQUASH MERGE! or git reset --hard ${commit_hash} (before making any changes locally. You'll destroy your staged and unstaged local changes if you do that) or the issue can be avoided with using a different branch per change

@VividLemon VividLemon merged commit 6c69ff9 into bootstrap-vue-next:main Apr 2, 2024
3 checks passed
@github-actions github-actions bot mentioned this pull request Apr 2, 2024
xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request Apr 4, 2024
* upstream/main:
  fix(BFormFile): add properties placement and browser as in BootstrapVue (bootstrap-vue-next#1797)
  feat(BCheckbox)!: Implement reverse and without label (bootstrap-vue-next#1825)
  docs: Add documentation and parity section to contributing.md (bootstrap-vue-next#1834)
  vscode vue typescript plugin is now depricated and included in volar
  feat(BOffcanvas): add props backdropBlur and shadow to customize the BOverlay instance
  fix(BFormTags): limitTagsText props is not used fixes bootstrap-vue-next#1804
  fix(BTable): BTable rowDblClicked event not working fixes bootstrap-vue-next#1795
  open/close -> show/hide (bootstrap-vue-next#1813)
  fix(BDropdown): ignore keynav inside form (bootstrap-vue-next#1812)
xvaara added a commit to xvaara/bootstrap-vue-next that referenced this pull request Apr 16, 2024
* upstream/main:
  ci: add workflow dispatch to docs deploy
  chore: release main
  fix(BFormCheckbox): Prevent empty string being cast to true fixes bootstrap-vue-next#1822
  feat(utils): inject getId to allow for custom id generation (bootstrap-vue-next#1836)
  BTable multisort (bootstrap-vue-next#1842)
  fix(BFormSelect): array of numbers or dates (bootstrap-vue-next#1839)
  fix(BPopover and Btooltip): Fixes bootstrap-vue-next#1232 - do not create a new app fro each tooltip or popover (bootstrap-vue-next#1837)
  fix(BFormFile): add properties placement and browser as in BootstrapVue (bootstrap-vue-next#1797)
  feat(BCheckbox)!: Implement reverse and without label (bootstrap-vue-next#1825)
  docs: Add documentation and parity section to contributing.md (bootstrap-vue-next#1834)
  vscode vue typescript plugin is now depricated and included in volar
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