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

clean-up/update "todo/fixme-comments"

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2020-07-21 11:43:00 +03:00
parent 1510091cd2
commit c0c1c227ca
8 changed files with 11 additions and 15 deletions

View File

@ -61,7 +61,7 @@ export class BaseStore<T = any> extends Singleton {
},
});
const storedModel = Object.assign({}, this.storeConfig.store);
Reflect.deleteProperty(storedModel, "__internal__"); // fixme: avoid "external-internals"
Reflect.deleteProperty(storedModel, "__internal__"); // todo: avoid "external-internals"
logger.info(`[STORE]: LOADED from ${this.storeConfig.path}`);
this.fromStore(storedModel);
this.isLoaded = true;
@ -69,8 +69,7 @@ export class BaseStore<T = any> extends Singleton {
protected async save(model: T) {
logger.info(`[STORE]: SAVING ${this.name}`);
// todo: avoid multiple file updates
// fixme: https://github.com/sindresorhus/conf/issues/114
// todo: update when fixed https://github.com/sindresorhus/conf/issues/114
Object.entries(model).forEach(([key, value]) => {
this.storeConfig.set(key, value);
});

View File

@ -19,7 +19,7 @@ export interface IpcMessageOpts<A extends any[] = any> {
channel: IpcChannel
webContentId?: number; // sends to single webContents view
filter?: (webContent: WebContents) => boolean
timeout?: number; // fixme: add support
timeout?: number; // todo: add support
args?: A;
}

View File

@ -24,7 +24,7 @@ export class SelfSubjectRulesReview extends KubeObject {
static kind = "SelfSubjectRulesReview"
spec: {
// fixme: add more types from api docs
// todo: add more types from api docs
namespace?: string;
}

View File

@ -1,5 +1,5 @@
import get from "lodash/get";
import { IKubeObjectMetadata, KubeObject } from "./kube-object";
import { KubeObject } from "./kube-object";
interface IToleration {
key?: string;
@ -47,9 +47,7 @@ export interface IAffinity {
}
export class WorkloadKubeObject extends KubeObject {
// fixme: add type
spec: any;
spec: any; // todo: add proper types
getSelectors(): string[] {
const selector = this.spec.selector;

View File

@ -63,7 +63,7 @@ export class CrdList extends React.Component {
if (selectedGroups.length == 1) placeholder = <><Trans>Group</Trans>: {selectedGroups[0]}</>
if (selectedGroups.length >= 2) placeholder = <><Trans>Groups</Trans>: {selectedGroups.join(", ")}</>
return {
// fixme: move to global filters
// todo: move to global filters
filters: (
<Select
className="group-select"

View File

@ -11,11 +11,9 @@ import { DrawerItem } from "../drawer";
import { KubeObjectDetailsProps } from "../kube-object";
import { apiManager } from "../../api/api-manager";
import { crdStore } from "./crd.store";
import { KubeObject } from "../../api/kube-object";
import { KubeObjectMeta } from "../kube-object/kube-object-meta";
// fixme: provide type-safe check for status
interface Props extends KubeObjectDetailsProps<KubeObject & { status: any }> {
interface Props extends KubeObjectDetailsProps {
}
@observer

View File

@ -8,6 +8,8 @@ import { Animate } from "../animate";
import { cssNames, noop, stopPropagation } from "../../utils";
import { navigation } from "../../navigation";
// todo: refactor + handle animation-end in props.onClose()?
export interface DialogProps {
className?: string;
isOpen?: boolean;
@ -24,7 +26,6 @@ interface DialogState {
isOpen: boolean;
}
// fixme: handle animation end props.onClose() (await props.close()?)
@observer
export class Dialog extends React.PureComponent<DialogProps, DialogState> {
private contentElem: HTMLElement;

View File

@ -8,7 +8,7 @@ import { autobind, cssNames } from "../../utils";
import { Animate } from "../animate";
// todo: refactor -- better positioning + remove "flying effect"
// fixme: always render outside of parent element ("overflow: auto" should not affect tooltip)
// todo: always render outside of parent element ("overflow: auto" should not affect tooltip)
export interface TooltipProps {
htmlFor: string;