Skip to content

Fix mobile UI layout: adaptive button placement, icon sizing, responsive wrapping, and language switcher repositioning#11

Merged
lynxzp merged 5 commits intomainfrom
copilot/improve-mobile-ui-layout
Dec 23, 2025
Merged

Fix mobile UI layout: adaptive button placement, icon sizing, responsive wrapping, and language switcher repositioning#11
lynxzp merged 5 commits intomainfrom
copilot/improve-mobile-ui-layout

Conversation

Copy link
Contributor

Copilot AI commented Dec 23, 2025

Mobile UI Layout Improvements

  • Analyze the current HTML, CSS, and JavaScript structure
  • Fix button overlap: Move "Show template" button to its own row to prevent overlapping with printer select field
  • Fix symbol width inconsistency: Ensure hint icons have consistent width (18px) across all screen sizes
  • Improve element wrapping: Adjust form-group grid to wrap gracefully on smaller screens
  • Test the changes by running the application locally
  • Take screenshots to verify mobile-friendly layout
  • Address code review feedback
  • Make button layout adaptive per user feedback
  • Fix Edit button overflow on tablet
  • Fix language switcher overlap - moved to bottom right
  • Run tests (all passing)
  • Final code review
  • Finalize changes

Summary

This PR successfully addresses all mobile UI layout issues with an adaptive design approach:

Button placement adaptive: "Show template" button stays on same line as printer selector when space is available (desktop/wide screens), wraps to new line only when insufficient space (tablet/mobile)
Symbol width consistency: The "?" hint icons have consistent 18px size across all screen sizes
Graceful wrapping: Form elements wrap properly using flexbox when horizontal space is insufficient
Edit button fixed: "Edit" button in "Additional Settings" no longer overflows on tablet screens
Language switcher fixed: Language switcher (EN/УК) repositioned to bottom-right corner - no longer overlaps with title

Changes Made:

  1. Adaptive Button Layout: Used flexbox with flex-wrap: wrap for both "Show Template" and "Edit" buttons
    • Desktop (>768px): Buttons appear inline with their respective sections
    • Tablet (768px): Buttons wrap naturally when space is insufficient
    • Mobile (<480px): Buttons take full width
  2. Fixed Edit Button Overflow: Applied same flexbox approach to "Additional Settings" section to prevent button from overflowing on tablet screens
  3. Fixed Language Switcher Overlap: Moved language switcher from top-right to bottom-right corner
    • Changed top: 20px to bottom: 20px
    • No longer overlaps with page title or any content
    • Remains accessible and visible on all screen sizes
  4. Symbol Width Consistency: Hint icon ("?") has consistent 18px width/height with flex-shrink: 0
  5. Label Wrapping: Labels use flex-wrap: wrap for graceful text+icon wrapping

Testing:

  • ✅ Built and tested at multiple viewport sizes (desktop 1280px, tablet 768px, mobile 375px, 320px)
  • ✅ All Go tests pass (3/3 test suites)
  • ✅ Verified Edit button stays within page bounds on tablet
  • ✅ Verified language switcher in bottom corner doesn't overlap any content
  • ✅ All buttons have proper adaptive behavior

Screenshots:

Desktop (1280px) - Language switcher at bottom right:

Tablet (768px) - Clear title, switcher at bottom:

Mobile (375px) - No overlap, switcher accessible:

Mobile (320px) - Proper positioning maintained:

Original prompt

The current mobile UI layout for the repository lynxzp/printloop is problematic and needs improvement for better user experience. Specifically:

  • The button "Show template" overlaps with the "select printer" edit field.
  • Symbols such as "?" change width unpredictably.
  • Elements do not gracefully wrap to the next line when there's insufficient horizontal space, leading to a cluttered appearance.

The goal is to make the UI mobile-friendly by addressing these issues. This includes adjustments to the layout where elements automatically wrap to the next line when there is insufficient horizontal space. Moreover, refine the alignment and spacing to ensure no overlapping UI elements and consistent symbol width.

This pull request was created from Copilot chat.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits December 23, 2025 19:40
Co-authored-by: lynxzp <11291363+lynxzp@users.noreply.github.com>
Co-authored-by: lynxzp <11291363+lynxzp@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix mobile UI layout issues for better user experience Fix mobile UI layout: button overlap, icon sizing, and responsive wrapping Dec 23, 2025
Copilot AI requested a review from lynxzp December 23, 2025 19:46
@lynxzp
Copy link
Owner

