From 53c1630bdddddc5fe39eb4f2fed801f125af1817 Mon Sep 17 00:00:00 2001 From: Joshua Waters Date: Fri, 21 Feb 2025 13:24:18 +0000 Subject: [PATCH] Various improvements to z/OS console panel (#3445) * Fix missing icon on z/OS console when show labels is off Signed-off-by: JWaters02 * Rename Zowe Explorer z/OS Console to z/OS Console Signed-off-by: JWaters02 * Fix z/OS Console panel colour was not in sync with rest of VSCode styling This meant replacing the deprecated vscode webviews component with raw html/css as that React library's components' stylings cannot be overriden Signed-off-by: JWaters02 * chore: changelog Signed-off-by: JWaters02 chore: changelog Signed-off-by: JWaters02 * Switch to built in vscode codicon Co-authored-by: Timothy Johnson Signed-off-by: Joshua Waters * Remove old chevron-right svg Signed-off-by: Timothy Johnson --------- Signed-off-by: JWaters02 Signed-off-by: Joshua Waters Signed-off-by: Timothy Johnson Co-authored-by: Billie Simmons Co-authored-by: Timothy Johnson --- packages/zowe-explorer/CHANGELOG.md | 3 + packages/zowe-explorer/package.json | 2 +- packages/zowe-explorer/package.nls.json | 2 +- .../src/webviews/src/zos-console/App.tsx | 76 ++++++++++++------- .../src/webviews/src/zos-console/index.html | 12 +++ 5 files changed, 65 insertions(+), 30 deletions(-) diff --git a/packages/zowe-explorer/CHANGELOG.md b/packages/zowe-explorer/CHANGELOG.md index ca9d96b341..3ca985e842 100644 --- a/packages/zowe-explorer/CHANGELOG.md +++ b/packages/zowe-explorer/CHANGELOG.md @@ -9,6 +9,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Added Time Started, Time Ended, and Time Submitted job properties to the Jobs table view. [#3055](https://github.com/zowe/zowe-explorer-vscode/issues/3055) - Implemented copy/paste functionality of data sets within and across LPARs. [#3012](https://github.com/zowe/zowe-explorer-vscode/issues/3012) - Implemented drag and drop functionality of data sets within and across LPARs. [#3413](https://github.com/zowe/zowe-explorer-vscode/pull/3413) +- Renamed "Zowe Explorer z/OS Console" to "z/OS Console". [#3445](https://github.com/zowe/zowe-explorer-vscode/pull/3445) - Adopted ZE APIs new `directConnectLogin` and `directConnectLogout` methods for login and logout actions NOT using the tokenType `apimlAuthenticationToken`. [#3346](https://github.com/zowe/zowe-explorer-vscode/issues/3346) ### Bug fixes @@ -17,6 +18,8 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen - Fixed an issue where the 'Delete' key binding for the USS tree returns a 'contextValue' error. [#2796](https://github.com/zowe/zowe-explorer-vscode/issues/2796) - Fixed an issue where cancelling Unix, MVS or TSO command still submits the command. [#3422](https://github.com/zowe/zowe-explorer-vscode/issues/3422) - Fixed an issue where user is unable to open a renamed sequential data set from the Data Sets tree view.. [#3345](https://github.com/zowe/zowe-explorer-vscode/issues/3345) +- Fixed missing z/OS Console icon when `Workbench > Panel: Show Labels` is set to false. [#3293](https://github.com/zowe/zowe-explorer-vscode/issues/3293) +- Fixed z/OS Console panel background colour to be in sync with the rest of the VS Code styling. [#3445](https://github.com/zowe/zowe-explorer-vscode/pull/3445) - Fixed an issue seen with outdated profile information in the z/OS tree view data during upload and download of data set and USS files [#3457](https://github.com/zowe/zowe-explorer-vscode/issues/3457) - Fixed issue where deleting too many nodes at once would cause the confirmation prompt to be oversized. [#3254](https://github.com/zowe/zowe-explorer-vscode/issues/3254) diff --git a/packages/zowe-explorer/package.json b/packages/zowe-explorer/package.json index bc6de77a15..92ebc4f932 100644 --- a/packages/zowe-explorer/package.json +++ b/packages/zowe-explorer/package.json @@ -50,7 +50,7 @@ { "id": "zowezosconsole", "title": "%zowe.zosconsole%", - "icon": "" + "icon": "$(chevron-right)" } ] }, diff --git a/packages/zowe-explorer/package.nls.json b/packages/zowe-explorer/package.nls.json index e54af70ce9..b6a2275b2a 100644 --- a/packages/zowe-explorer/package.nls.json +++ b/packages/zowe-explorer/package.nls.json @@ -3,7 +3,7 @@ "description": "VS Code extension, powered by Zowe CLI, that streamlines interaction with mainframe Data Sets, USS files, and Jobs", "viewsContainers.activitybar": "Zowe Explorer", "viewsContainers.panel.tableView": "Zowe Resources", - "zowe.zosconsole": "Zowe Explorer z/OS Console", + "zowe.zosconsole": "z/OS Console", "zowe.resources.name": "Zowe Resources", "zosconsole": "z/OS Console", "zowe.placeholderCommand": "Placeholder", diff --git a/packages/zowe-explorer/src/webviews/src/zos-console/App.tsx b/packages/zowe-explorer/src/webviews/src/zos-console/App.tsx index eb8ba1487b..afc42aa7a4 100644 --- a/packages/zowe-explorer/src/webviews/src/zos-console/App.tsx +++ b/packages/zowe-explorer/src/webviews/src/zos-console/App.tsx @@ -1,5 +1,3 @@ -import { Dropdown, Option, TextArea, TextField } from "@vscode/webview-ui-toolkit"; -import { VSCodeDropdown, VSCodeTextArea, VSCodeTextField } from "@vscode/webview-ui-toolkit/react"; import { useEffect, useState } from "preact/hooks"; import * as l10n from "@vscode/l10n"; import { isSecureOrigin } from "../utils"; @@ -21,7 +19,7 @@ export function App() { } const message = event.data; - const profileList = document.getElementById("systems") as Option; + const profileList = document.getElementById("systems") as HTMLSelectElement; switch (message.type) { case "commandResult": @@ -29,7 +27,7 @@ export function App() { break; case "optionsList": for (const profile in message.profiles) { - const option = document.createElement("vscode-option"); + const option = document.createElement("option"); option.textContent = message.profiles[profile]; if (message.profiles[profile] === message.defaultProfile) { option.setAttribute("selected", "true"); @@ -47,14 +45,14 @@ export function App() { } } }); - const consoleResponse = document.getElementById("output") as TextArea; - consoleResponse.control.scrollTop = consoleResponse.control.scrollHeight; + const consoleResponse = document.getElementById("output") as HTMLTextAreaElement; + consoleResponse.scrollTop = consoleResponse.scrollHeight; vscode.postMessage({ command: "GET_LOCALIZATION" }); }); const sendCommand = (e: KeyboardEvent) => { - const consoleField = document.getElementById("command-input") as TextField; - const profileList = document.getElementById("systems") as Dropdown; + const consoleField = document.getElementById("command-input") as HTMLInputElement; + const profileList = document.getElementById("systems") as HTMLSelectElement; if (e.key === "Enter") { if (consoleField!.value === "clear") { setConsoleContent(""); @@ -70,36 +68,58 @@ export function App() { }; return ( -
-
- +
+
+ + +
+
- + value={consoleContent} + >
); } diff --git a/packages/zowe-explorer/src/webviews/src/zos-console/index.html b/packages/zowe-explorer/src/webviews/src/zos-console/index.html index 5961158d15..bd855d6831 100644 --- a/packages/zowe-explorer/src/webviews/src/zos-console/index.html +++ b/packages/zowe-explorer/src/webviews/src/zos-console/index.html @@ -4,6 +4,18 @@ z/OS Console +