Ubuntu Touch Device Rotation

Registered by Bill Filler on 2013-04-03

Support for device rotation in Ubuntu Touch

Blueprint information

Status:
Started
Approver:
Bill Filler
Priority:
High
Drafter:
Bill Filler
Direction:
Approved
Assignee:
Michał Sawicz
Definition:
Approved
Series goal:
Accepted for saucy
Implementation:
Started
Milestone target:
None
Started by
Bill Filler on 2013-04-03

Related branches

Sprints

Whiteboard

Ubuntu Touch devices need to support device rotation such that the UI correctly utilizes all available space in landscape and portrait modes. The main aspects of the proposed solution are as follows:

- Applications should participate automatically in rotation without having to write any specialized code.
- Applications can override the layout if they choose to perform orientation specific layout
- Applications can opt-out of rotation and have a fixed layout regardless of orientation if they choose.
- The Ubuntu SDK should provide components that are rotation aware and base classes that encapsulate the view rotation.
- The Shell is an active participant in orientation changes and remaps it's input/gesture recognition accordingly.
- QML apps and the shell will use Qt Screen object to learn of orientation changes
- The Screen object implementation will evolve to use a System Setting to report orientation changes rather than use Sensors directly.

May 1st:
- partial or complete
- dash potentially locked
- transitions between differently oriented apps
- potential orientation locking
- running apps needs adapt (probably rectangle)
- nothing happens when app does not support rotation
- current solution for rotation (reflow) is preferred

Proposal for 13.10 v1

UX spec https://docs.google.com/a/canonical.com/document/d/1XCYYoddS49ZKHk3rizX9yiJ2q5BRcOR8vw4LYRxgAz0/edit#heading=h.5a23zixps030

The issues with the current rotation support:
- the indicator panel does not rotate and provides an awkward experience
- the toolbar is no longer available to the app because the shell does not rotate and the launcher gets the edge event
- all of the apps have an indirect connection to the sensor service
- the shell does not support rotation in any way

The users main focus when in landscape mode is on the content, and certain apps and content are most likely to be used in this orientation: viewing web pages, videos and photos, typing a text message or note, taking a picture. The user does not necessarily need to launch new applications, switch applications or view the indicator pulldowns while in this mode which may allow a short term simplification.

The first required step is for the shell to become the arbiter of the rotation event
- only the shell will have a connection to the sensor service
- the shell will offer the apps the opportunity to rotate which they can accept or refuse
- a configuration option to disable rotation could optionally be supported (defer)

Upon rotating there are thee options for the shell behavior in order of potential complexity:
1 - the panel is hidden and the shell does not respond to edge gestures. The user needs to go back to portrait to enable these. (preferred for v1)
2 - the panel rotates and works properly at the top edge, the left and right edges are disabled.
3 - the entire shell rotates and works the same in both orientations. The transition to unrotated or newly launched apps would need to be defined.

Other considerations:
- the dash does not rotate, so if no app is visible nothing rotates
- the thumbnails for rotated apps are shown as square as on the tablet

(?)

Work Items

Work items for ubuntu-13.05:
[saviq] check with design what shell should do when rotated: DONE
[saviq] check with design about RTL support: TODO
[saviq] check with visual design what the rotation transition should look like; is using the screenshots technique acceptable? - this will drive how the shell and applications can be synchronized : DONE
[saviq] what happens when app does not support rotation: DONE

Work items for ubuntu-13.06:
[fboucault] add rotation support to SDK components (probably just Sheets that are re parented to root Item) : DONE
[fboucault] add rotation support to SDK's MainWindow: DONE

Work items:
[thomas-voss] lead discussion on settings APIs: TODO
[ricmm] how does the application tell the shell that it does, or doesn't support rotation: TODO
[oreneeshy] answer whether shell orientation should be partial or complete (all UI elements, all interactions): DONE
[oreneeshy] answer whether dash should remain locked in default orientation: DONE
[oreneeshy] define transitions between differently oriented apps: TODO
[oreneeshy] define UX for potential orientation locking: DONE
[oreneeshy] answer how Dash "Running Apps" should adapt to differently oriented apps (probably rectangle): DONE
[oreneeshy] define Right-To-Left language experience for shell (everything mirrored? just parts?): DONE
[oreneeshy] define Right-To-Left language experience recommendations for apps (everything mirrored? just parts?): DONE

Dependency tree

* Blueprints in grey have been implemented.