Skip to content

style(react-ui): adjust max-width and padding for conversation starter component#810

Merged
ankit-thesys merged 3 commits into
mainfrom
fix/padding_suggestion_prompts
Jul 23, 2026
Merged

style(react-ui): adjust max-width and padding for conversation starter component#810
ankit-thesys merged 3 commits into
mainfrom
fix/padding_suggestion_prompts

Conversation

@i-subham23

@i-subham23 i-subham23 commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Fixes the suggestion-prompt (conversation starter) row's padding and alignment across breakpoints.

Problem

Two related geometry issues, measured in the openui-cloud example:

  1. Narrow widths (content column under 880px): the starter container was max-width: 880px with no horizontal padding, so the chips sat flush against the content edge — 0px gutter — while the composer input below kept its inset.
  2. Wide widths: the starter row was based on the 880px thread column while the composer input uses the narrower 768px column, so once both hit max-width they centered independently and the chip row started ~56px left of the input's edge.

Change

conversationStarter.scss only:

  • Add the same $space-m-l horizontal gutter the thread and composer already use, with max-width compensated by 2× the gutter so the content width is unchanged when uncapped.
  • Base the container on the composer's 768px column (see components/composer.scss) instead of the thread's 880px — the chips belong to the input, so the row now tracks the input's edges at every desktop width.

Test Plan

  • Playwright sweep across 20 viewport widths (360–2560) against the openui-cloud example:
    • chip gutter never below 16px on desktop (was 0px flush at 820–1050)
    • chip row's left edge aligns with the composer input's edge (delta 0) at every desktop width — was −16px when squeezed and −56px when wide
    • mobile layout unchanged (its own 18px padding override still wins)
    • no horizontal overflow, no chip clipping, clean behavior through the mobile↔desktop flip and the max-width transition

…r component

Updated the max-width of the conversation starter to align with the composer box across breakpoints, ensuring proper alignment of pills with the input. Adjusted padding for better spacing consistency.
@i-subham23
i-subham23 requested a review from ankit-thesys July 22, 2026 08:42
i-subham23 and others added 2 commits July 23, 2026 13:08
Cleaned up the conversation starter component's SCSS by removing obsolete comments regarding alignment with the composer box, enhancing code clarity and maintainability.
Base the starter container on the composer's 768px column instead of the
880px thread column. The chips sit above the input, and once both hit
max-width they center independently — an 880 base left the row starting
56px outside the input's edge on wide screens. With the composer column
the chip row aligns with the input at every desktop width; the narrow-
width gutter fix is unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XECS4NLhz6BNd1TUYbWjfu

@ankit-thesys ankit-thesys left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good and tested

@ankit-thesys
ankit-thesys merged commit c44e8ae into main Jul 23, 2026
2 checks passed
@ankit-thesys
ankit-thesys deleted the fix/padding_suggestion_prompts branch July 23, 2026 11:11
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