mozilla / r2d2b2g

Firefox OS Simulator is a test environment for Firefox OS. Use it to test your apps in a Firefox OS-like environment that looks and feels like a mobile phone.
https://addons.mozilla.org/en-US/firefox/addon/firefox-os-simulator/
Other
392 stars 139 forks source link

simulate rotation whether or not app allows orientation change #535

Open mykmelez opened 11 years ago

mykmelez commented 11 years ago

The Simulator's Rotate button simulates orientation, but users expect it to simulate rotation, and they're frequently confused by it, especially when it doesn't work in apps that don't allow orientation changes:

To satisfy user expectations, the Rotate button should unconditionally rotate the Simulator view, even if an app doesn't allow orientation changes. In other words, it should simulate what you see when you rotate a real device: your view of the device also rotates, whether or not it results in the app changing its orientation.

So if you rotate from portrait to landscape, and you're in an app that allows orientation changes, then the view rotates to landscape and the app's orientation changes to landscape. But if you do the same rotation in an app that doesn't allow orientation changes, like the Homescreen, then the view still rotates to landscape, even though the app's orientation doesn't change to landscape; i.e. you see the app turn sideways as the view changes.

ochameau commented 11 years ago

I'm not sure it will completely solve the misundestanding behind orientation change. I would just have added some UI feedback whenever user tries to change the orientation on a app that doesn't support it. Like:

mykmelez commented 11 years ago

Those changes would be useful, but this is actually about more than simply clearing up the confusion about the button. Developers expect to be able to see what will happen when they rotate an actual device (f.e. that their app appears sideways if it locks the orientation).

In other words, they expect the ability to simulate rotation, just like http://louisremi.github.com/orientation-devtool/ does (as described in related issue #312).

arasbm commented 11 years ago

I just wanted to add a note here as a user of simulator that this orientation button really confused me. I was about to report a bug, but I found this report.

I recently wrote an app that I have restricted to portrait mode, because it makes sense when displayed against the tall edge of the phone. Not only the simulator prevents me from rotating the phone, it also does not rotate the app to it's portrait orientation. This makes debugging on the simulator impossible for my app, and everytime I make a tiny change I would have to push the app to the actual device.

I would also like to say that to me it makes a lot more sense if the rotate button always rotates the view regardless of how the app will look. There is no invisible hand preventing me from rotating the physical phone -- the simulator should not do that either. Also, when I rotate the phone I would want to see how the app will look like if it was running on an actual phone and I rotated.

Last comment is about rotation modes. The phone has 4 edges and apps can respond to all those 4 edges. It would be useful if the rotate button also rotated the app to hit all those four modes.

here is my app that uses landscape if you are curious: https://github.com/arasbm/protractor