1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
Commit Graph

9 Commits

Author SHA1 Message Date
Sebastian Malton
6be465858b
Add IPC capabilities for Extensions (#2775)
* Add IPC capabilities for Extensions

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* revert onA|D change:

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Switch to pushing the disposer in the methods

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* improve documentation, switch to a singleton instead of extension methods

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* fix build

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* make exported class abstract, improve guide

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* fix docs

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* fix lint

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Change guide demo to initialization in constructor

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-05-18 12:24:43 +03:00
Sebastian Malton
9563ead2e6
Fixing Singleton typing to correctly return child class (#1914)
- Add distinction between `getInstance` and `getInstanceOrCreate` since
  it is not always possible to create an instance (since you might not
  know the correct arguments)

- Remove all the `export const *Store = *Store.getInstance<*Store>();`
  calls as it defeats the purpose of `Singleton`. Plus with the typing
  changes the appropriate `*Store.getInstance()` is "short enough".

- Special case the two extension export facades to not need to use
  `getInstanceOrCreate`. Plus since they are just facades it is always
  possible to create them.

- Move some other types to be also `Singleton`'s: ExtensionLoader,
  ExtensionDiscovery, ThemeStore, LocalizationStore, ...

- Fixed dev-run always using the same port with electron inspect

- Update Store documentation with new recommendations about creating
  instances of singletons

- Fix all unit tests to create their dependent singletons

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-04-21 09:59:59 -04:00
Sebastian Malton
49a01b7922 Fix Extension Docs (#2377)
Co-authored-by: Jim Ehrismann <40840436+jim-docker@users.noreply.github.com>
2021-04-19 11:46:07 -04:00
Sebastian Malton
1470103fd4
Add lens:// protocol handling with a routing mechanism (#1949)
- Add lens:// protocol handling with a routing mechanism

- document the methods in an extension guide

- remove handlers when an extension is deactivated or removed

- make sure that the found extension when routing a request is currently enabled (as a backup)

- added documentation about the above behaviour to the guide

- tweaked the naming convention so that it is clearer that the router uses extension names as not IDs (which currently are folder paths)

- Convert the extension API to use an array for registering handlers

- switch design to execute both main and renderer handlers simultaneously, without any overlap checking

- change open to be a dev dep

- improve docs, export types for extensions, skip integration tests

- switch to event emitting renderer being ready

- Add logging and fix renderer:loaded send to main

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2021-02-25 09:32:40 -05:00
pauljwil
c609ea1d96
Reworked Extension Guides (#1727)
Edited and reworked content in the Extension Guides Overview and the Generator and Main Extension guides.

Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Update docs/extensions/guides/main-extension.md

Co-authored-by: Panu Horsmalahti <panu.horsmalahti@iki.fi>

Update docs/extensions/guides/generator.md

Co-authored-by: chh <1474479+chenhunghan@users.noreply.github.com>
Signed-off-by: Paul Williams <pawilliams@mirantis.com>

Co-authored-by: Paul Williams <pawilliams@mirantis.com>
Co-authored-by: chh <1474479+chenhunghan@users.noreply.github.com>
2020-12-15 11:55:04 +08:00
Jim Ehrismann
238756be72
cluster feature extension guide (#1527)
* added more sample extensions to overvew list, started clusterFeatures doc

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* cluster-feature extension guide

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>

* resolve merge conflict, plus address review comments, tweaks

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
2020-11-26 08:55:27 -05:00
Sebastian Malton
1547142125
Add starting point for mobx related documentaion (#1422)
* add a brief overview to our use of mobx and mark all observable fields as observable in our docs

* add to navigation

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2020-11-25 14:05:58 -05:00
Jim Ehrismann
b0b2a99372
Extension Guides documentation (#1427)
- overview
- main extension guide

Signed-off-by: Jim Ehrismann <jehrismann@mirantis.com>
2020-11-18 09:01:42 +02:00
Jari Kolehmainen
f8ae8cc53d
Restructure docs menu (#1235)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
2020-11-05 17:30:49 +02:00