Skip to content

fix: pinned context styling fixes #394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 14, 2025
Merged

Conversation

avi-alpert
Copy link
Contributor

@avi-alpert avi-alpert commented Jul 11, 2025

Problem

The prompt top bar component had several issues that needed to be addressed:

  1. Context pills border colors were too bold
  2. Font size in the top bar buttons was too large
  3. Calculation error in the responsive layout logic that incorrectly handled available space: The width of the overflow pill was being double counted, so sometimes context pills wouldn't be visible even if there was enough space
  4. Inconsistent test IDs with typos (tobBar instead of topBar)

Solution

This PR implements several improvements to the prompt top bar component:

UI Improvements

• Added proper border color to context pills, set font size for top bar buttons
• Fixed overflowWidth being double counted in the responsive layout calculation

Configuration Updates

• Enabled pinned context by default in the example app by setting showPinnedContext to true

Test Updates

• Updated UI test snapshots to reflect the visual changes
• Fixed test selectors to use the corrected test IDs
• Fixed typos in test IDs by renaming all instances of tobBar to topBar

These changes improve the visual consistency and functionality of the prompt top bar component while ensuring tests pass correctly.

Screenshots:
Before:
Screenshot 2025-07-11 at 11 51 40 AM

After:
Screenshot 2025-07-11 at 11 52 16 AM

Before:
Screenshot 2025-07-11 at 11 52 44 AM

After:
Screenshot 2025-07-11 at 11 52 50 AM

Tests

  • I have tested this change on VSCode
  • I have tested this change on JetBrains
  • I have added/updated the documentation (if applicable)

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@avi-alpert avi-alpert marked this pull request as ready for review July 11, 2025 16:02
@avi-alpert avi-alpert requested a review from a team as a code owner July 11, 2025 16:02
@avi-alpert avi-alpert merged commit d693ca0 into aws:main Jul 14, 2025
4 of 5 checks passed
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