← Back to team overview

touch-packages team mailing list archive

[Bug 1395118] Re: ActionSelectionPopover does not handle the 'visible' property of actions properly

 

This bug was fixed in the package ubuntu-ui-toolkit -
1.1.1298+15.04.20150218.1~rtm-0ubuntu1

---------------
ubuntu-ui-toolkit (1.1.1298+15.04.20150218.1~rtm-0ubuntu1) 14.09; urgency=medium

  [ Niklas Wenzel ]
  * ActionSelectionPopover: Handle the 'visible' property of actions
    properly (LP: #1395118)
 -- CI Train Bot <ci-train-bot@xxxxxxxxxxxxx>   Wed, 18 Feb 2015 16:59:43 +0000

** Changed in: ubuntu-ui-toolkit (Ubuntu RTM)
       Status: In Progress => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to ubuntu-ui-toolkit in
Ubuntu.
https://bugs.launchpad.net/bugs/1395118

Title:
  ActionSelectionPopover does not handle the 'visible' property of
  actions properly

Status in the base for Ubuntu mobile products:
  In Progress
Status in File Manager application for Ubuntu devices:
  New
Status in ubuntu-ui-toolkit package in Ubuntu:
  Fix Released
Status in ubuntu-ui-toolkit package in Ubuntu RTM:
  Fix Released

Bug description:
  When setting the 'visible' property of an action in an ActionList of
  an ActionSelectionPopover to false, the delegate will not be hidden
  but instead be shown at the top of the list behind the first visible
  delegate. (Check out the screenshot.)

  Demo code (containing an outcommented workaround):

  import QtQuick 2.3
  import Ubuntu.Components 1.1
  import Ubuntu.Components.Popups 1.0
  import Ubuntu.Components.ListItems 1.0

  MainView {
      width: units.gu(50)
      height: units.gu(75)

      Page {
          title: i18n.tr("ActionSelectionPopover Fix")

          Button {
              id: button
              width: parent.width

              text: i18n.tr("Show popover")

              onClicked: {
                  PopupUtils.open(actionSelectionPopoverComponent, button)
              }
          }

          Component {
              id: actionSelectionPopoverComponent

              ActionSelectionPopover {
                  actions: ActionList {
                      Action {
                          text: "Action one"
                      }
                      Action {
                          text: "Action two"
                      }
                      Action {
                          text: "Hidden action"
                          visible: false
                      }
                  }

                  // Uncomment the following for a temporary workaround:

  //                delegate: Empty {
  //                    id: listItem
  //                    Label {
  //                        text: listItem.text
  //                        anchors {
  //                            verticalCenter: parent.verticalCenter
  //                            horizontalCenter: parent.horizontalCenter
  //                        }
  //                        wrapMode: Text.Wrap
  //                        color: Theme.palette.normal.overlayText
  //                    }
  //                    /*! \internal */
  //                    onTriggered: popover.hide()
  //                    visible: enabled && ((action === undefined) || action.visible)
  //                    height: visible ? implicitHeight : 0
  //                }
              }
          }
      }
  }

To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1395118/+subscriptions