Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-3096

Section availability for multiple selection is plain wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 5.2.8, 5.3.2
    • Fix Version/s: 5.3.x
    • Component/s: None

      Description

      There was one silly code leftover from 5.3 development in ConfiguredActionbarSectionDefinition, which I tentatively removed ahead of 5.3.2, but had to revert back:

          public void setAvailability(AvailabilityDefinition availability) {
              // FIXME This is plain wrong, availability for multiple selection matches sections for which it is not configured (i.e. set to false)
              // But we have to keep it for the time being because some content apps rely on this incorrect behavior.
              ((ConfiguredAvailabilityDefinition) availability).setMultiple(true);
              this.availability = availability;
          }

      In essence:

      • availability for multiple selection matches sections for which the multiple property is not true (i.e. non-exisiting or set to false)
      • but many content apps (+ UI tests) rely on this incorrect behavior.
        • e.g. contacts, categories do have a multiple section configured, but they don't even have an availability subnode with multiple set to true.
        • When trashing the silly line, one can end up with en empty action bar.

      As a result, currently we always fall back on the first configured section — typically the one dealing with singular item selection — so the set of actions displayed, their labeling and the section title are all wrong.

      Side note: multiple availability does work correctly on individual actions; most of them are expectedly disabled when selecting multiple items.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              mgeljic Mikaël Geljić
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated: