Skip to content

Commit

Permalink
update per PR comments
Browse files Browse the repository at this point in the history
Signed-off-by: Yulong Ruan <ruanyl@amazon.com>
  • Loading branch information
ruanyl committed Oct 13, 2023
1 parent 018395f commit a21adee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/core/public/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -348,4 +348,4 @@ export {

export { __osdBootstrap__ } from './osd_bootstrap';

export { WorkspacesStart, WorkspacesSetup, WorkspacesService } from './workspace';
export { WorkspacesStart, WorkspacesSetup } from './workspace';
11 changes: 6 additions & 5 deletions src/core/public/workspace/workspaces_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ interface WorkspaceObservables {

/**
* The list of available workspaces. This workspace list should be set by whoever
* the workspace functionalities
* implemented the workspace functionalities, core workspace module should not be
* aware of how to populate the workspace list.
*/
workspaceList$: BehaviorSubject<WorkspaceObject[]>;

Expand All @@ -39,7 +40,7 @@ interface WorkspaceObservables {
}

enum WORKSPACE_ERROR {
WORKSPACE_STALED = 'WORKSPACE_STALED',
WORKSPACE_IS_STALE = 'WORKSPACE_IS_STALE',
}

export type WorkspacesSetup = WorkspaceObservables;
Expand All @@ -66,13 +67,13 @@ export class WorkspacesService implements CoreService<WorkspacesSetup, Workspace

if (currentWorkspaceId && !currentWorkspace?.id) {
/**
* Current workspace is staled
* Current workspace is stale
*/
this.currentWorkspaceId$.error({
reason: WORKSPACE_ERROR.WORKSPACE_STALED,
reason: WORKSPACE_ERROR.WORKSPACE_IS_STALE,
});
this.currentWorkspace$.error({
reason: WORKSPACE_ERROR.WORKSPACE_STALED,
reason: WORKSPACE_ERROR.WORKSPACE_IS_STALE,
});
}
}
Expand Down
1 change: 0 additions & 1 deletion src/core/types/workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ export interface WorkspaceAttribute {
features?: string[];
color?: string;
icon?: string;
defaultVISTheme?: string;
reserved?: boolean;
}

0 comments on commit a21adee

Please sign in to comment.