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

Add IProvideComponentHTMLView interface as partial to IComponent #766

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export interface IComponentHTMLView extends IComponentHTMLRender {
remove(): void;
}

export interface IProvideComponentHTMLView {
Copy link
Contributor

Choose a reason for hiding this comment

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

In general i don't think this is the right direction, as it makes using these interfaces more complicated. It would require a check for IComponentHTMLView and IComponentHTMLVisual to figure out if something can render.

This also isn't the long term plan for these interfaces, so i'd rather not make changes in the runtime until we have a better long term plan. You should work with @ChumpChief on the pattern you are using to get unblocked in the short term, and provide longer term feedback

readonly IComponentHTMLView: IComponentHTMLView
}

export interface IProvideComponentHTMLVisual {
readonly IComponentHTMLVisual: IComponentHTMLVisual;
}
Expand Down
3 changes: 2 additions & 1 deletion packages/loader/component-core-interfaces/src/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ import {
IProvideComponentLoadable,
IProvideComponentRunnable,
} from "./componentLoadable";
import { IProvideComponentHTMLVisual } from "./componentRender";
import { IProvideComponentHTMLVisual, IProvideComponentHTMLView } from "./componentRender";
import { IProvideComponentRouter } from "./componentRouter";
import { IProvideComponentHandle, IProvideComponentHandleContext } from "./handles";
import { IProvideComponentSerializer } from "./serializer";

export interface IComponent extends
Readonly<Partial<
IProvideComponentHTMLVisual
& IProvideComponentHTMLView
& IProvideComponentLoadable
& IProvideComponentRunnable
& IProvideComponentRouter
Expand Down