fix: enable individual device rotation button for all mobile-capable devices - #1524
Open
ManyaS-Git wants to merge 1 commit into
Open
ManyaS-Git wants to merge 1 commit into
ManyaS-Git wants to merge 1 commit into
Conversation
…devices Separate the concept of 'can rotate' from 'is currently rotated' in the Device component. Previously, the per-device rotate button was disabled when the device was not already rotated, making it impossible to rotate a single device without using the global rotation button first. Now the per-device rotate button is enabled for all mobile-capable devices, regardless of the current rotation state. Also fixes a typo: 'toggleing' -> 'toggling' in Toolbar.tsx. Fixes responsively-org#1492
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR fixes the individual per-device rotation button that was broken in v1.18.0 (Issue #1492).
Root Cause
The previous code used a single variable \isDeviceRotationEnabled\ to control both:
This meant the button was only enabled when
otateDevices || singleRotated\ was true. Since \singleRotated\ starts as \alse, the button was disabled on first render for devices where global rotation was off - making it impossible to rotate a single device.
Fix
Separate the two concerns into distinct variables:
This ensures the per-device rotate button is always enabled for mobile-capable devices, allowing users to rotate individual devices independently.
Changes
Fixes #1492