Skip to content

Fix Google Flights swap button layout#21

Open
hqhq1025 wants to merge 1 commit into
aiming-lab:mainfrom
hqhq1025:codex/fix-google-flights-swap-layout
Open

Fix Google Flights swap button layout#21
hqhq1025 wants to merge 1 commit into
aiming-lab:mainfrom
hqhq1025:codex/fix-google-flights-swap-layout

Conversation

@hqhq1025
Copy link
Copy Markdown

Summary

Fixes the Google Flights homepage search form layout so the swap button stays centered between the origin and destination fields instead of drifting into the destination field when the origin input has content.

Changes:

  • Wraps origin, swap, and destination controls in a dedicated .search-route-fields container.
  • Positions .search-swap relative to that route-field group instead of the full search row that also includes date fields.
  • Gives route and date groups stable flex sizing and min-width: 0 constraints.
  • Keeps the swap button hidden in the mobile stacked layout.

Verification

  • python3 -m py_compile sites/google_flights/app.py
  • git diff --check
  • Playwright render check on the Google Flights homepage:
    • filled origin with LHR
    • verified swap button center equals the seam between origin and destination fields
    • verified swap button is before the dates group, not inside destination/date fields
    • verified mobile layout hides the swap button
  • Screenshot artifact: /tmp/google-flights-swap-desktop.png

Fixes #20.

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.

Google Flights swap button shifts into destination field

1 participant