-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[@powerpages][5x5] Update Webpage Content and Create Site Records on DV #1073
base: main
Are you sure you want to change the base?
[@powerpages][5x5] Update Webpage Content and Create Site Records on DV #1073
Conversation
…lyFileSystemProvider for site page previews
… CreateSiteHelper to utilize it
…omponents for site creation functionality
…ions and improve readability; add CreateSiteTypes for better type management
…ors in previewSitePagesContent function
…in EditableFileSystemProvider
… user inputs in CreateSiteHelper
…ntOptions interface
…eter for API calls
…tps://github.com/microsoft/powerplatform-vscode into users/amitjoshi/@powerpagesCreateSiteRecordsOnDV
…les for site pages
…itableFileSystemProvider for improved content management
|
||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
export async function populateSiteRecords(siteName: string, sitePagesList: string[], sitePages: any, orgUrl: string, telemetry: ITelemetry) { | ||
return vscode.window.withProgress({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use showProgressWithNotification. You can modify it to pass progress
parameter
} | ||
const { siteName, siteDescription, sitePages } = await fetchSiteAndPageData(intelligenceAPIEndpointInfo.intelligenceEndpoint, intelligenceApiToken, userPrompt, sessionId, telemetry, stream, orgId, envId, userId); | ||
const { siteName, siteDescription, sitePages, sitePagesList } = await fetchSiteAndPageData(intelligenceAPIEndpointInfo.intelligenceEndpoint, intelligenceApiToken, userPrompt, sessionId, telemetry, stream, orgId, envId, userId); | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unused-vars |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's unused here?
} | ||
|
||
export enum PowerPagesComponentType { | ||
PublishingState = '1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment mentioning what are these numbers? Also, I think this is duplicate in SiteComponents.ts
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra lines can be removed
} | ||
|
||
export enum PowerPagesComponentType { | ||
PublishingState = '1', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment mentioning what are these numbers?
export function base64ToArrayBuffer(base64String: string): ArrayBuffer { | ||
const binaryString = atob(base64String); | ||
const bytes = new Uint8Array(binaryString.length).map((_, i) => binaryString.charCodeAt(i)); | ||
return bytes.buffer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved to common utils
This pull request includes several changes to the localization files and the
PowerPagesChatParticipant
class to improve error messaging, site creation, and file system handling. The most important changes include updates to localization strings, modifications to thePowerPagesChatParticipant
class to register a new content provider, and updates to the command execution logic.Localization updates:
l10n/bundle.l10n.json
andloc/translations-export/vscode-powerplatform.xlf
. [1] [2]Enhancements to
PowerPagesChatParticipant
:EditableFileSystemProvider
to handle file system operations related to site creation.CommandRegistry
andPowerPagesChatParticipant
classes to pass theEditableFileSystemProvider
to commands. [1] [2]Command execution improvements:
CreateSiteCommand
class to include theEditableFileSystemProvider
in its execution logic, enabling better handling of file system operations during site creation. [1] [2]Telemetry updates:
VSCODE_EXTENSION_POPULATE_SITE_RECORDS_START
andVSCODE_EXTENSION_CREATE_SITE_OPERATION_SUCCESS
.These changes collectively enhance the functionality and user experience of the Power Pages site creation process in the VS Code extension.