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

Eliminate redundancy in application of Action availablility on ActionPopup and ActionBar

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Obsolete
    • Neutral
    • None
    • 5.0
    • None
    • None

    Description

      BrowserPresenter contains some functions that are identical or similar to those in BrowserSubApp.
      The methods were created in BrowserPresenter because that seems to be the proper location and the ActionBar methods will probably move to that file as well.

      isSectionVisible is duplicated.
      getVisibleSection is duplicated.
      showActionPopup is very similar to BrowserSubApp.updateActionBar

      A solution would be to create a method (bad name) ±prepareConfiguredActionBarDefinitionForItem(item,...) which would get the currently selected items and would create a new bean of only the sections, groups, items that apply to this item - and also with enabled flags properly set according to the action availability rules.
      Then, both the actionbar and the actionpopup could use this method to determine what to display - but then each could use the configuredDefintion in their own way.

      Checklists

        Acceptance criteria

        Attachments

          There are no Sub-Tasks for this issue.

          Activity

            People

              Unassigned Unassigned
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoD