Skip to content
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

Fix orientation layout issues and enhance landscape support across screens. #77

Merged
merged 11 commits into from
Nov 2, 2024

Conversation

raniabbrk
Copy link
Contributor

This pull request enhances layout handling for landscape orientation across multiple screens and ensures UI consistency and improved responsiveness.

  • Added landscape mode handling for SignInScreen, QuizPlayScreen, ProfileScreen, and LandingScreen.
  • Implemented tests to verify correct rendering of UI elements in landscape mode.
  • Adjusted background image on LandingScreen to better fit landscape orientation.
  • Removed the unnecessary black background from the LandingScreen home button for a cleaner look.

Testing:

  • Verified that all screens render correctly in both portrait and landscape orientations.
  • Ran automated tests to confirm UI elements' visibility and layout in landscape mode.

- Adjusted layout using BoxWithConstraints and LocalConfiguration to dynamically adapt to landscape and portrait modes.
- Resized logo and button based on orientation for consistent layout across devices.
- Refined layout spacing for better alignment and readability in both orientations.
- Updated UI structure for a cleaner, more flexible layout.
…tions

- Adjusted layout to dynamically adapt to both landscape and portrait orientations using LocalConfiguration.
- Added scrollable content in ProfileScreen for better usability on small and large screens and in case some more buttons are added in the future.
- Modified ProfileButton sizes and spacing based on orientation to maintain consistent UI.
- Enhanced padding and alignment, particularly for landscape mode, to improve visual balance.
- Adjusted QuizScreen layout to support both landscape and portrait modes using dynamic padding and alignment.
- Updated button sizes, text styles, and spacing for consistent UI across orientations.
- Modified QuizOptionButton styling to ensure usability and readability in landscape mode.
- Improved background blur effect to maintain focus on content in both orientations.
…trait orientations

- Updated QuizPlayScreen to adjust layout dynamically for landscape and portrait modes using LocalConfiguration.
- Modified button and text sizes, padding, and alignment for consistent UI across orientations.
- Added scrollable content in vertical layouts for better usability in landscape mode and in case more questions are added.
- Applied conditional size adjustments to buttons, score display, and question text for an optimized user experience on various screen sizes.
…t orientations

- Updated SignInScreen to dynamically adjust layout for landscape and portrait modes.
- Resized logo and adjusted spacing based on orientation for a balanced visual experience.
- Modified Google sign-in button width, height, and font size to enhance readability across orientations.
- Improved top bar and padding for consistent UI on different device orientations.
- Implemented landscape mode tests in each screen’s test class to verify UI rendering in horizontal orientation.
…ine home button UI

- Updated the background image on LandingScreen to fit more effectively in landscape orientation, enhancing visual consistency.
- Removed the unnecessary black background from the home button for a cleaner, more cohesive UI.
- Improved overall layout aesthetics and ensured a balanced appearance across both landscape and portrait modes.
@raniabbrk raniabbrk linked an issue Oct 31, 2024 that may be closed by this pull request
…devices in CI

- Adjusted layouts in multiple screens (SignIn, Profile, Quiz, Landing) to enhance support for small screens.
- Added `scrollTo` support in tests for components that may be out of view on smaller devices used by CI.
- Modified fixed sizes to use relative or adaptive dimensions where possible, improving responsiveness across devices.
- Ensured all essential UI elements are accessible and visible on a range of screen sizes, reducing layout issues in automated tests.

These updates aim to make the app and tests more resilient on various device sizes, particularly improving CI test pass rates.
…tton accessibility

- Updated end-to-end test to use performScrollTo for the Home button, ensuring it remains visible across layouts
- Implemented vertical scroll across various screens, replacing static padding and layout adjustments.
- Enhances usability and accessibility for different screen sizes and orientations.
- Provides a consistent user experience by preventing layout shifts and enabling smooth scrolling.
…its in tests

- Added performScrollTo() for key UI elements in tests to ensure visibility in scrollable containers
- Included waitForIdle() after interactions (e.g., clicks) to allow UI to stabilize before assertions
Copy link

sonarqubecloud bot commented Nov 2, 2024

@raniabbrk raniabbrk merged commit d267951 into main Nov 2, 2024
2 checks passed
@raniabbrk raniabbrk deleted the feature/orientation-fix branch November 3, 2024 18:18
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.

Ensure Full Accessibility of Elements During Screen Rotation
2 participants