Skip to content

Comments

feat(design, storefront)!: move DaffQuantityFieldComponent into the storefront package#4121

Open
xelaint wants to merge 2 commits intodevelopfrom
quantity-field-update
Open

feat(design, storefront)!: move DaffQuantityFieldComponent into the storefront package#4121
xelaint wants to merge 2 commits intodevelopfrom
quantity-field-update

Conversation

@xelaint
Copy link
Member

@xelaint xelaint commented Oct 9, 2025

PR Checklist

  • Commit message follows our contributing guidelines
  • Tests added/updated (for bug fixes/features)
  • Documentation added/updated (for bug fixes/features)

PR Type

  • Bug fix
  • Feature
  • Style update
  • Refactor
  • Test
  • Build
  • CI
  • Docs
  • Performance
  • Other (please describe)

Current behavior

Replace inputs with signals in order to handle focus changes.

Currently, focus does not transition when select changes to an input.

Fixes: #3888
Part of: #416, #3799

New behavior

Breaking change?

  • Yes
  • No

BREAKING CHANGE: The quantity field component has been moved from @daffodil/design to @daffodil/storefront.

Additional context

@xelaint xelaint requested a review from damienwebdev October 9, 2025 18:06
@xelaint xelaint added package: design @daffodil/design status: wip This PR is WIP. It should be marked as a draft. labels Oct 9, 2025
@xelaint xelaint changed the title feat(design): implement DaffFormFieldControl in DaffQuantityFieldComp… feat(design): implement DaffFormFieldControl in DaffQuantityFieldComponent Oct 9, 2025
@xelaint xelaint changed the title feat(design): implement DaffFormFieldControl in DaffQuantityFieldComponent feat(design)!: implement DaffFormFieldControl in DaffQuantityFieldComponent Oct 9, 2025
@xelaint xelaint added the 🚨 breaking changes This PR or issue will cause a breaking change label Oct 9, 2025
@xelaint xelaint force-pushed the quantity-field-update branch 2 times, most recently from eca7788 to 32dfffa Compare November 21, 2025 14:51
@xelaint xelaint marked this pull request as ready for review November 21, 2025 14:52
@xelaint xelaint requested review from a team as code owners November 21, 2025 14:52
@xelaint xelaint force-pushed the quantity-field-update branch 2 times, most recently from 43b2266 to 96e82e5 Compare November 24, 2025 21:30
@xelaint xelaint requested review from a team as code owners November 24, 2025 22:03
@xelaint
Copy link
Member Author

xelaint commented Nov 24, 2025

@damienwebdev moved quantity field to @daffodil/storefront. This is ready for final review.

@xelaint xelaint changed the title feat(design)!: implement DaffFormFieldControl in DaffQuantityFieldComponent feat(design, storefront)!: move DaffQuantityFieldComponent into the storefront package Nov 24, 2025
@xelaint xelaint added status: pending review This PR is awaiting review or response from a reviewer before the author can proceed. and removed status: wip This PR is WIP. It should be marked as a draft. labels Nov 24, 2025
/**
* @docs-private
*/
export const DAFF_SF_QUANTITY_FIELD_COMPONENTS = <const> [
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be public?

Copy link
Member Author

Choose a reason for hiding this comment

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

No. We decided not to display the array in the API and just document it in the Usage section.

],
})
export class DaffQuantityFieldModule { }
export class DaffSfQuantityFieldModule { }
Copy link
Member

Choose a reason for hiding this comment

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

Remove this. It's deprecated anyways.

Copy link
Member Author

Choose a reason for hiding this comment

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

*
* Called when child components gain focus
*/
onChildFocus() {
Copy link
Member

Choose a reason for hiding this comment

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

_ prefix.

Copy link
Member Author

Choose a reason for hiding this comment

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

*
* Called when child components lose focus
*/
onChildBlur() {
Copy link
Member

Choose a reason for hiding this comment

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

_ prefix.

Copy link
Member Author

Choose a reason for hiding this comment

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

*
* Called when child components change value
*/
onChildValueChange(value: number) {
Copy link
Member

Choose a reason for hiding this comment

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

_ prefix.

Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -1,63 +0,0 @@
# Quantity Field
Quantity field is a form control element that switches between a native select and input element.
Copy link
Member

Choose a reason for hiding this comment

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

I think we leave quantity-field in here as deprecated, guide people to the storefront equivalent and remove in v1.

Copy link
Member Author

Choose a reason for hiding this comment

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

host: {
class: 'daff-form-field',
'[class.is-native-select]': 'isNativeSelect',
'[class.is-quantity-select]': 'isQuantitySelect',
Copy link
Member

Choose a reason for hiding this comment

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

These functions don't exist?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed

@xelaint xelaint force-pushed the quantity-field-update branch 3 times, most recently from 97fa602 to c4b1506 Compare February 24, 2026 22:33
@xelaint xelaint requested a review from damienwebdev February 24, 2026 22:34
@xelaint xelaint force-pushed the quantity-field-update branch from c4b1506 to c3480fe Compare February 24, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🚨 breaking changes This PR or issue will cause a breaking change package: design @daffodil/design status: pending review This PR is awaiting review or response from a reviewer before the author can proceed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update DaffQuantityFieldComponent implementation according to new DaffFormFieldComponent API

2 participants