Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 6, 2025

Describe the PR

Implements form submission support for BFormRating by adding name and form props. When name is set, renders a hidden input that participates in form submission, following the pattern established in BFormSpinbutton.

Implementation

  • Props: Added name?: string and form?: string to BFormRatingProps
  • Hidden Input: Renders <input type="hidden"> when name is provided and component is not disabled
  • Reactive Value: Hidden input bound to localValue, updates with all interactions (clicks, keyboard, clear)
  • Tests: 7 new tests covering render conditions and value reactivity
  • Docs: Updated formRating.data.ts with prop descriptions

Usage

<form @submit="handleSubmit">
  <BFormRating 
    v-model="rating" 
    name="product-rating"
    :stars="5" 
  />
  <button type="submit">Submit</button>
</form>

Form data includes: { "product-rating": "3" }

Small replication

Form with rating components
Form submission showing rating values
Clear button updates form value

PR checklist

What kind of change does this PR introduce?

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

The PR fulfills these requirements:

Original prompt

This section details on the original issue you should resolve

<issue_title>BFromRating: Enable form submission</issue_title>
<issue_description>### Missing feature is from

bootstrap-vue

Docs

https://bootstrap-vue.org/docs/components/form-rating#form-submission

Describe the missing feature

We should add the name and form props to enable submitting with a form</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@bolt-new-by-stackblitz
Copy link

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

@coderabbitai
Copy link

coderabbitai bot commented Nov 6, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Co-authored-by: VividLemon <31498096+VividLemon@users.noreply.github.com>
@VividLemon VividLemon marked this pull request as ready for review November 6, 2025 00:50
Copilot AI changed the title [WIP] Add name and form props for rating submission feat: add name and form props to BFormRating for form submission Nov 6, 2025
Copilot AI requested a review from VividLemon November 6, 2025 00:53
Copilot finished work on behalf of VividLemon November 6, 2025 00:53
@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 6, 2025

bsvn-vite-ts

npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next@2895
npm i https://pkg.pr.new/bootstrap-vue-next/bootstrap-vue-next/@bootstrap-vue-next/nuxt@2895

commit: 6a41681

@VividLemon VividLemon merged commit f14f049 into main Nov 6, 2025
8 checks passed
@github-actions github-actions bot mentioned this pull request Nov 6, 2025
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.

BFromRating: Enable form submission

2 participants