Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extensions-api: initial hello-world example #817

Merged
merged 8 commits into from
Sep 9, 2020

Conversation

ixrock
Copy link
Contributor

@ixrock ixrock commented Sep 7, 2020

Adds new icon and page in cluster-view

image

@ixrock ixrock requested review from jakolehm and a team September 7, 2020 13:52
@ixrock ixrock marked this pull request as draft September 7, 2020 13:55
@ixrock ixrock added area/extension Something to related to the extension api enhancement New feature or request labels Sep 7, 2020
@ixrock ixrock marked this pull request as ready for review September 8, 2020 14:00
console.log('EXAMPLE EXTENSION: ACTIVATE', this.getMeta())
const { dynamicPages } = this.runtime;

this.unRegisterPage = dynamicPages.register({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the API should be something like:

this.registerPage({
      type: DynamicPageType.CLUSTER,
      path: "/extension-example",
// ...
})

and LensExtension would automatically do unregister etc housekeeping.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

import React from "react";
import path from "path";

let extension: ExampleExtension; // todo: provide instance from context
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't this be achieved by a static method on ExampleExtension?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solution was temporary

@nevalla nevalla changed the base branch from feature/extensions_api to extensions-api September 9, 2020 10:01
…n: menu icon + page

Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Roman <ixrock@gmail.com>
…mo-only)

Signed-off-by: Roman <ixrock@gmail.com>
@nevalla nevalla force-pushed the feature/extensions-api/hello-world branch from 40d3ad0 to 966aa38 Compare September 9, 2020 10:24
Signed-off-by: Roman <ixrock@gmail.com>
Copy link
Contributor

@jakolehm jakolehm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a good start 👍 Let's improve API in follow-up PRs.

@jakolehm
Copy link
Contributor

jakolehm commented Sep 9, 2020

Tests are still failing...

Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
@nevalla nevalla merged commit 5daf53e into extensions-api Sep 9, 2020
@nevalla nevalla deleted the feature/extensions-api/hello-world branch September 9, 2020 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/extension Something to related to the extension api enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants