Skip to content
Open
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
ae98ac4
Needs testing with live connection. But should fix error.
Jul 8, 2025
774bc8e
added feature to check for unsaved files in folder
Jul 16, 2025
18e96b2
Merge branch 'main' into kibpat_VSExt_1136
kpatl1 Jul 16, 2025
8edc365
Merge branch 'main' of https://github.com/sassoftware/vscode-sas-exte…
Jul 16, 2025
8faca94
Merge branch 'kibpat_VSExt_1136' of https://github.com/sassoftware/vs…
Jul 16, 2025
4b8f211
undo changes on diff file
Jul 16, 2025
405d6e4
Update ContentDataProvider.ts
kpatl1 Jul 16, 2025
904a406
Update ContentDataProvider.ts
kpatl1 Jul 16, 2025
42ca077
DCO Remediation Commit for Kishan Patel <[email protected]>
Jul 16, 2025
877ec93
testing a new fix within the UI and provider.
kpatl1 Jul 22, 2025
1bf8187
removed code from SASContentAdapter and added it to UI and Service la…
kpatl1 Jul 23, 2025
b466d7c
DCO Remediation Commit for Kishan Patel <[email protected]>
kpatl1 Jul 23, 2025
30b81b7
Merge branch 'main' into kibpat_VSExt_1136
kpatl1 Jul 23, 2025
6593c67
Merge branch 'main' of https://github.com/sassoftware/vscode-sas-exte…
kpatl1 Jul 23, 2025
49edc94
Merge branch 'kibpat_VSExt_1136' of https://github.com/sassoftware/vs…
kpatl1 Jul 23, 2025
5ef4032
changed to BFS with conccurrrent HTTP requests.
kpatl1 Jul 24, 2025
3195f1d
changes to reduce HTTP requests. needs fixing for depth > 1
kpatl1 Jul 28, 2025
9166f84
needs upward traversal fix
kpatl1 Jul 28, 2025
63fb7d7
DCO Remediation Commit for Kishan Patel <[email protected]>
kpatl1 Jul 28, 2025
5da1aa5
debug
kpatl1 Jul 29, 2025
0d116e8
Update client/src/components/ContentNavigator/ContentDataProvider.ts
kpatl1 Aug 11, 2025
0bb9429
Update client/src/components/ContentNavigator/ContentDataProvider.ts
kpatl1 Aug 11, 2025
3d4cc59
Update client/src/components/ContentNavigator/ContentDataProvider.ts
kpatl1 Aug 11, 2025
2c3e6e2
debug statment removal
Aug 11, 2025
ed1cf13
DCO Remediation Commit for Kishan Patel <[email protected]>
Aug 11, 2025
9ce3d05
Merge branch 'main' into kibpat_VSExt_1136
kpatl1 Aug 11, 2025
b8dbf88
prettier formatting.
Aug 11, 2025
0cba768
linting
Aug 11, 2025
e10ae07
feat(ContentNavigator): resolved comments
Aug 15, 2025
b35aae3
Update index.ts
kpatl1 Aug 15, 2025
bfdc1a6
feat(ContentNavigator): remove changes from package lock
kpatl1 Aug 15, 2025
d0c8028
Merge branch 'main' into kibpat_VSExt_1136
Aug 15, 2025
123b7e6
DCO Remediation Commit for Kishan Patel <[email protected]>
Aug 15, 2025
7a9bd50
DCO Remediation Commit for Kishan Patel <[email protected]>
Aug 15, 2025
8bf29bd
feat(ContentNavigator): resolved comments
kpatl1 Aug 19, 2025
db699d4
feat(ContentNavigator): fixed uriToParentMap logic
kpatl1 Aug 20, 2025
7999067
DCO Remediation Commit for Kishan Patel <[email protected]>
kpatl1 Aug 20, 2025
7b7c95b
feat(ContentNavigator): fixed while loop condition
kpatl1 Aug 26, 2025
597cb50
fix(ContentNavigator) added check for dirty notebooks
kpatl1 Aug 26, 2025
375f236
DCO Remediation Commit for Kishan Patel <[email protected]>
kpatl1 Aug 26, 2025
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
40 changes: 40 additions & 0 deletions client/src/components/ContentNavigator/ContentDataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,46 @@ class ContentDataProvider
}
}

public async checkFolderDirty(resource: ContentItem): Promise<boolean> {
if (!resource.vscUri) {
return false;
}

const descendants: ContentItem[] = [];
async function recurse(item: ContentItem) {
const kids = await this.model.getChildren(item);
for (const kid of kids) {
descendants.push(kid);
if (getIsContainer(kid)) {
await recurse.call(this, kid);
}
}
}
await recurse.call(this, resource);

const dirtyIds = new Set<string>();
for (const doc of workspace.textDocuments) {
if (!doc.isDirty) {
continue;
}
const id = new URLSearchParams(doc.uri.query).get("id");
if (id) {
dirtyIds.add(id);
}
}

for (const child of descendants) {
if (!child.vscUri) {
continue;
}
const childId = new URLSearchParams(child.vscUri.query).get("id");
if (childId && dirtyIds.has(childId)) {
return true;
}
}
return false;
}

public async downloadContentItems(
folderUri: Uri,
selections: ContentItem[],
Expand Down
4 changes: 4 additions & 0 deletions client/src/components/ContentNavigator/const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ export const Messages = {
AddFileToMyFolderSuccess: l10n.t("File added to my folder."),
AddToFavoritesError: l10n.t("The item could not be added to My Favorites."),
DeleteButtonLabel: l10n.t("Delete"),
MoveToRecycleBinLabel: l10n.t("Move to Recycle Bin"),
DeleteWarningMessage: l10n.t(
'Are you sure you want to permanently delete the item "{name}"?',
),
RecycleDirtyFolderWarning: l10n.t(
"This folder contains unsaved files, are you sure you want to delete?",
),
EmptyRecycleBinError: l10n.t("Unable to empty the recycle bin."),
EmptyRecycleBinWarningMessage: l10n.t(
"Are you sure you want to permanently delete all the items? You cannot undo this action.",
Expand Down
16 changes: 15 additions & 1 deletion client/src/components/ContentNavigator/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ class ContentNavigator implements SubscriptionProvider {
this.treeViewSelections(item).forEach(
async (resource: ContentItem) => {
const isContainer = getIsContainer(resource);
const hasUnsavedFiles = isContainer
? await this.contentDataProvider.checkFolderDirty(resource)
: isContainer;
const moveToRecycleBin =
this.contentDataProvider.canRecycleResource(resource);

Expand All @@ -118,6 +121,18 @@ class ContentNavigator implements SubscriptionProvider {
))
) {
return;
} else if (moveToRecycleBin && isContainer && hasUnsavedFiles) {
if (
!(await window.showWarningMessage(
l10n.t(Messages.RecycleDirtyFolderWarning, {
name: resource.name,
}),
{ modal: true },
Messages.MoveToRecycleBinLabel,
))
) {
return;
}
}
const deleteResult = moveToRecycleBin
? await this.contentDataProvider.recycleResource(resource)
Expand Down Expand Up @@ -496,5 +511,4 @@ class ContentNavigator implements SubscriptionProvider {
);
}
}

export default ContentNavigator;
39 changes: 28 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading