New header doesn't take actions visibility into account
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
Critical
|
Tim Peeters | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
In messaging-app we switch the visibility of some actions under some situations .
Ie: we only display the "Add contact" button if the contact is unknown, we only display the "Show profile" if the contact is known,
we only display the "selection mode" action if there is at least one message.
The ToolbarItems {} has at least 5 actions in total, but they are not all displayed at the same time. We switch the visibility on demand. I see that even when there are no visible actions, the overflow icon still appears in the header.
I suppose it is taking into account the number of actions instead of visible actions in order to display the overflow icon.
Having different sets of ToolbarItems for each situation would work but increases the code complexity and would require apps to duplicate code internally as a particular action could be present in different situations, like the "Call button" which is present no matter if the contact is known or unknown.
Related branches
- Zsombor Egri: Approve
- Nekhelesh Ramananthan (community): Approve (testing)
- PS Jenkins bot: Approve (continuous-integration)
-
Diff: 179 lines (+64/-12)4 files modifiedmodules/Ubuntu/Components/Action.qml (+0/-4)
modules/Ubuntu/Components/Themes/Ambiance/NewHeaderStyle.qml (+26/-6)
tests/autopilot/ubuntuuitoolkit/tests/custom_proxy_objects/test_header.py (+33/-0)
tests/resources/toolbar/headerTools.qml (+5/-2)
Changed in ubuntu-ui-toolkit: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Tim Peeters (tpeeters) |
tags: | added: header |
Changed in ubuntu-ui-toolkit: | |
importance: | High → Critical |
Changed in ubuntu-ui-toolkit: | |
status: | Fix Committed → Fix Released |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Fix Released |
note that for the "call" button maybe you can use the "enabled" property. Setting enabled of the action to false should make the button greyed out and not clickable.