New header doesn't take actions visibility into account

Bug #1316631 reported by Tiago Salem Herrmann
10
This bug affects 2 people
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.

Tags: header

Related branches

Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Tim Peeters (tpeeters)
Tim Peeters (tpeeters)
tags: added: header
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
importance: High → Critical
Revision history for this message
Tim Peeters (tpeeters) wrote :

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.

Changed in ubuntu-ui-toolkit:
status: Confirmed → In Progress
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging at revision 1051, scheduled for release in ubuntu-ui-toolkit, milestone Unknown

Changed in ubuntu-ui-toolkit:
status: In Progress → Fix Committed
Tim Peeters (tpeeters)
Changed in ubuntu-ui-toolkit:
status: Fix Committed → Fix Released
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.