Skip to content
Draft
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
347ef06
Add filterBy and cd .. commands on USS
JWaters02 Mar 16, 2025
3ba2383
Fix cd if no filter selected
JWaters02 Mar 16, 2025
194a5a0
Fix check for root directory
JWaters02 Mar 16, 2025
2fa377c
Change namings
JWaters02 Mar 25, 2025
4c73f88
Merge branch 'main' into feat/uss-filter
JWaters02 Mar 25, 2025
1928223
Merge remote-tracking branch 'JWaters02/main' into feat/uss-filter
JWaters02 Apr 6, 2025
9c12d6e
Unduplicate code
JWaters02 Apr 6, 2025
99e4a33
Add tests
JWaters02 Apr 6, 2025
fd50033
chore: changelog
JWaters02 Apr 6, 2025
337bc02
fix failing tests and restore lockfile
traeok Apr 8, 2025
ff7e2b5
feat: add isFilterSearch ctx check to zowe.uss.cdUp
traeok Apr 8, 2025
9710f71
remove check and test for filtering when no filter is set
JWaters06 Apr 9, 2025
f796a46
Merge branch 'main' into feat/uss-filter
JillieBeanSim Apr 9, 2025
94d730a
Merge branch 'main' into feat/uss-filter
JWaters02 Apr 9, 2025
1369698
Merge branch 'main' into feat/uss-filter
JWaters02 Apr 10, 2025
4e6c48b
refactor: change filterBy name
JWaters02 Apr 10, 2025
4db7b2d
test: fix suite typo
JWaters02 Apr 10, 2025
1033350
wip(feat): add ability to navigate forward and back through searches
JWaters02 Apr 10, 2025
a8b6d92
refactor: temp history is now per profile
JWaters02 Apr 10, 2025
09fa49f
Merge branch 'main' into feat/uss-history-nav
JWaters02 Apr 16, 2025
498f1d9
refactor: hide arrows when history reset
JWaters02 Apr 16, 2025
e97a06a
Merge branch 'main' into feat/uss-history-nav
JWaters02 May 10, 2025
a71591d
Remove "reset nav history" command
JWaters02 May 11, 2025
f41aaa8
Merge branch 'main' into feat/uss-history-nav
zFernand0 Jul 10, 2025
d4d4734
Merge branch 'main' into feat/uss-history-nav
JWaters02 Aug 2, 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
74 changes: 38 additions & 36 deletions packages/zowe-explorer/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,42 +202,6 @@
"Uploading USS files...": "Uploading USS files...",
"Error uploading files": "Error uploading files",
"Retrieving response from USS list API": "Retrieving response from USS list API",
"The 'move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.",
"Failed to move {0}/File path": {
"message": "Failed to move {0}",
"comment": [
"File path"
]
},
"Profile does not exist for this file.": "Profile does not exist for this file.",
"Saving USS file...": "Saving USS file...",
"Failed to rename {0}/File path": {
"message": "Failed to rename {0}",
"comment": [
"File path"
]
},
"Failed to delete {0}/File name": {
"message": "Failed to delete {0}",
"comment": [
"File name"
]
},
"No error details given": "No error details given",
"Error fetching destination {0} for paste action: {1}/USS pathError message": {
"message": "Error fetching destination {0} for paste action: {1}",
"comment": [
"USS path",
"Error message"
]
},
"Failed to copy {0} to {1}/Source pathDestination path": {
"message": "Failed to copy {0} to {1}",
"comment": [
"Source path",
"Destination path"
]
},
"Downloaded: {0}/Download time": {
"message": "Downloaded: {0}",
"comment": [
Expand Down Expand Up @@ -277,6 +241,8 @@
"Prompting the user to choose a member from the filtered list": "Prompting the user to choose a member from the filtered list",
"You are already at the root directory.": "You are already at the root directory.",
"Select a filter first.": "Select a filter first.",
"No next path in history.": "No next path in history.",
"No previous path in history.": "No previous path in history.",
Copy link
Member

Choose a reason for hiding this comment

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

a few options when reached end:

  1. Do nothing - user clicks on arrow but there is no feedback (ew from UX perspective, but is simple)
  2. Hide or disable arrows when respective ends are reached & show or enable when there is new history (nicer UX but getting into a bit overengineered territory)
  3. Keep some notification message but in a more subtle way somehow
  4. "These messages are fine, stop overthinking it!" 😄

I believe that we have made some efforts to reduce the number of notifications/pop-up messages that show up in order to minimize distractions. I understand that there need to be some sort of feedback for these buttons, but I'd personally prefer to gray-out/disable them instead of a pop-up saying that we didn't do anything. If we must keep a subtle message, perhaps we could use the status bar (e.g. same thing as uploading content).

I'd vote for option 2. Perhaps we can replace the icon (or overlay a 🚫 icon to it) if we know they are already at the root 😋

If that ends up being too complex, then option 3 with a status bar message. 🙏

"Prompting the user for a USS path": "Prompting the user for a USS path",
"Select a filter": "Select a filter",
"No selection made. Operation cancelled.": "No selection made. Operation cancelled.",
Expand All @@ -301,6 +267,42 @@
"initializeUSSFavorites.error.buttonRemove": "initializeUSSFavorites.error.buttonRemove",
"File does not exist. It may have been deleted.": "File does not exist. It may have been deleted.",
"Pulling from Mainframe...": "Pulling from Mainframe...",
"The 'move' function is not implemented for this USS API.": "The 'move' function is not implemented for this USS API.",
"Failed to move {0}/File path": {
"message": "Failed to move {0}",
"comment": [
"File path"
]
},
"Profile does not exist for this file.": "Profile does not exist for this file.",
"Saving USS file...": "Saving USS file...",
"Failed to rename {0}/File path": {
"message": "Failed to rename {0}",
"comment": [
"File path"
]
},
"Failed to delete {0}/File name": {
"message": "Failed to delete {0}",
"comment": [
"File name"
]
},
"No error details given": "No error details given",
"Error fetching destination {0} for paste action: {1}/USS pathError message": {
"message": "Error fetching destination {0} for paste action: {1}",
"comment": [
"USS path",
"Error message"
]
},
"Failed to copy {0} to {1}/Source pathDestination path": {
"message": "Failed to copy {0} to {1}",
"comment": [
"Source path",
"Destination path"
]
},
"{0} location/Node type": {
"message": "{0} location",
"comment": [
Expand Down
30 changes: 20 additions & 10 deletions packages/zowe-explorer/l10n/poeditor.json
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,15 @@
"uss.cd": {
"Go Up One Level": ""
},
"uss.back": {
"Back": ""
},
"uss.forward": {
"Forward": ""
},
"uss.resetTempHistory": {
"Reset Navigation History": ""
},
"jobs.search": {
"Search Jobs": ""
},
Expand Down Expand Up @@ -626,15 +635,6 @@
"Uploading USS files...": "",
"Error uploading files": "",
"Retrieving response from USS list API": "",
"The 'move' function is not implemented for this USS API.": "",
"Failed to move {0}": "",
"Profile does not exist for this file.": "",
"Saving USS file...": "",
"Failed to rename {0}": "",
"Failed to delete {0}": "",
"No error details given": "",
"Error fetching destination {0} for paste action: {1}": "",
"Failed to copy {0} to {1}": "",
"Downloaded: {0}": "",
"Encoding: {0}": "",
"Binary": "",
Expand All @@ -648,7 +648,8 @@
"Continue": "",
"Prompting the user to choose a member from the filtered list": "",
"You are already at the root directory.": "",
"Select a filter first.": "",
"No previous path in history.": "",
"No next path in history.": "",
"Prompting the user for a USS path": "",
"Select a filter": "",
"No selection made. Operation cancelled.": "",
Expand All @@ -662,6 +663,15 @@
"initializeUSSFavorites.error.buttonRemove": "",
"File does not exist. It may have been deleted.": "",
"Pulling from Mainframe...": "",
"The 'move' function is not implemented for this USS API.": "",
"Failed to move {0}": "",
"Profile does not exist for this file.": "",
"Saving USS file...": "",
"Failed to rename {0}": "",
"Failed to delete {0}": "",
"No error details given": "",
"Error fetching destination {0} for paste action: {1}": "",
"Failed to copy {0} to {1}": "",
"{0} location": "",
"Choose a location to create the {0}": "",
"Name of file or directory": "",
Expand Down
48 changes: 46 additions & 2 deletions packages/zowe-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,23 @@
"category": "Zowe Explorer",
"icon": "$(arrow-up)"
},
{
"command": "zowe.uss.back",
"title": "%uss.back%",
"category": "Zowe Explorer",
"icon": "$(arrow-left)"
},
{
"command": "zowe.uss.forward",
"title": "%uss.forward%",
"category": "Zowe Explorer",
"icon": "$(arrow-right)"
},
{
"command": "zowe.uss.resetTempHistory",
"title": "%uss.resetTempHistory%",
"category": "Zowe Explorer"
},
{
"command": "zowe.uss.refresh",
"title": "%uss.refreshAll%",
Expand Down Expand Up @@ -771,10 +788,20 @@
"group": "inline"
},
{
"when": "viewItem =~ /^(?!.*_fav.*)ussSession.*isFilterSearch/ && !listMultiSelection",
"when": "viewItem =~ /^(?!.*_fav.*)(ussSession.*_isFilterSearch)/ && !listMultiSelection",
"command": "zowe.uss.cdUp",
"group": "inline"
},
{
"when": "viewItem =~ /^(?!.*_fav.*)(ussSession.*_isFilterSearch_ussTempNavHistory)/ && !listMultiSelection",
"command": "zowe.uss.back",
"group": "inline"
},
{
"when": "viewItem =~ /^(?!.*_fav.*)(ussSession.*_isFilterSearch_ussTempNavHistory)/ && !listMultiSelection",
"command": "zowe.uss.forward",
"group": "inline"
},
Comment on lines +824 to +833
Copy link
Member

Choose a reason for hiding this comment

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

Options:

  1. Keep forward/back buttons on bar
  2. Move them onto nodes "in the tree" maybe as the first nodes of the tree, kind of like trae's pagination arrow nodes
  3. Make the buttons into context menu commands only

In the past, we used to have 4+ icons at all times and people complained that it was a bit hard to remember their purposes (if they were not often used).

So, if we plan to keep them, I rather give people the ability to customize which icons they want to keep inline.

Otherwise, I'd vote for option 3: Make the buttons into context menu commands only

{
"when": "view == zowe.uss.explorer && viewItem =~ /^(?!.*_fav.*)(textFile.*|binaryFile.*|directory.*)/",
"command": "zowe.addFavorite",
Expand Down Expand Up @@ -816,10 +843,15 @@
"group": "000_zowe_ussMainframeInteraction@0"
},
{
"when": "viewItem =~ /^(?!.*_fav.*)ussSession.*isFilterSearch/ && !listMultiSelection",
"when": "viewItem =~ /^(?!.*_fav.*)(ussSession.*_isFilterSearch)/ && !listMultiSelection",
"command": "zowe.uss.cdUp",
"group": "000_zowe_ussMainframeInteraction@1"
},
{
"when": "viewItem =~ /^(?!.*_fav.*)(ussSession.*_isFilterSearch_ussTempNavHistory)/ && !listMultiSelection",
"command": "zowe.uss.resetTempHistory",
"group": "000_zowe_ussMainframeInteraction@1"
},
{
"when": "view == zowe.uss.explorer && viewItem =~ /^(?!.*_fav.*)ussSession.*/ && !listMultiSelection",
"command": "zowe.issueMvsCmd",
Expand Down Expand Up @@ -1482,6 +1514,18 @@
"command": "zowe.uss.cdUp",
"when": "never"
},
{
"command": "zowe.uss.back",
"when": "never"
},
{
"command": "zowe.uss.forward",
"when": "never"
},
{
"command": "zowe.uss.resetTempHistory",
"when": "never"
},
{
"command": "zowe.uss.copyPath",
"when": "never"
Expand Down
3 changes: 3 additions & 0 deletions packages/zowe-explorer/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
"uss.text": "Toggle Text",
"uss.filterBy": "Search by Directory",
"uss.cd": "Go Up One Level",
"uss.back": "Back",
"uss.forward": "Forward",
"uss.resetTempHistory": "Reset Navigation History",
"jobs.search": "Search Jobs",
"deleteJob": "Delete Job",
"runModifyCommand": "Issue Modify Command",
Expand Down
4 changes: 3 additions & 1 deletion packages/zowe-explorer/src/configuration/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ import { imperative, PersistenceSchemaEnum } from "@zowe/zowe-explorer-api";
import type { Profiles } from "./Profiles";

export class Constants {
public static readonly COMMAND_COUNT = 111;
public static readonly COMMAND_COUNT = 114;
public static readonly MAX_SEARCH_HISTORY = 5;
public static readonly MAX_FILE_HISTORY = 10;
public static readonly MAX_USS_TEMPORARY_HISTORY = 10;
public static readonly MAX_DISPLAYED_DELETE_NAMES = 10;
public static readonly MS_PER_SEC = 1000;
public static readonly STATUS_BAR_TIMEOUT_MS = 5000;
Expand Down Expand Up @@ -61,6 +62,7 @@ export class Constants {
public static readonly ICON_STATE_OPEN = "open";
public static readonly ICON_STATE_CLOSED = "closed";
public static readonly FILTER_SEARCH = "isFilterSearch";
public static readonly USS_TEMP_NAVIGATION_HISTORY = "ussTempNavHistory";
public static readonly VSCODE_APPNAME: string[] = ["Visual Studio Code", "VSCodium"];
public static ROOTPATH = path.join(__dirname, "..", "..");
public static readonly SETTINGS_LOGS_FOLDER_PATH = "zowe.files.logsFolder.path";
Expand Down
9 changes: 9 additions & 0 deletions packages/zowe-explorer/src/trees/shared/SharedContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -490,4 +490,13 @@ export class SharedContext {
public static isDatasetNode(node: any): node is IZoweDatasetTreeNode {
return node.getStats !== undefined;
}

/**
* Helper function to determine if the USS node has a temporary navigation history
* @param node The node to check
* @returns true if the node has a temporary navigation history, false otherwise
*/
public static ussHasNavigationHistory(node: TreeItem): boolean {
return new RegExp(Constants.USS_TEMP_NAVIGATION_HISTORY).test(node.contextValue);
}
}
14 changes: 14 additions & 0 deletions packages/zowe-explorer/src/trees/uss/USSInit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,23 @@ export class USSInit {
context.subscriptions.push(
vscode.commands.registerCommand("zowe.uss.cdUp", async (node: IZoweUSSTreeNode): Promise<void> => ussFileProvider.cdUp(node))
);
context.subscriptions.push(
vscode.commands.registerCommand("zowe.uss.back", async (node: IZoweUSSTreeNode): Promise<void> => ussFileProvider.navigateBack(node))
);
context.subscriptions.push(
vscode.commands.registerCommand(
"zowe.uss.forward",
async (node: IZoweUSSTreeNode): Promise<void> => ussFileProvider.navigateForward(node)
)
);
context.subscriptions.push(
vscode.commands.registerCommand("zowe.uss.fullPath", async (node: IZoweUSSTreeNode): Promise<void> => ussFileProvider.filterPrompt(node))
);
context.subscriptions.push(
vscode.commands.registerCommand("zowe.uss.resetTempHistory", (node: IZoweUSSTreeNode): void =>
ussFileProvider.resetNavigationHistory(node)
)
);
Copy link
Member

Choose a reason for hiding this comment

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

Something else this video doesn't show is the right click menu command "Reset Navigation History" which also only shows up when there are 2 or more items in the navigation history for a profile and when clicked removes the forward and backward buttons and deletes the "temporary" filter history. I feel like this would be a "nice to have" command but please do say if you think it is not necessary/useless (say NO! to command creep 😄)

While this may be nice for those who might use the back and forward commands a lot, I don't think this is necessary (or even common) since I don't think there is such a thing in other File explorer (MacOS Finder, Windows File Explorer).
image

For that reason, I'd vote to remove this 😅
But I'm fine if everyone else wants to keep it 😋

Copy link
Member

Choose a reason for hiding this comment

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

I like the back and foward butons, you're right they aren't in File explorers, but they do occur in browsers.
One point I did notice is that the arrow buttons act on the filter/search criteria so I'm wondering if there is a way they can be moved to the right of the icons and have the refresh contents on the left.
My vote would be not to have the navigate as menu actions and leave as buttons to make point and shoot easier.
Q: For accessiblity and keyboard warriors, is there a way to execyte these with a key action ?

Two other questions ?
Is there a way to make the hover help dynamic, so that for a button that navigates to a new top level folder show what that folder is/will be ?

context.subscriptions.push(
vscode.commands.registerCommand(
"zowe.uss.filterBy",
Expand Down
Loading
Loading