Skip to content

Commit be918a4

Browse files
authoredJan 22, 2025··
Refactor: Move actions-hub and preview-site folder under power-pages (#1092)
* Refactor: Move actions-hub and preview-site folder under power-pages * Remove unwanted file * Refactor * Add PPAPI to known words * Disable actions hub by default
1 parent ea84f9c commit be918a4

25 files changed

+71
-69
lines changed
 

‎.vscode/settings.json

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
{
2-
"cSpell.words": [
3-
"lcid",
4-
"nupkg",
5-
"powerapps",
6-
"powerpages",
7-
"powerplatform"
8-
],
9-
"sarif-viewer.connectToGithubCodeScanning": "off"
2+
"cSpell.words": [
3+
"dataverse",
4+
"lcid",
5+
"nupkg",
6+
"powerapps",
7+
"powerpages",
8+
"powerplatform",
9+
"PPAPI"
10+
],
11+
"sarif-viewer.connectToGithubCodeScanning": "off"
1012
}

‎l10n/bundle.l10n.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,13 @@
9494
"Do not translate 'PCF' as it is a product name."
9595
]
9696
},
97+
"File might be referenced by name {0} here./{0} represents the name of the file": {
98+
"message": "File might be referenced by name {0} here.",
99+
"comment": [
100+
"{0} represents the name of the file"
101+
]
102+
},
103+
"Some references might be broken. Please check diagnostics for details.": "Some references might be broken. Please check diagnostics for details.",
97104
"Cancel": "Cancel",
98105
"Install": "Install",
99106
"The extension 'Microsoft Edge Tools' is required to run this command. Do you want to install it now?/Do not translate 'Microsoft Edge Tools' ": {
@@ -117,13 +124,6 @@
117124
"Clearing cache...": "Clearing cache...",
118125
"Authenticating...": "Authenticating...",
119126
"Unable to clear cache": "Unable to clear cache",
120-
"File might be referenced by name {0} here./{0} represents the name of the file": {
121-
"message": "File might be referenced by name {0} here.",
122-
"comment": [
123-
"{0} represents the name of the file"
124-
]
125-
},
126-
"Some references might be broken. Please check diagnostics for details.": "Some references might be broken. Please check diagnostics for details.",
127127
"Enter the name of the web template": "Enter the name of the web template",
128128
"Please enter a name for the web template.": "Please enter a name for the web template.",
129129
"A webtemplate with the same name already exists. Please enter a different name.": "A webtemplate with the same name already exists. Please enter a different name.",
@@ -178,6 +178,10 @@
178178
"{0} will be replaced by the error message."
179179
]
180180
},
181+
"Other Sites": "Other Sites",
182+
"Active Sites": "Active Sites",
183+
"Inactive Sites": "Inactive Sites",
184+
"No sites found": "No sites found",
181185
"PAC Telemetry enabled": "PAC Telemetry enabled",
182186
"Failed to enable PAC telemetry.": "Failed to enable PAC telemetry.",
183187
"PAC Telemetry disabled": "PAC Telemetry disabled",
@@ -282,9 +286,5 @@
282286
"comment": [
283287
"The {0} represents profile's Azure Cloud Instances"
284288
]
285-
},
286-
"Other Sites": "Other Sites",
287-
"Active Sites": "Active Sites",
288-
"Inactive Sites": "Inactive Sites",
289-
"No sites found": "No sites found"
289+
}
290290
}

‎loc/translations-export/vscode-powerplatform.xlf

+14-14
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,8 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
560560
<source xml:lang="en">Auth Profiles</source>
561561
</trans-unit>
562562
<trans-unit id="microsoft-powerapps-portals.walkthrough.saveConflict.description">
563-
<source xml:lang="en">Avoid accidental overwrites when you try to save outdated code in VS Code for the Web. You can compare the changes side-by-side and decide to accept or revert the changes.
564-
563+
<source xml:lang="en">Avoid accidental overwrites when you try to save outdated code in VS Code for the Web. You can compare the changes side-by-side and decide to accept or revert the changes.
564+
565565
To learn more, visit [Prevent accidental overwrites](command:powerplatform-walkthrough.saveConflict-learn-more).</source>
566566
<note>This is a Markdown formatted string, and the formatting must persist across translations.
567567
The fifth line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.saveConflict-learn-more).', keeping brackets and the text in the parentheses unmodified</note>
@@ -624,12 +624,12 @@ The fifth line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.s
624624
<source xml:lang="en">File explorer</source>
625625
</trans-unit>
626626
<trans-unit id="microsoft-powerapps-portals.walkthrough.fileSystem.description">
627-
<source xml:lang="en">Find your page files organized in folders under your site name. All your pages are arranged into HTML, CSS, and JS files within the respective site component folders.
628-
629-
You can find site components like forms, content snippets, lists, and more to edit.
630-
631-
To learn more, visit [Power Pages file structure in VS Code](command:powerplatform-walkthrough.fileSystem-documentation).
632-
627+
<source xml:lang="en">Find your page files organized in folders under your site name. All your pages are arranged into HTML, CSS, and JS files within the respective site component folders.
628+
629+
You can find site components like forms, content snippets, lists, and more to edit.
630+
631+
To learn more, visit [Power Pages file structure in VS Code](command:powerplatform-walkthrough.fileSystem-documentation).
632+
633633
[Visit site folder](command:powerplatform-walkthrough.fileSystem-open-folder)</source>
634634
<note>This is a Markdown formatted string, and the formatting must persist across translations.
635635
The seventh line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.fileSystem-documentation).', keeping brackets and the text in the parentheses unmodified
@@ -663,7 +663,7 @@ The second line should be '[TRANSLATION HERE](command:pacCLI.authPanel.newAuthPr
663663
</trans-unit>
664664
<trans-unit id="microsoft-powerapps-portals.walkthrough.overview.description">
665665
<source xml:lang="en">Now easily edit code of your Power Pages site. Access code from supported site components like forms, content snippets, lists, and more from within Visual Studio Code.
666-
666+
667667
To learn more, visit [Edit Power Pages code in VS Code](command:powerplatform-walkthrough.overview-learn-more).</source>
668668
<note>This is a Markdown formatted string, and the formatting must persist across translations.
669669
The second line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.overview-learn-more)', keeping brackets and the text in the parentheses unmodified</note>
@@ -725,11 +725,11 @@ The second line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.
725725
</trans-unit>
726726
<trans-unit id="microsoft-powerapps-portals.walkthrough.advancedCapabilities.description">
727727
<source xml:lang="en">Visual Studio Code for Web enables editing and publishing of web pages on your website.
728-
729-
For a command line interface and more advanced capabilities, install the Power Platform Extension for VS Code, available in the VS Code Marketplace for desktop.
730-
728+
729+
For a command line interface and more advanced capabilities, install the Power Platform Extension for VS Code, available in the VS Code Marketplace for desktop.
730+
731731
[Learn More](command:powerplatform-walkthrough.advancedCapabilities-learn-more) about the difference between Visual Studio Code for desktop and web.
732-
732+
733733
[Start coding](command:powerplatform-walkthrough.advancedCapabilities-start-coding)</source>
734734
<note>This is a Markdown formatted string, and the formatting must persist across translations.
735735
The fifth line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.advancedCapabilities-learn-more) TRANSLATION', keeping brackets and the text in the parentheses unmodified
@@ -739,4 +739,4 @@ The seventh line should be '[TRANSLATION HERE](command:powerplatform-walkthrough
739739
<source xml:lang="en">Which Azure Cloud Power Platform Tools should use for authentication.</source>
740740
</trans-unit>
741741
</body></file>
742-
</xliff>
742+
</xliff>

‎src/client/extension.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ import { PowerPagesAppName, PowerPagesClientName } from "../common/ecs-features/
4646
import { ECSFeaturesClient } from "../common/ecs-features/ecsFeatureClient";
4747
import { getECSOrgLocationValue, getWorkspaceFolders } from "../common/utilities/Utils";
4848
import { CliAcquisitionContext } from "./lib/CliAcquisitionContext";
49-
import { PreviewSite, SITE_PREVIEW_COMMAND_ID } from "./preview-site/PreviewSite";
50-
import { ActionsHubTreeDataProvider } from "./actions-hub/ActionsHubTreeDataProvider";
49+
import { PreviewSite, SITE_PREVIEW_COMMAND_ID } from "./power-pages/preview-site/PreviewSite";
50+
import { ActionsHubTreeDataProvider } from "./power-pages/actions-hub/ActionsHubTreeDataProvider";
5151

5252
let client: LanguageClient;
5353
let _context: vscode.ExtensionContext;
@@ -307,7 +307,7 @@ export async function activate(
307307

308308
function initializeActionsHub(context: vscode.ExtensionContext) {
309309
//TODO: Initialize this based on ECS feature flag
310-
const actionsHubEnabled = true;
310+
const actionsHubEnabled = false;
311311

312312
vscode.commands.executeCommand("setContext", "microsoft.powerplatform.pages.actionsHubEnabled", actionsHubEnabled);
313313

‎src/client/actions-hub/ActionsHubTreeDataProvider.ts ‎src/client/power-pages/actions-hub/ActionsHubTreeDataProvider.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
import * as vscode from "vscode";
77
import { ActionsHubTreeItem } from "./tree-items/ActionsHubTreeItem";
88
import { OtherSitesGroupTreeItem } from "./tree-items/OtherSitesGroupTreeItem";
9-
import { ITelemetry } from "../../common/OneDSLoggerTelemetry/telemetry/ITelemetry";
9+
import { ITelemetry } from "../../../common/OneDSLoggerTelemetry/telemetry/ITelemetry";
1010
import { Constants } from "./Constants";
11-
import { oneDSLoggerWrapper } from "../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";
11+
import { oneDSLoggerWrapper } from "../../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";
1212

1313
export class ActionsHubTreeDataProvider implements vscode.TreeDataProvider<ActionsHubTreeItem> {
1414
private readonly _disposables: vscode.Disposable[] = [];

‎src/client/preview-site/PreviewSite.ts ‎src/client/power-pages/preview-site/PreviewSite.ts

+15-15
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@
44
*/
55

66
import * as vscode from 'vscode';
7-
import { ECSFeaturesClient } from '../../common/ecs-features/ecsFeatureClient';
8-
import { EnableSiteRuntimePreview } from '../../common/ecs-features/ecsFeatureGates';
9-
import { ITelemetry } from '../../common/OneDSLoggerTelemetry/telemetry/ITelemetry';
7+
import { ECSFeaturesClient } from '../../../common/ecs-features/ecsFeatureClient';
8+
import { EnableSiteRuntimePreview } from '../../../common/ecs-features/ecsFeatureGates';
9+
import { ITelemetry } from '../../../common/OneDSLoggerTelemetry/telemetry/ITelemetry';
1010
import { WorkspaceFolder } from 'vscode-languageclient/node';
11-
import { getWebsiteRecordId } from '../../common/utilities/WorkspaceInfoFinderUtil';
12-
import { PROVIDER_ID, ServiceEndpointCategory } from '../../common/services/Constants';
13-
import { PPAPIService } from '../../common/services/PPAPIService';
14-
import { VSCODE_EXTENSION_GET_WEBSITE_RECORD_ID_EMPTY, VSCODE_EXTENSION_SITE_PREVIEW_ERROR } from '../../common/services/TelemetryConstants';
15-
import { EDGE_TOOLS_EXTENSION_ID } from '../../common/constants';
16-
import { oneDSLoggerWrapper } from "../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";
17-
import { getWorkspaceFolders, showProgressWithNotification } from '../../common/utilities/Utils';
18-
import { PacTerminal } from '../lib/PacTerminal';
19-
import { initializeOrgDetails } from '../../common/utilities/OrgHandlerUtils';
20-
import { ArtemisService } from '../../common/services/ArtemisService';
11+
import { getWebsiteRecordId } from '../../../common/utilities/WorkspaceInfoFinderUtil';
12+
import { PROVIDER_ID, ServiceEndpointCategory } from '../../../common/services/Constants';
13+
import { PPAPIService } from '../../../common/services/PPAPIService';
14+
import { VSCODE_EXTENSION_GET_WEBSITE_RECORD_ID_EMPTY, VSCODE_EXTENSION_SITE_PREVIEW_ERROR } from '../../../common/services/TelemetryConstants';
15+
import { EDGE_TOOLS_EXTENSION_ID } from '../../../common/constants';
16+
import { oneDSLoggerWrapper } from "../../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";
17+
import { getWorkspaceFolders, showProgressWithNotification } from '../../../common/utilities/Utils';
18+
import { PacTerminal } from '../../lib/PacTerminal';
19+
import { initializeOrgDetails } from '../../../common/utilities/OrgHandlerUtils';
20+
import { ArtemisService } from '../../../common/services/ArtemisService';
2121
import { Messages } from './Constants';
22-
import { dataverseAuthentication } from '../../common/services/AuthenticationProvider';
23-
import { IOrgDetails } from '../../common/chat-participants/powerpages/PowerPagesChatParticipantTypes';
22+
import { dataverseAuthentication } from '../../../common/services/AuthenticationProvider';
23+
import { IOrgDetails } from '../../../common/chat-participants/powerpages/PowerPagesChatParticipantTypes';
2424

2525
export const SITE_PREVIEW_COMMAND_ID = "microsoft.powerplatform.pages.preview-site";
2626

‎src/client/test/Integration/client/actions-hub/tree-items/ActionsHubTreeItem.test.ts ‎src/client/test/Integration/power-pages/actions-hub/tree-items/ActionsHubTreeItem.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
import * as vscode from "vscode";
77
import { expect } from "chai";
8-
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
8+
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
99

10-
class MockTreeItem extends ActionsHubTreeItem{
10+
class MockTreeItem extends ActionsHubTreeItem {
1111
constructor() {
1212
super(
1313
"Foo",

‎src/client/test/Integration/client/actions-hub/tree-items/ActiveGroupTreeItem.test.ts ‎src/client/test/Integration/power-pages/actions-hub/tree-items/ActiveGroupTreeItem.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import * as vscode from "vscode";
77
import { expect } from "chai";
8-
import { ActiveGroupTreeItem } from "../../../../../actions-hub/tree-items/ActiveGroupTreeItem";
9-
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
8+
import { ActiveGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActiveGroupTreeItem";
9+
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
1010

1111
describe('ActiveGroupTreeItem', () => {
1212
it('should be of type ActionsHubTreeItem', () => {

‎src/client/test/Integration/client/actions-hub/tree-items/EnvironmentGroupTreeItem.test.ts ‎src/client/test/Integration/power-pages/actions-hub/tree-items/EnvironmentGroupTreeItem.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import * as vscode from "vscode";
77
import { expect } from "chai";
8-
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
9-
import { EnvironmentGroupTreeItem } from "../../../../../actions-hub/tree-items/EnvironmentGroupTreeItem";
8+
import { EnvironmentGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/EnvironmentGroupTreeItem";
9+
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
1010

1111
describe('EnvironmentGroupTreeItem', () => {
1212
it('should be of type EnvironmentGroupTreeItem', () => {

‎src/client/test/Integration/client/actions-hub/tree-items/InactiveGroupTreeItem.test.ts ‎src/client/test/Integration/power-pages/actions-hub/tree-items/InactiveGroupTreeItem.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import * as vscode from "vscode";
77
import { expect } from "chai";
8-
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
9-
import { InactiveGroupTreeItem } from "../../../../../actions-hub/tree-items/InactiveGroupTreeItem";
8+
import { InactiveGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/InactiveGroupTreeItem";
9+
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
1010

1111
describe('InactiveGroupTreeItem', () => {
1212
it('should be of type ActionsHubTreeItem', () => {

‎src/client/test/Integration/client/actions-hub/tree-items/NoDataTreeItem.test.ts ‎src/client/test/Integration/power-pages/actions-hub/tree-items/NoDataTreeItem.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import * as vscode from "vscode";
77
import { expect } from "chai";
8-
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
9-
import { NoDataTreeItem } from "../../../../../actions-hub/tree-items/NoDataTreeItem";
8+
import { NoDataTreeItem } from "../../../../../power-pages/actions-hub/tree-items/NoDataTreeItem";
9+
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
1010

1111
describe('NoDataTreeItem', () => {
1212
it('should be of type ActionsHubTreeItem', () => {

‎src/client/test/Integration/client/actions-hub/tree-items/OtherSitesGroupTreeItem.test.ts ‎src/client/test/Integration/power-pages/actions-hub/tree-items/OtherSitesGroupTreeItem.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import * as vscode from "vscode";
77
import { expect } from "chai";
8-
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
9-
import { OtherSitesGroupTreeItem } from "../../../../../actions-hub/tree-items/OtherSitesGroupTreeItem";
8+
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
9+
import { OtherSitesGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/OtherSitesGroupTreeItem";
1010

1111
describe('OtherSitesGroupTreeItem', () => {
1212
it('should be of type ActionsHubTreeItem', () => {

‎src/client/test/Integration/client/actions-hub/tree-items/SiteTreeItem.test.ts ‎src/client/test/Integration/power-pages/actions-hub/tree-items/SiteTreeItem.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
import * as vscode from "vscode";
77
import { expect } from "chai";
8-
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
9-
import { SiteTreeItem } from "../../../../../actions-hub/tree-items/SiteTreeItem";
10-
import { WebsiteStatus } from "../../../../../actions-hub/models/WebsiteStatus";
8+
import { SiteTreeItem } from "../../../../../power-pages/actions-hub/tree-items/SiteTreeItem";
9+
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
10+
import { WebsiteStatus } from "../../../../../power-pages/actions-hub/models/WebsiteStatus";
1111

1212
describe('SiteTreeItem', () => {
1313
it('should be of type ActionsHubTreeItem', () => {

0 commit comments

Comments
 (0)
Please sign in to comment.