Skip to content

Commit

Permalink
Refactor: Move actions-hub and preview-site folder under power-pages (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
priyanshu92 authored Jan 22, 2025
1 parent ea84f9c commit be918a4
Show file tree
Hide file tree
Showing 25 changed files with 71 additions and 69 deletions.
18 changes: 10 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"cSpell.words": [
"lcid",
"nupkg",
"powerapps",
"powerpages",
"powerplatform"
],
"sarif-viewer.connectToGithubCodeScanning": "off"
"cSpell.words": [
"dataverse",
"lcid",
"nupkg",
"powerapps",
"powerpages",
"powerplatform",
"PPAPI"
],
"sarif-viewer.connectToGithubCodeScanning": "off"
}
24 changes: 12 additions & 12 deletions l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,13 @@
"Do not translate 'PCF' as it is a product name."
]
},
"File might be referenced by name {0} here./{0} represents the name of the file": {
"message": "File might be referenced by name {0} here.",
"comment": [
"{0} represents the name of the file"
]
},
"Some references might be broken. Please check diagnostics for details.": "Some references might be broken. Please check diagnostics for details.",
"Cancel": "Cancel",
"Install": "Install",
"The extension 'Microsoft Edge Tools' is required to run this command. Do you want to install it now?/Do not translate 'Microsoft Edge Tools' ": {
Expand All @@ -117,13 +124,6 @@
"Clearing cache...": "Clearing cache...",
"Authenticating...": "Authenticating...",
"Unable to clear cache": "Unable to clear cache",
"File might be referenced by name {0} here./{0} represents the name of the file": {
"message": "File might be referenced by name {0} here.",
"comment": [
"{0} represents the name of the file"
]
},
"Some references might be broken. Please check diagnostics for details.": "Some references might be broken. Please check diagnostics for details.",
"Enter the name of the web template": "Enter the name of the web template",
"Please enter a name for the web template.": "Please enter a name for the web template.",
"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.",
Expand Down Expand Up @@ -178,6 +178,10 @@
"{0} will be replaced by the error message."
]
},
"Other Sites": "Other Sites",
"Active Sites": "Active Sites",
"Inactive Sites": "Inactive Sites",
"No sites found": "No sites found",
"PAC Telemetry enabled": "PAC Telemetry enabled",
"Failed to enable PAC telemetry.": "Failed to enable PAC telemetry.",
"PAC Telemetry disabled": "PAC Telemetry disabled",
Expand Down Expand Up @@ -282,9 +286,5 @@
"comment": [
"The {0} represents profile's Azure Cloud Instances"
]
},
"Other Sites": "Other Sites",
"Active Sites": "Active Sites",
"Inactive Sites": "Inactive Sites",
"No sites found": "No sites found"
}
}
28 changes: 14 additions & 14 deletions loc/translations-export/vscode-powerplatform.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ The {3} represents Dataverse Environment's Organization ID (GUID)</note>
<source xml:lang="en">Auth Profiles</source>
</trans-unit>
<trans-unit id="microsoft-powerapps-portals.walkthrough.saveConflict.description">
<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.

<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.
To learn more, visit [Prevent accidental overwrites](command:powerplatform-walkthrough.saveConflict-learn-more).</source>
<note>This is a Markdown formatted string, and the formatting must persist across translations.
The fifth line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.saveConflict-learn-more).', keeping brackets and the text in the parentheses unmodified</note>
Expand Down Expand Up @@ -624,12 +624,12 @@ The fifth line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.s
<source xml:lang="en">File explorer</source>
</trans-unit>
<trans-unit id="microsoft-powerapps-portals.walkthrough.fileSystem.description">
<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.

You can find site components like forms, content snippets, lists, and more to edit.

To learn more, visit [Power Pages file structure in VS Code](command:powerplatform-walkthrough.fileSystem-documentation).

<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.
You can find site components like forms, content snippets, lists, and more to edit.
To learn more, visit [Power Pages file structure in VS Code](command:powerplatform-walkthrough.fileSystem-documentation).
[Visit site folder](command:powerplatform-walkthrough.fileSystem-open-folder)</source>
<note>This is a Markdown formatted string, and the formatting must persist across translations.
The seventh line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.fileSystem-documentation).', keeping brackets and the text in the parentheses unmodified
Expand Down Expand Up @@ -663,7 +663,7 @@ The second line should be '[TRANSLATION HERE](command:pacCLI.authPanel.newAuthPr
</trans-unit>
<trans-unit id="microsoft-powerapps-portals.walkthrough.overview.description">
<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.

To learn more, visit [Edit Power Pages code in VS Code](command:powerplatform-walkthrough.overview-learn-more).</source>
<note>This is a Markdown formatted string, and the formatting must persist across translations.
The second line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.overview-learn-more)', keeping brackets and the text in the parentheses unmodified</note>
Expand Down Expand Up @@ -725,11 +725,11 @@ The second line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.
</trans-unit>
<trans-unit id="microsoft-powerapps-portals.walkthrough.advancedCapabilities.description">
<source xml:lang="en">Visual Studio Code for Web enables editing and publishing of web pages on your website.

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.

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.
[Learn More](command:powerplatform-walkthrough.advancedCapabilities-learn-more) about the difference between Visual Studio Code for desktop and web.

[Start coding](command:powerplatform-walkthrough.advancedCapabilities-start-coding)</source>
<note>This is a Markdown formatted string, and the formatting must persist across translations.
The fifth line should be '[TRANSLATION HERE](command:powerplatform-walkthrough.advancedCapabilities-learn-more) TRANSLATION', keeping brackets and the text in the parentheses unmodified
Expand All @@ -739,4 +739,4 @@ The seventh line should be '[TRANSLATION HERE](command:powerplatform-walkthrough
<source xml:lang="en">Which Azure Cloud Power Platform Tools should use for authentication.</source>
</trans-unit>
</body></file>
</xliff>
</xliff>
6 changes: 3 additions & 3 deletions src/client/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ import { PowerPagesAppName, PowerPagesClientName } from "../common/ecs-features/
import { ECSFeaturesClient } from "../common/ecs-features/ecsFeatureClient";
import { getECSOrgLocationValue, getWorkspaceFolders } from "../common/utilities/Utils";
import { CliAcquisitionContext } from "./lib/CliAcquisitionContext";
import { PreviewSite, SITE_PREVIEW_COMMAND_ID } from "./preview-site/PreviewSite";
import { ActionsHubTreeDataProvider } from "./actions-hub/ActionsHubTreeDataProvider";
import { PreviewSite, SITE_PREVIEW_COMMAND_ID } from "./power-pages/preview-site/PreviewSite";
import { ActionsHubTreeDataProvider } from "./power-pages/actions-hub/ActionsHubTreeDataProvider";

