[PageHeadState] Cannot create pageheadstate with name ""

Bug #1356434 reported by Nekhelesh Ramananthan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Won't Fix
High
Tim Peeters

Bug Description

PageHeadState does not accept the state name to be "". As a result that creates issues which requires a hack to fix it.

1. Run the sample app attached where the default pageheadstate is called "".
2. Notice that when the app loads, you don't see the add button despite it being the default state that should be loaded.

Let's say we fix this issue by naming the default state to "Default". We then run into another issue,

1. Run the changed app and notice that the add button is now visible. You will also see a console message that says "State changed to: Default".
2. Press the add button which should trigger the other pageheadstate "contact". Console will also read "State changed to: Contact" as expected.
3. Now press the contact button, and notice that the add button is missing again. Here the console says "State switched to: ". So it switches to the empty "" and not the default state.

Revision history for this message
Nekhelesh Ramananthan (nik90) wrote :
Revision history for this message
Zsombor Egri (zsombi) wrote :

it is not enough to just rename the default "" state to something else, if you want to extend a state like default, then you must specify that. See State QML type documentation.

Changed in ubuntu-ui-toolkit:
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → High
status: New → Triaged
Zoltan Balogh (bzoltan)
Changed in ubuntu-ui-toolkit (Ubuntu):
assignee: nobody → Tim Peeters (tpeeters)
importance: Undecided → High
status: New → Triaged
Zoltan Balogh (bzoltan)
no longer affects: ubuntu-ui-toolkit
Revision history for this message
Tim Peeters (tpeeters) wrote :

The PageHeadState gave multiple problems and has been deprecated. With the new PageHeader component there are better ways to switch between header modes, see the example in this blog post: https://developer.ubuntu.com/en/blog/2016/02/24/pageheader-tutorial/

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Triaged → Won't Fix
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.