Skip to content

Conversation

christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Sep 25, 2025

Summary

Makes the useGrouping prop for number widgets disabled by default, aligning with the old UI (also requested via design). Node authors can still enable if they want by setting prop explicitly.

Changes

  • What: Modified WidgetInputNumberInput to disable useGrouping by default, requiring explicit opt-in via widget options
  • Testing: Added component tests covering value binding, component rendering, step calculations, and grouping behavior

Review Focus

UX impact on existing nodes that may have relied on default grouping behavior and test coverage for edge cases with precision calculations.

Screenshots (if applicable)

Before:

Screenshot from 2025-09-25 11-34-34

After:

Screenshot from 2025-09-25 11-35-27

┆Issue is synchronized with this Notion page by Unito

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Sep 25, 2025
Copy link

github-actions bot commented Sep 25, 2025

🎭 Playwright Test Results

Some tests failed

⏰ Completed at: 09/26/2025, 12:13:34 AM UTC

📈 Summary

  • Total Tests: 460
  • Passed: 427 ✅
  • Failed: 1 ❌
  • Flaky: 3 ⚠️
  • Skipped: 29 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 420 / ❌ 1 / ⚠️ 3 / ⏭️ 29
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 4 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

DrJKL
DrJKL previously approved these changes Sep 25, 2025
Copy link
Collaborator

@AustinMroz AustinMroz left a comment

Choose a reason for hiding this comment

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

LGTM.

Question: Since useGrouping is a new option, should it be added to litegraph/src/types/widgets.ts? Do we intend to keep these litegraph interfaces up to date/move them out of the litegraph directory?

@christian-byrne
Copy link
Contributor Author

Test failures are expected due to the seed display in default workflow losing the thousands comma separators: https://59ad2721.comfyui-playwright-chromium.pages.dev/#?q=s:failed

@christian-byrne
Copy link
Contributor Author

Question: Since useGrouping is a new option, should it be added to litegraph/src/types/widgets.ts? Do we intend to keep these litegraph interfaces up to date/move them out of the litegraph directory?

I don't think we need to update the litegraph interfaces, as litegraph won't be doing anything with the new widget options. The types will be defined in python -> node schemas -> Vue component props.

DrJKL
DrJKL previously approved these changes Sep 25, 2025
Comment on lines +187 to +194
it('displays numbers with commas when grouping enabled', () => {
const widget = createMockWidget(1000, 'int', { useGrouping: true })
const wrapper = mountComponent(widget, 1000)

const input = getNumberInput(wrapper)
expect(input.value).toBe('1,000')
expect(input.value).toContain(',')
})
Copy link
Contributor

Choose a reason for hiding this comment

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

idle thought: Very much not something I think is important to test right now, but does the PrimeVue component handle the internationalization of the separator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a locale prop https://primevue.org/inputnumber/#api.inputnumber.props.locale. I'm assuming they have intelligent default.

@christian-byrne
Copy link
Contributor Author

christian-byrne commented Sep 26, 2025

As mentioned here, test failure is expected now that comma is gone, so re-generating baseline.

@christian-byrne christian-byrne added the New Browser Test Expectations New browser test screenshot should be set by github action label Sep 26, 2025
@christian-byrne christian-byrne merged commit ac93a6b into main Sep 26, 2025
2 checks passed
@christian-byrne christian-byrne deleted the vue-nodes/widget/default-grouping-option branch September 26, 2025 00:46
christian-byrne added a commit that referenced this pull request Sep 27, 2025
…e node number widgets (#5776)

## Summary

Makes the
[useGrouping](https://primevue.org/inputnumber/#api.inputnumber.props.useGrouping)
prop for number widgets disabled by default, aligning with the old UI
(also requested via design). Node authors can still enable if they want
by setting prop explicitly.

## Changes

- **What**: Modified
[WidgetInputNumberInput](https://primevue.org/inputnumber/) to disable
`useGrouping` by default, requiring explicit opt-in via widget options
- **Testing**: Added component tests covering value binding, component
rendering, step calculations, and grouping behavior

## Review Focus

UX impact on existing nodes that may have relied on default grouping
behavior and test coverage for edge cases with precision calculations.

## Screenshots (if applicable)

*Before*:

<img width="1685" height="879" alt="Screenshot from 2025-09-25 11-34-34"
src="https://github.com/user-attachments/assets/432097ab-203d-4f86-8ca0-721b27ee33de"
/>

*After*:

<img width="1951" height="1175" alt="Screenshot from 2025-09-25
11-35-27"
src="https://github.com/user-attachments/assets/74d35b62-612e-4dbf-b6e2-0ac17af03ea1"
/>


┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-5776-Disable-number-grouping-thousands-comma-separators-by-default-in-Vue-node-number-widget-2796d73d365081369ca6c155335d0d57)
by [Unito](https://www.unito.io)

---------

Co-authored-by: DrJKL <[email protected]>
Co-authored-by: Alexander Brown <[email protected]>
Co-authored-by: github-actions <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:vue-migration area:widgets New Browser Test Expectations New browser test screenshot should be set by github action size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants