Skip to content

Commit

Permalink
chore: adjust todos/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Dover authored and Scott Dover committed Oct 4, 2024
1 parent bf70043 commit c1ad860
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
} from "./types";

class ContentAdapterFactory {
// TODO #889 Update this to return RestSASServerAdapter & ITCSASServerAdapter
// TODO #889 Update this to return ITCSASServerAdapter
public create(
connectionType: ConnectionType,
sourceType: ContentNavigatorConfig["sourceType"],
Expand Down
1 change: 0 additions & 1 deletion client/src/components/ContentNavigator/ContentModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ export class ContentModel {
return Object.entries(await this.contentAdapter.getRootItems())
.sort(
// sort the delegate folders as the order in the supportedDelegateFolders
// TODO MEEEE!
(a, b) =>
ALL_ROOT_FOLDERS.indexOf(a[0]) - ALL_ROOT_FOLDERS.indexOf(b[0]),
)
Expand Down
6 changes: 1 addition & 5 deletions client/src/components/ContentNavigator/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@ export const SAS_CONTENT_ROOT_FOLDERS = [
"@myRecycleBin",
];

export const SAS_SERVER_ROOT_FOLDERS = [
// "@myFavorites",
"@sasServerRoot",
// "@myRecycleBin",
];
export const SAS_SERVER_ROOT_FOLDERS = ["@sasServerRoot"];

export const ALL_ROOT_FOLDERS = [
...SAS_CONTENT_ROOT_FOLDERS,
Expand Down
28 changes: 15 additions & 13 deletions client/src/connection/rest/RestSASServerAdapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,13 @@ class RestSASServerAdapter implements ContentAdapter {
this.rootFolders = {};
this.fileMetadataMap = {};
}
addChildItem: (
childItemUri: string | undefined,
parentItemUri: string | undefined,
properties: AddChildItemProperties,
) => Promise<boolean>;
recycleItem?: (item: ContentItem) => Promise<{ newUri?: Uri; oldUri?: Uri }>;
restoreItem?: (item: ContentItem) => Promise<boolean>;

public async connect(): Promise<void> {
const session = getSession();
Expand Down Expand Up @@ -86,8 +93,7 @@ class RestSASServerAdapter implements ContentAdapter {
}

public connected(): boolean {
// TODO (sas-server)
return true;
return !!this.sessionId;
}

public async setup(): Promise<void> {
Expand All @@ -98,16 +104,14 @@ class RestSASServerAdapter implements ContentAdapter {
await this.connect();
}

public async addChildItem(
childItemUri: string | undefined,
parentItemUri: string | undefined,
properties: AddChildItemProperties,
): Promise<boolean> {
// TODO #417 Implement favorites
public async addItemToFavorites(): Promise<boolean> {
throw new Error("Method not implemented.");
}

public async addItemToFavorites(item: ContentItem): Promise<boolean> {
throw new Error("fds Method not implemented.");
// TODO #417 Implement favorites
public async removeItemFromFavorites(): Promise<boolean> {
throw new Error("Method not implemented.");
}

public async createNewFolder(
Expand Down Expand Up @@ -278,6 +282,7 @@ class RestSASServerAdapter implements ContentAdapter {
return this.filePropertiesToContentItem(response.data);
}

// TODO #417 Implement as part of favorites
public getRootFolder(): ContentItem | undefined {
return undefined;
}
Expand Down Expand Up @@ -308,6 +313,7 @@ class RestSASServerAdapter implements ContentAdapter {
}

return item.vscUri;
// TODO #417 Implement favorites
// // If we're attempting to open a favorite, open the underlying file instead.
// try {
// return (await this.getItemOfId(item.uri)).vscUri;
Expand Down Expand Up @@ -341,10 +347,6 @@ class RestSASServerAdapter implements ContentAdapter {
return !!this.filePropertiesToContentItem(response.data);
}

public async removeItemFromFavorites(item: ContentItem): Promise<boolean> {
throw new Error("Method not implemented.");
}

public async renameItem(
item: ContentItem,
newName: string,
Expand Down

0 comments on commit c1ad860

Please sign in to comment.