Skip to content

fix: PromptInput placeholder overflowing when shortcuts are enabled#4502

Merged
ernst-dev merged 5 commits intomainfrom
dev-v3-ernstka-shortcuts-placeholder
May 8, 2026
Merged

fix: PromptInput placeholder overflowing when shortcuts are enabled#4502
ernst-dev merged 5 commits intomainfrom
dev-v3-ernstka-shortcuts-placeholder

Conversation

@ernst-dev
Copy link
Copy Markdown
Member

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-61983

How has this been tested?

Review checklist

The following items are to be evaluated by the author(s) and the reviewer(s).

Correctness

  • Changes include appropriate documentation updates.
  • Changes are backward-compatible if not indicated, see CONTRIBUTING.md.
  • Changes do not include unsupported browser features, see CONTRIBUTING.md.
  • Changes were manually tested for accessibility, see accessibility guidelines.

Security

Testing

  • Changes are covered with new/existing unit tests?
  • Changes are covered with new/existing integration tests?

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ernst-dev ernst-dev requested a review from a team as a code owner May 8, 2026 11:52
@ernst-dev ernst-dev requested review from SpyZzey and jperals and removed request for a team and SpyZzey May 8, 2026 11:52
@ernst-dev ernst-dev changed the title Fix: PromptInput placholder overflowing when shortcuts are enabled fix: PromptInput placholder overflowing when shortcuts are enabled May 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.41%. Comparing base (4187eac) to head (e7e24e4).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

jperals
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}`);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We don't need to set hasSecondaryActions, do we?


const typedHeight = await page.getContentEditableHeight();
expect(typedHeight).toBeLessThan(40);
}, 'hasSecondaryActions=true&useLongPlaceholder=true')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Same here

const setupTest = (testFn: (page: PromptInputTokenModePage) => Promise<void>) => {
const setupTest = (
testFn: (page: PromptInputTokenModePage) => Promise<void>,
urlSearch = 'hasSecondaryActions=true'
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why do we need to set hasSecondaryActions?

@jperals jperals changed the title fix: PromptInput placholder overflowing when shortcuts are enabled fix: PromptInput placeholder overflowing when shortcuts are enabled May 8, 2026
@ernst-dev ernst-dev requested a review from jperals May 8, 2026 14:04
@ernst-dev ernst-dev enabled auto-merge May 8, 2026 14:07
@ernst-dev ernst-dev added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit d8c41eb May 8, 2026
84 of 86 checks passed
@ernst-dev ernst-dev deleted the dev-v3-ernstka-shortcuts-placeholder branch May 8, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants