department-of-veterans-affairs / vets-design-system-documentation

Repository for design.va.gov website
https://design.va.gov
37 stars 57 forks source link

Update documentation for va-button #2915

Open rmessina1010 opened 3 months ago

rmessina1010 commented 3 months ago

Description

Relates to: https://github.com/department-of-veterans-affairs/vets-design-system-documentation/issues/2379

Pending completion of tests: Add or update documentation and guidance for [va-button] and [va-button-pair] on design.va.gov to reflect the updated behavior and usage of the submit property. Adding work around suggestions for submit functionality. See comments on this PR for details to what has changed.

Details

USE WITH CAUTION: CANDIDATE.

Tasks

Acceptance Criteria

caw310 commented 3 months ago

Hey team! Please add your planning poker estimate with Zenhub @babsdenney @danbrady @LWWright7

danbrady commented 3 months ago

@rmessina1010 @caw310

In the code usage on both the button and button group pages, it currently states:

Property Attribute Type Default Description
submit submit boolean false If true, the button will submit form data when clicked.

If I understand the issue, the PR fixes the component so this statement is true. Do we feel we need more information than this is needed? Or are there any features that are new with this update?

rmessina1010 commented 1 month ago

@danbrady: Yes, for starters submit is now a string. '', null(?), or any other value cause the button to act as a submit button. 'skip', and 'prevent' modify submit behavior.

Also important, due to limitations with Stencil, listeners fire in a specific order: form.onsubmit, button.onclick, form.submit

babsdenney commented 1 week ago

Whoever picks this ticket up, work with @rmessina1010 to understand all the details.