let client: LanguageClient;
let _context: vscode.ExtensionContext;
Expand Down Expand Up @@ -307,7 +307,7 @@ export async function activate(

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

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
import * as vscode from "vscode";
import { ActionsHubTreeItem } from "./tree-items/ActionsHubTreeItem";
import { OtherSitesGroupTreeItem } from "./tree-items/OtherSitesGroupTreeItem";
import { ITelemetry } from "../../common/OneDSLoggerTelemetry/telemetry/ITelemetry";
import { ITelemetry } from "../../../common/OneDSLoggerTelemetry/telemetry/ITelemetry";
import { Constants } from "./Constants";
import { oneDSLoggerWrapper } from "../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";
import { oneDSLoggerWrapper } from "../../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";

export class ActionsHubTreeDataProvider implements vscode.TreeDataProvider<ActionsHubTreeItem> {
private readonly _disposables: vscode.Disposable[] = [];
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@
*/

import * as vscode from 'vscode';
import { ECSFeaturesClient } from '../../common/ecs-features/ecsFeatureClient';
import { EnableSiteRuntimePreview } from '../../common/ecs-features/ecsFeatureGates';
import { ITelemetry } from '../../common/OneDSLoggerTelemetry/telemetry/ITelemetry';
import { ECSFeaturesClient } from '../../../common/ecs-features/ecsFeatureClient';
import { EnableSiteRuntimePreview } from '../../../common/ecs-features/ecsFeatureGates';
import { ITelemetry } from '../../../common/OneDSLoggerTelemetry/telemetry/ITelemetry';
import { WorkspaceFolder } from 'vscode-languageclient/node';
import { getWebsiteRecordId } from '../../common/utilities/WorkspaceInfoFinderUtil';
import { PROVIDER_ID, ServiceEndpointCategory } from '../../common/services/Constants';
import { PPAPIService } from '../../common/services/PPAPIService';
import { VSCODE_EXTENSION_GET_WEBSITE_RECORD_ID_EMPTY, VSCODE_EXTENSION_SITE_PREVIEW_ERROR } from '../../common/services/TelemetryConstants';
import { EDGE_TOOLS_EXTENSION_ID } from '../../common/constants';
import { oneDSLoggerWrapper } from "../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";
import { getWorkspaceFolders, showProgressWithNotification } from '../../common/utilities/Utils';
import { PacTerminal } from '../lib/PacTerminal';
import { initializeOrgDetails } from '../../common/utilities/OrgHandlerUtils';
import { ArtemisService } from '../../common/services/ArtemisService';
import { getWebsiteRecordId } from '../../../common/utilities/WorkspaceInfoFinderUtil';
import { PROVIDER_ID, ServiceEndpointCategory } from '../../../common/services/Constants';
import { PPAPIService } from '../../../common/services/PPAPIService';
import { VSCODE_EXTENSION_GET_WEBSITE_RECORD_ID_EMPTY, VSCODE_EXTENSION_SITE_PREVIEW_ERROR } from '../../../common/services/TelemetryConstants';
import { EDGE_TOOLS_EXTENSION_ID } from '../../../common/constants';
import { oneDSLoggerWrapper } from "../../../common/OneDSLoggerTelemetry/oneDSLoggerWrapper";
import { getWorkspaceFolders, showProgressWithNotification } from '../../../common/utilities/Utils';
import { PacTerminal } from '../../lib/PacTerminal';
import { initializeOrgDetails } from '../../../common/utilities/OrgHandlerUtils';
import { ArtemisService } from '../../../common/services/ArtemisService';
import { Messages } from './Constants';
import { dataverseAuthentication } from '../../common/services/AuthenticationProvider';
import { IOrgDetails } from '../../common/chat-participants/powerpages/PowerPagesChatParticipantTypes';
import { dataverseAuthentication } from '../../../common/services/AuthenticationProvider';
import { IOrgDetails } from '../../../common/chat-participants/powerpages/PowerPagesChatParticipantTypes';

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

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

class MockTreeItem extends ActionsHubTreeItem{
class MockTreeItem extends ActionsHubTreeItem {
constructor() {
super(
"Foo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import * as vscode from "vscode";
import { expect } from "chai";
import { ActiveGroupTreeItem } from "../../../../../actions-hub/tree-items/ActiveGroupTreeItem";
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
import { ActiveGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActiveGroupTreeItem";
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";

describe('ActiveGroupTreeItem', () => {
it('should be of type ActionsHubTreeItem', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import * as vscode from "vscode";
import { expect } from "chai";
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
import { EnvironmentGroupTreeItem } from "../../../../../actions-hub/tree-items/EnvironmentGroupTreeItem";
import { EnvironmentGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/EnvironmentGroupTreeItem";
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";

describe('EnvironmentGroupTreeItem', () => {
it('should be of type EnvironmentGroupTreeItem', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import * as vscode from "vscode";
import { expect } from "chai";
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
import { InactiveGroupTreeItem } from "../../../../../actions-hub/tree-items/InactiveGroupTreeItem";
import { InactiveGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/InactiveGroupTreeItem";
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";

describe('InactiveGroupTreeItem', () => {
it('should be of type ActionsHubTreeItem', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import * as vscode from "vscode";
import { expect } from "chai";
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
import { NoDataTreeItem } from "../../../../../actions-hub/tree-items/NoDataTreeItem";
import { NoDataTreeItem } from "../../../../../power-pages/actions-hub/tree-items/NoDataTreeItem";
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";

describe('NoDataTreeItem', () => {
it('should be of type ActionsHubTreeItem', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@

import * as vscode from "vscode";
import { expect } from "chai";
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
import { OtherSitesGroupTreeItem } from "../../../../../actions-hub/tree-items/OtherSitesGroupTreeItem";
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
import { OtherSitesGroupTreeItem } from "../../../../../power-pages/actions-hub/tree-items/OtherSitesGroupTreeItem";

describe('OtherSitesGroupTreeItem', () => {
it('should be of type ActionsHubTreeItem', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

import * as vscode from "vscode";
import { expect } from "chai";
import { ActionsHubTreeItem } from "../../../../../actions-hub/tree-items/ActionsHubTreeItem";
import { SiteTreeItem } from "../../../../../actions-hub/tree-items/SiteTreeItem";
import { WebsiteStatus } from "../../../../../actions-hub/models/WebsiteStatus";
import { SiteTreeItem } from "../../../../../power-pages/actions-hub/tree-items/SiteTreeItem";
import { ActionsHubTreeItem } from "../../../../../power-pages/actions-hub/tree-items/ActionsHubTreeItem";
import { WebsiteStatus } from "../../../../../power-pages/actions-hub/models/WebsiteStatus";

describe('SiteTreeItem', () => {
it('should be of type ActionsHubTreeItem', () => {
Expand Down

0 comments on commit be918a4

Please sign in to comment.