# Extension: Removing/reordering Launcher categories

**URL:** <https://discourse.jupyter.org/t/extension-removing-reordering-launcher-categories/4408>\
**Category:** JupyterLab\
**Created:** [May 15, 2020, 4:34pm UTC](https://discourse.jupyter.org/t/extension-removing-reordering-launcher-categories/4408 "2020-05-15T16:34:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Telorast](https://avatars.discourse-cdn.com/v4/letter/t/aeb1de/32.png) [@Telorast](https://discourse.jupyter.org/u/Telorast)\
**Post date:** [May 15, 2020, 4:34pm UTC](https://discourse.jupyter.org/t/extension-removing-reordering-launcher-categories/4408/1 "2020-05-15T16:34:54Z")

</div>

I am attempting to customise the Launcher for a JupyterLab session for students, specifically by arranging important links at the top of the launcher. However, category order seems to be hard-coded using KNOWN\_CATEGORIES = [‘Notebook’, ‘Console’, ‘Other’], so any items I add either need to be in or below these categories.

Is there a simple way to override KNOWN\_CATEGORIES and/or remove the other items in the Notebook category without creating an entire separate custom Launcher extension, as suggested [here](https://discourse.jupyter.org/t/jupyterlab-loader-removal/3670/4) or [here](https://discourse.jupyter.org/t/removing-a-launcher-category/778)?

---

<div class="post-metadata">

**Author:** ![jasongrout](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/jasongrout/32/371_2.png) [@jasongrout](https://discourse.jupyter.org/u/jasongrout)\
**Post date:** [May 18, 2020, 6:12pm UTC](https://discourse.jupyter.org/t/extension-removing-reordering-launcher-categories/4408/2 "2020-05-18T18:12:56Z")

</div>

Short answer is no, there isn’t a simple way to override those categories. It looks like those categories are [hardcoded](https://github.com/jupyterlab/jupyterlab/blob/4fe4dcfe5c9dc329bed2dcf2602f569ddef8a8a0/packages/launcher/src/index.tsx#L178-L188) in the existing Launcher, so either a PR to the existing launcher to make it more configurable, or replacing the core Launcher with your own, seem like the natural options for moving forward.

---

<div class="post-metadata">

**Author:** ![jtakacs](https://avatars.discourse-cdn.com/v4/letter/j/ecae2f/32.png) [@jtakacs](https://discourse.jupyter.org/u/jtakacs)\
**Post date:** [July 24, 2020, 10:11am UTC](https://discourse.jupyter.org/t/extension-removing-reordering-launcher-categories/4408/3 "2020-07-24T10:11:52Z")

</div>

Can you please show me an example, how to replace a core extension?  
One of my concern is that the ILauncher interface will not be available when I disable the core launcher.  
And even if I extend this interface, and create my own launcher, the other extensions which register themselfs with the core launcher, how can they find my replacement extension.

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [July 29, 2020, 1:02am UTC](https://discourse.jupyter.org/t/extension-removing-reordering-launcher-categories/4408/4 "2020-07-29T01:02:10Z")

</div>

If you implement [ILauncher](https://github.com/jupyterlab/jupyterlab/blob/b5024e97f8b9160dd9cef70d619027fbf7a47aa7/packages/launcher/src/index.tsx#L59-L71) (exactly one method, `add`), and return an instance of that from your plugin’s `activate` function, your extension will receive all of the calls that would have gone to the core implementation. I actually don’t have a concrete example of doing so, but you kinda just start solving the typescript puzzle (either in an editor that supports typescript, or with the `tsc -w` running).

A few [singletons](https://jupyterlab.readthedocs.io/en/stable/developer/extension_dev.html#application-object) (e.g. the app’s `CommandRegistry` and `ServiceManager`) don’t work this way, but pretty much everything else does.

The term of art here is [dependency injection](https://en.wikipedia.org/wiki/Dependency_injection). Other frameworks like AngularJS or Sprotty take this maybe a little too far, but have their reasons for doing so (fully integrated test tools, parity with Java tooling, etc). I personally find the Lumino level pretty useful for organizing applications without making piles of `ImplementationFactoryActualizationMethodCallers` (though to be fair, `ABCWidgetFactory` you have to build for Documents basically sounds just as made up until you dig into it).
