Repository navigation
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5207 +/- ##
=======================================
Coverage 97.75% 97.76%
=======================================
Files 1003 1003
Lines 32534 32552 +18
Branches 12082 12094 +12
=======================================
+ Hits 31805 31823 +18
Misses 684 684
Partials 45 45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The observer discards zero-width measurements, causing tokens to collapse while the field is hidden and preventing recalculation when it is restored at the same width.
1 open issue
What changed in this PR
This PR adjusts token-mode autosuggest spacing by rendering tokens inside the shared input field instead of a separate field wrapper.
Changes:
- Reuses shared input styling and adds an internal inline-content slot.
- Calculates token overflow from the combined token and input widths.
- Updates spacing, popover clipping, and overflow test fixtures.
| File | Description |
|---|---|
src/internal/components/autosuggest-input/use-token-overflow.ts |
Uses token and input measurements to calculate overflow. |
src/internal/components/autosuggest-input/styles.scss |
Removes separate field styles and adjusts token layout. |
src/internal/components/autosuggest-input/inline-tokens.tsx |
Exposes the token root for measurement. |
src/internal/components/autosuggest-input/index.tsx |
Renders tokens through the shared input component. |
src/internal/components/autosuggest-input/__tests__/use-token-overflow.test.tsx |
Updates geometry mocks and overflow checks. |
src/input/styles.scss |
Adds inline-content spacing and allows popovers outside the field. |
src/input/internal.tsx |
Adds an internal inline-content slot and removes borderless mode. |
src/autosuggest/__tests__/autosuggest-token-mode.test.tsx |
Updates the overflow hook mock. |
Review effort: Balanced
| useResizeObserver( | ||
| () => (isTokenMode ? fieldRef.current : inputContainerRef.current), | ||
| () => inputContainerRef.current, | ||
| entry => entry.borderBoxWidth > 0 && setTriggerWidth(entry.borderBoxWidth) |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Related links, issue #, if available: n/a
How has this been tested?
Review checklist
The following items are to be evaluated by the author(s) and the reviewer(s).
Correctness
CONTRIBUTING.md.CONTRIBUTING.md.Security
checkSafeUrlfunction.Testing
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.