Skip to content

fix: responsive layout – game playable on all screen sizes - #31

Merged
makuchpatryk merged 5 commits into
mainfrom
copilot/improve-responsive-ux
Feb 23, 2026
Merged

fix: responsive layout – game playable on all screen sizes#31
makuchpatryk merged 5 commits into
mainfrom
copilot/improve-responsive-ux

Conversation

Copilot AI commented Feb 23, 2026

Copy link
Copy Markdown
Contributor

The game board was hardcoded at WIDTH_GAME = 1000px with fixed-width containers (w-[700px], w-[1200px]), making it overflow and unplayable on screens narrower than ~1000px.

Changes

Game board scaling (GameView.vue)

  • Uses useWindowSize() (VueUse, already a dependency) to reactively track viewport width
  • Computes boardScale = min(1, (windowWidth - 32) / WIDTH_GAME) and applies it as a CSS transform — game logic and drag-and-drop are unaffected
  • Controls row and hint text track the scaled board width
const { width: windowWidth } = useWindowSize();
const boardScale = computed(() =>
  Math.min(1, (windowWidth.value - 32) / WIDTH_GAME)
);

Home page (MainView.vue)

  • w-[700px]w-full max-w-[700px] px-4
  • Loading placeholder span changed from fixed w-[700px] to w-full

Modal (UiModal.vue)

  • w-[1200px] h-[820px]w-[min(90vw,1200px)] h-[min(85vh,820px)]

Layouts (game.vue, default.vue)

  • h-lvh overflow-hiddenmin-h-lvh overflow-x-hidden to allow vertical scrolling on small viewports

i18n

  • Hardcoded Polish hint text in GameView.vue extracted to $t() with English translation added
Original prompt

popraw responsywnosc przy nie ktorych ekranach nie da sie gra i to zle wyglada mozesz to porpawic pod zgledem UX

The user has attached the following files from their workspace:

  • modules/core/index.ts

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

@vercel

vercel Bot commented Feb 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
perplex-image Error Error Feb 23, 2026 11:15pm

Co-authored-by: makuchpatryk <19875907+makuchpatryk@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve responsiveness for better UX on certain screens fix: responsive layout – game playable on all screen sizes Feb 23, 2026
Copilot AI requested a review from makuchpatryk February 23, 2026 22:49
@makuchpatryk
makuchpatryk changed the base branch from feat-multi-select to main February 23, 2026 23:11
@makuchpatryk
makuchpatryk marked this pull request as ready for review February 23, 2026 23:11
@makuchpatryk
makuchpatryk merged commit 577ec22 into main Feb 23, 2026
1 of 4 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