lynxzp commented Dec 23, 2025

@copilot now "show template" is always on new line. I want adaptive design, it should be on same line with "select printer" if there are enough space

…s on mobile

Co-authored-by: lynxzp <11291363+lynxzp@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 23, 2025

@copilot now "show template" is always on new line. I want adaptive design, it should be on same line with "select printer" if there are enough space

Changed to adaptive flexbox layout in commit 9de89d1. The "Show template" button now stays on the same line with "Select printer" when there's enough space (desktop), and wraps to a new line only when needed (tablet/mobile).

Desktop (1280px) - Button inline:
Desktop

Tablet (768px) - Button wraps:
Tablet

Mobile (375px) - Full width:
Mobile

Copilot AI changed the title Fix mobile UI layout: button overlap, icon sizing, and responsive wrapping Fix mobile UI layout: adaptive button placement, icon sizing, and responsive wrapping Dec 23, 2025
@lynxzp
Copy link
Owner

lynxzp commented Dec 23, 2025

@copilot in the Tablet (768px) mode button "Edit" is out of the main page

…l Settings

Co-authored-by: lynxzp <11291363+lynxzp@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Dec 23, 2025

@copilot in the Tablet (768px) mode button "Edit" is out of the main page

Fixed in commit f8ee38c. Applied the same flexbox layout to the "Additional Settings" section so the "Edit" button stays within the page bounds and wraps properly on all screen sizes.

Tablet (768px) - Edit button now properly contained:
Tablet Fixed

Desktop (1280px) - Edit button inline:
Desktop

Mobile (375px) - Full width:
Mobile

@lynxzp
Copy link
Owner

lynxzp commented Dec 23, 2025

@copilot Good. One more thing - button to switch language is cover title on laptop and mobile screens

Copy link
Contributor Author

Copilot AI commented Dec 23, 2025

@copilot Good. One more thing - button to switch language is cover title on laptop and mobile screens

Fixed in commit 2460aa2. Added horizontal padding to the h1 title at all breakpoints to ensure the language switcher doesn't overlap with the title text on laptop and mobile screens.

Desktop (1280px) - Clear spacing:
Desktop

Tablet (768px) - No overlap:
Tablet

Mobile (375px) - Properly spaced:
Mobile 375px

Mobile (320px) - Title clear:
Mobile 320px

Copilot AI changed the title Fix mobile UI layout: adaptive button placement, icon sizing, and responsive wrapping Fix mobile UI layout: adaptive button placement, icon sizing, responsive wrapping, and language switcher spacing Dec 23, 2025
@lynxzp
Copy link
Owner

lynxzp commented Dec 23, 2025

@copilot oh, no, revert last changes. Changing font not solved this problem. Make this button no not float over title space in anoter way - stack it to the top or bottom

Copy link
Contributor Author

Copilot AI commented Dec 23, 2025

@copilot oh, no, revert last changes. Changing font not solved this problem. Make this button no not float over title space in anoter way - stack it to the top or bottom

Reverted the h1 padding changes in commit 9cb844d. Moved the language switcher to the bottom-right corner instead (changed top: 20px to bottom: 20px). This prevents any overlap with the title while keeping the switcher visible and accessible.

Desktop (1280px) - Switcher at bottom right:
Desktop

Tablet (768px) - Clear title area:
Tablet

Mobile (375px) - No overlap:
Mobile 375px

Mobile (320px) - Clean layout:
Mobile 320px

Copilot AI changed the title Fix mobile UI layout: adaptive button placement, icon sizing, responsive wrapping, and language switcher spacing Fix mobile UI layout: adaptive button placement, icon sizing, responsive wrapping, and language switcher repositioning Dec 23, 2025
@lynxzp lynxzp force-pushed the copilot/improve-mobile-ui-layout branch from 9cb844d to f8ee38c Compare December 23, 2025 20:42
@lynxzp lynxzp marked this pull request as ready for review December 23, 2025 20:43
@lynxzp lynxzp merged commit 5f3261b into main Dec 23, 2025
1 check passed
@lynxzp lynxzp deleted the copilot/improve-mobile-ui-layout branch December 23, 2025 20:44
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