-
Notifications
You must be signed in to change notification settings - Fork 137
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
[2 pane layout] Tablet mode detection logic change #13228
Open
AnirudhBhat
wants to merge
3
commits into
issue/13221-remove-variation-quantity
Choose a base branch
from
issue/12861-windowsize-detection-logic-change
base: issue/13221-remove-variation-quantity
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[2 pane layout] Tablet mode detection logic change #13228
AnirudhBhat
wants to merge
3
commits into
issue/13221-remove-variation-quantity
from
issue/12861-windowsize-detection-logic-change
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… and height for split mode.
AnirudhBhat
added
type: bug
A confirmed bug.
category: tablet
Specific to tablet devices such as a Galaxy Tab or an iPad.
labels
Dec 31, 2024
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## issue/13221-remove-variation-quantity #13228 +/- ##
===========================================================================
- Coverage 40.64% 40.64% -0.01%
Complexity 6380 6380
===========================================================================
Files 1349 1349
Lines 77400 77407 +7
Branches 10647 10647
===========================================================================
Hits 31461 31461
- Misses 43159 43166 +7
Partials 2780 2780 ☔ View full report in Codecov by Sentry. |
AnirudhBhat
changed the title
[Woo POS][Non-Simple Products] Tablet mode detection logic change
[2 pane layout] Tablet mode detection logic change
Jan 3, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
category: tablet
Specific to tablet devices such as a Galaxy Tab or an iPad.
type: bug
A confirmed bug.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #12861
Description
This PR refactors the tablet detection logic to account for both width and height dimensions when determining if a device qualifies as a tablet. The updated logic improves compatibility with larger phones especially in landscape mode.
Changes Introduced:
New Size Class Determination Method:
Introduced
determineWindowSizeClassByDimensions(widthDp: Int, heightDp: Int)
.Evaluates both
shortSize
andlongSize
(smallest and largest dimensions, respectively) to classify devices asCompact
,Medium
, orExpandedAndBigger
.Steps to reproduce
On smaller devices: The screen remains in single-pane mode and does not split into tablet mode.
On larger phones and tablets: The screen transitions to split-pane (tablet) mode as expected.
The tests that have been performed
Verified behaviour on below emulators:
Tablets (portrait and landscape)
Large phones in landscape mode
Images/gif
tablet_detection_logic.mp4
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: