-
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
Remote Save Provider refactoring and enhancements #236
Conversation
} | ||
|
||
function createVirtualFile(portalsFS: PortalsFS, fileName: string, languageCode: string, data: any, portalFileExtension: string, subUri: string) { | ||
function createVirtualFile(portalsFS: PortalsFS, fileName: string, languageCode: string, data: any, portalFileExtension: string, subUri: string,entityId : string, saveDataAtribute : string ) { | ||
const saveEntityDetails = new SaveEntityDetails(entityId, fileName, saveDataAtribute); |
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.
Are we incorrectly saving fileName instead of EntityName in the saveDataMap?
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.
Yes fileName and entityname are different - updated it
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.
saveData implementation is still incorrect. It should pick the entity name from the saveDataMap.
} | ||
|
||
function createVirtualFile(portalsFS: PortalsFS, fileName: string, languageCode: string, data: any, portalFileExtension: string, subUri: string) { | ||
function createVirtualFile(portalsFS: PortalsFS, fileName: string, languageCode: string, data: any, portalFileExtension: string, subUri: string,entityId : string, saveDataAtribute : string ) { | ||
const saveEntityDetails = new SaveEntityDetails(entityId, entityName, saveDataAtribute); |
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.
from where are you fetching the entityName? I don't see it being passed in the createVirtualFile function.
|
||
export async function saveData(accessToken: string, requestUrl: string, fileUri: vscode.Uri, entity: string, saveDataMap: Map<string, string>, value: string) { | ||
export async function saveData(accessToken: string, requestUrl: string, fileUri: vscode.Uri, entity: string, saveDataMap: Map<string, SaveEntityDetails>, value: string) { |
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.
saveData function should not have entity as a parameter. It should fetch entity from the saveDataMap
* fetch and save feature implemented * eslint issues fixed * fixed undefined file issue * fixed multi-file creation issue * fixed save logic * Open default file for editing in vscode editor * name and display name updated with preview tag * Remote Save Provider refactoring and enhancements (#236) * enhanced save logic Co-authored-by: Ved Garbha <[email protected]> * orgurl from studio update (#237) Co-authored-by: Ved Garbha <[email protected]> * portalfoldername change (#238) Co-authored-by: Ved Garbha <[email protected]> * Folder structure change for Power portals (#239) * folder structure change * removed hardcoded guid Co-authored-by: Ved Garbha <[email protected]> * Users/aschoud/error handling (#240) * added error handling for all parameters * added method to decode query parameters * removed unused constants * renamed customcss files to have .css extension Co-authored-by: Ashish Choudhary <[email protected]> * updated default site name and portal uri scheme (#241) Co-authored-by: Ved Garbha <[email protected]> * added fileSystem activation event for our scheme (#243) * added fileSystem activation event for our scheme * changed the uri scheme Co-authored-by: Ashish Choudhary <[email protected]> * string changes (#244) Co-authored-by: Ved Garbha <[email protected]> * Language code fix for file name (#246) * language code fix for file name * auth fix and default language code to blank Co-authored-by: Ved Garbha <[email protected]> * lint fixes (#245) Co-authored-by: Ved Garbha <[email protected]> * Users/aschoud/web extension telemetry (#247) * added init telemetry event * added methods for path and query parameter telemetry * renamed methods * added api telemetry events * added perf telemetry events Co-authored-by: Ashish Choudhary <[email protected]> * added the correct url for logging (#248) Co-authored-by: Ashish Choudhary <[email protected]> * Custom css file edit enable (#256) * Custom Css editing enable on this VSCode extension * Update for filename and common utility changes * fix spacing * Resolve comments * update comment * Bug fix for save error popup. (#267) * fixed fileName case in the import * added filter to check for valid save events Co-authored-by: Ashish Choudhary <[email protected]> * Localization changes for web extension (#251) * ts files localization changes for web extension * unique keys for translation added * added tasks for vscodeweb localization files Co-authored-by: Ved Garbha <[email protected]> * removing nls loader from webconfig (#274) Co-authored-by: Ved Garbha <[email protected]> * Site visibility dialog (#272) * site visibility dialog added Co-authored-by: Ved Garbha <[email protected]> * reverting formatting changes in gulpfile * removing preview from the extension name * reintroducing preview tags to test the webExtension before merging with main * removing the ui fcb for webExtension * reverting changes to package.json and package-lock.json * adding activation event for webExtension * adding preview tag for testing * removed unused strings * removing preview tag Co-authored-by: Ved Garbha <[email protected]> Co-authored-by: Ashish Choudhary <[email protected]> Co-authored-by: Ved Garbha <[email protected]> Co-authored-by: tyaginidhi <[email protected]>
* fetch and save feature implemented * eslint issues fixed * fixed undefined file issue * fixed multi-file creation issue * fixed save logic * Open default file for editing in vscode editor * name and display name updated with preview tag * Remote Save Provider refactoring and enhancements (#236) * enhanced save logic Co-authored-by: Ved Garbha <[email protected]> * orgurl from studio update (#237) Co-authored-by: Ved Garbha <[email protected]> * portalfoldername change (#238) Co-authored-by: Ved Garbha <[email protected]> * Folder structure change for Power portals (#239) * folder structure change * removed hardcoded guid Co-authored-by: Ved Garbha <[email protected]> * Users/aschoud/error handling (#240) * added error handling for all parameters * added method to decode query parameters * removed unused constants * renamed customcss files to have .css extension Co-authored-by: Ashish Choudhary <[email protected]> * updated default site name and portal uri scheme (#241) Co-authored-by: Ved Garbha <[email protected]> * added fileSystem activation event for our scheme (#243) * added fileSystem activation event for our scheme * changed the uri scheme Co-authored-by: Ashish Choudhary <[email protected]> * string changes (#244) Co-authored-by: Ved Garbha <[email protected]> * Language code fix for file name (#246) * language code fix for file name * auth fix and default language code to blank Co-authored-by: Ved Garbha <[email protected]> * lint fixes (#245) Co-authored-by: Ved Garbha <[email protected]> * Users/aschoud/web extension telemetry (#247) * added init telemetry event * added methods for path and query parameter telemetry * renamed methods * added api telemetry events * added perf telemetry events Co-authored-by: Ashish Choudhary <[email protected]> * added the correct url for logging (#248) Co-authored-by: Ashish Choudhary <[email protected]> * added the samples workflow to the preview extension * Custom css file edit enable (#256) * Custom Css editing enable on this VSCode extension * Update for filename and common utility changes * fix spacing * Resolve comments * update comment * Bug fix for save error popup. (#267) * fixed fileName case in the import * added filter to check for valid save events Co-authored-by: Ashish Choudhary <[email protected]> * Localization changes for web extension (#251) * ts files localization changes for web extension * unique keys for translation added * added tasks for vscodeweb localization files Co-authored-by: Ved Garbha <[email protected]> * removing nls loader from webconfig (#274) Co-authored-by: Ved Garbha <[email protected]> * walkthrough changes * Site visibility dialog (#272) * site visibility dialog added Co-authored-by: Ved Garbha <[email protected]> * reverting formatting changes in gulpfile * removing preview from the extension name * added test commands for the walkthrough * added dummy links in the walkthrough * added command to focus the sidebar * added conditions to show walkthrough only for webExetnsion * added command for opening file explorer * fixed walkthrough advanced capability image * added localization strings for walkthrough * added localization genearted files * fixed walkthrough image path * resetting the package version * added defaultFileUri * removed unused strings * reverting package-lock.json changes * rearranged activation events * rearranged activation events Co-authored-by: Ved Garbha <[email protected]> Co-authored-by: Ashish Choudhary <[email protected]> Co-authored-by: Ved Garbha <[email protected]> Co-authored-by: tyaginidhi <[email protected]>
Added save entity detailed structure and enhancements
Requirements added here: https://github.com/microsoft/vscode-dev/issues/477
Testing:
npm run compile-web
tested with portal route - http://localhost:3000/powerplatform/portal/webpages/563a8e53-6cf7-ec11-82e4-000d3a8b4b81?orgUrl=org4e297bda.crm10.dynamics.com&source=dataverse&schema=portalDataverseoldschema&websiteId=24828659-6cf7-ec11-82e4-000d3a8b4b81