fix: PromptInput placeholder overflowing when shortcuts are enabled#4502
Merged
fix: PromptInput placeholder overflowing when shortcuts are enabled#4502
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4502 +/- ##
=======================================
Coverage 97.41% 97.41%
=======================================
Files 933 933
Lines 29595 29595
Branches 10756 10757 +1
=======================================
Hits 28831 28831
+ Misses 757 716 -41
- Partials 7 48 +41 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jperals
previously approved these changes
May 8, 2026
| const page = new PromptInputTokenModePage(browser); | ||
| await page.setWindowSize({ width: 1200, height: 800 }); | ||
| await browser.url('#/light/prompt-input/shortcuts?hasSecondaryActions=true'); | ||
| await browser.url(`#/light/prompt-input/shortcuts?${urlSearch}`); |
Member
There was a problem hiding this comment.
Nit: the /light prefix is not necessary for quite some time. now. Setting light and dark mode is done preferably via URL parameters and defaults to light, but it is also accepted as prefix only for backwards compatibility.
| // The long placeholder wraps to multiple lines — the input should be | ||
| // significantly taller than a single-line input (~30px). | ||
| expect(longHeight).toBeGreaterThan(40); | ||
| }, 'hasSecondaryActions=true&useLongPlaceholder=true') |
Member
There was a problem hiding this comment.
We don't need to set hasSecondaryActions, do we?
|
|
||
| const typedHeight = await page.getContentEditableHeight(); | ||
| expect(typedHeight).toBeLessThan(40); | ||
| }, 'hasSecondaryActions=true&useLongPlaceholder=true') |
| const setupTest = (testFn: (page: PromptInputTokenModePage) => Promise<void>) => { | ||
| const setupTest = ( | ||
| testFn: (page: PromptInputTokenModePage) => Promise<void>, | ||
| urlSearch = 'hasSecondaryActions=true' |
Member
There was a problem hiding this comment.
Why do we need to set hasSecondaryActions?
jperals
approved these changes
May 8, 2026
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
Addresses an issue where a long placeholder string would cause the text overflow to be visible instead of growing the input to match the increased line count.
Related links, issue #, if available:
AWSUI-61983How 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.