Skip to content

Commit a1ea07b

Browse files
fix: Remove ansible-creator version checks from devfile/devcontainer views (#2790)
Fixes #2781. Removes the ansible-creator checks from the devcontainer/devfile webviews since they are intended to work without ansible-creator present. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> Removed ansible-creator version checks from devcontainer and devfile webviews because these views are designed to work without ansible-creator installed locally. The scaffolding functionality exists within the extension and doesn't require external dependencies, allowing users to use these features even when ansible-creator is unavailable. - Removed `checkContentCreatorRequirements` import and message handler from `createDevcontainerPanel.ts` - Removed `checkContentCreatorRequirements` import and message handler from `createDevfilePanel.ts` - Removed requirements status state and message listener from `CreateDevcontainerApp.vue` - Removed requirements status state and message listener from `CreateDevfileApp.vue` fixes: #2781 <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Shatakshi Mishra <shatakshimishra01@gmail.com>
1 parent eb207ce commit a1ea07b

4 files changed

Lines changed: 0 additions & 51 deletions

File tree

src/features/contentCreator/vue/views/createDevcontainerPanel.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
disposePanelResources,
66
createOrRevealPanel,
77
} from "@src/features/contentCreator/vue/views/panelUtils";
8-
import { checkContentCreatorRequirements } from "@src/features/contentCreator/utils";
98

109
export class MainPanel {
1110
public static currentPanel: MainPanel | undefined;
@@ -15,20 +14,6 @@ export class MainPanel {
1514
private constructor(panel: WebviewPanel, context: ExtensionContext) {
1615
this._panel = panel;
1716

18-
this._panel.webview.onDidReceiveMessage(
19-
async (msg) => {
20-
if (msg && msg.type === "request-requirements-status") {
21-
const status = await checkContentCreatorRequirements();
22-
this._panel.webview.postMessage({
23-
type: "requirements-status",
24-
...status,
25-
});
26-
}
27-
},
28-
null,
29-
this._disposables,
30-
);
31-
3217
setupPanelLifecycle(
3318
this._panel,
3419
context,

src/features/contentCreator/vue/views/createDevfilePanel.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
disposePanelResources,
66
createOrRevealPanel,
77
} from "@src/features/contentCreator/vue/views/panelUtils";
8-
import { checkContentCreatorRequirements } from "@src/features/contentCreator/utils";
98

109
export class MainPanel {
1110
public static currentPanel: MainPanel | undefined;
@@ -15,20 +14,6 @@ export class MainPanel {
1514
private constructor(panel: WebviewPanel, context: ExtensionContext) {
1615
this._panel = panel;
1716

18-
this._panel.webview.onDidReceiveMessage(
19-
async (msg) => {
20-
if (msg && msg.type === "request-requirements-status") {
21-
const status = await checkContentCreatorRequirements();
22-
this._panel.webview.postMessage({
23-
type: "requirements-status",
24-
...status,
25-
});
26-
}
27-
},
28-
null,
29-
this._disposables,
30-
);
31-
3217
setupPanelLifecycle(
3318
this._panel,
3419
context,

webviews/CreateDevcontainerApp.vue

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ const projectUrl = ref("");
2626
const openDevcontainerButtonDisabled = ref(true);
2727
const createButtonDisabled = ref(true);
2828
const defaultDestinationPath = ref("");
29-
const requirementsMet = ref(true);
30-
const requirementFailures = ref([]);
3129
3230
const isFormValid = createFormValidator({
3331
destinationPath: () => {
@@ -117,13 +115,6 @@ watch([destinationPath, isCreating], () => {
117115
});
118116
119117
onMounted(() => {
120-
vscodeApi.postMessage({ type: "request-requirements-status" });
121-
window.addEventListener("message", (event) => {
122-
if (event.data && event.data.type === "requirements-status") {
123-
requirementsMet.value = event.data.met;
124-
requirementFailures.value = event.data.failures || [];
125-
}
126-
});
127118
setupMessageHandler({
128119
onHomeDirectory: (data) => {
129120
homeDir.value = data;
@@ -165,7 +156,6 @@ const descriptionHtml = `Devcontainers are json files used for building containe
165156
title="Create a devcontainer"
166157
subtitle="Build containerized development environments"
167158
:description="descriptionHtml"
168-
:requirementsMet="requirementsMet"
169159
>
170160
<form id="devcontainer-form">
171161
<section class="component-container">

webviews/CreateDevfileApp.vue

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ const createButtonDisabled = ref(true);
3131
const clearLogsButtonDisabled = ref(true);
3232
const defaultDestinationPath = ref("");
3333
const defaultProjectName = ref("");
34-
const requirementsMet = ref(true);
35-
const requirementFailures = ref([]);
3634
3735
const isFormValid = computed(() => {
3836
const currentPath =
@@ -148,14 +146,6 @@ const onClear = () => {
148146
};
149147
150148
onMounted(() => {
151-
vscodeApi.postMessage({ type: "request-requirements-status" });
152-
window.addEventListener("message", (event) => {
153-
if (event.data && event.data.type === "requirements-status") {
154-
requirementsMet.value = event.data.met;
155-
requirementFailures.value = event.data.failures || [];
156-
}
157-
});
158-
159149
setupMessageHandler({
160150
onHomeDirectory: (data) => {
161151
console.log("onHomeDirectory called with:", data);
@@ -228,7 +218,6 @@ const descriptionHtml = `Devfiles are yaml files used for development environmen
228218
title="Create a devfile"
229219
subtitle="Leverage Red Hat Openshift Dev Spaces"
230220
:description="descriptionHtml"
231-
:requirementsMet="requirementsMet"
232221
>
233222
<form id="devfile-form">
234223
<section class="component-container">

0 commit comments

Comments
 (0)