Skip to content

Allow apps to add themselves to the launcher drop-down

viktor.pracht requested to merge feature/apps_defaultIndexMap into develop

Feature checklist

  • written tests
  • written some documentation (if needed)
  • may started a SCR to inform about breaking changes (point/ext ids, behaviour, api, distinctive classnames)

Implementation notes

ox.ui.apps.launcher is a collection of app IDs. It is only actually used if io.ox/core//apps/list is not configured. New apps are added with:

ox.ui.apps.launcher.add('com.example/app-id');

Any other Collection manipulations are possible, and are immediately reflected in the launcher drop-down. All events are prefixed with launcher: and re-triggered on ox.ui.apps.

Bonus user-visible change: ox.ui.apps itself is not sorted anymore. If the browser's Array.sort() is not stable (Chrome < 70, IE/Edge), non-launcher apps could change their relative order because they all had index -1. This would be visible in the launcher drop-down on mobile. Now, all apps keep their relative order.

Edited by julian.baeume

Merge request reports