Skip to content

fix: enable individual device rotation button for all mobile-capable devices - #1524

Open
ManyaS-Git wants to merge 1 commit into
responsively-org:mainfrom
ManyaS-Git:fix/individual-device-rotation-button
Open

ManyaS-Git wants to merge 1 commit into
responsively-org:mainfrom
ManyaS-Git:fix/individual-device-rotation-button

Conversation

@ManyaS-Git

Copy link
Copy Markdown

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:

  1. Whether the per-device rotate button was enabled
  2. Whether width/height rotation should be applied

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:

  • \canRotateDevice\ - whether this device type supports rotation (\device.isMobileCapable). Used to enable/disable the button.
  • \isDeviceRotated\ - whether the device is currently rotated (global or individual). Used to apply the width/height swap.

This ensures the per-device rotate button is always enabled for mobile-capable devices, allowing users to rotate individual devices independently.

Changes

  • **\Device/index.tsx**: Split \isDeviceRotationEnabled\ into \canRotateDevice\ (button enabled state) and \isDeviceRotated\ (rotation applied state)
  • **\Toolbar.tsx**: Fixed typo: 'toggleing' -> 'toggling'

Fixes #1492

…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
@CLAassistant

CLAassistant commented Jul 27, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

The individual rotation button doesn’t work; only the general rotation button works. v1.18.0

2 participants