Skip to content
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

Merged
merged 4 commits into from
Jul 15, 2022

Conversation

vedg
Copy link
Contributor

@vedg vedg commented Jul 14, 2022

@vedg vedg changed the title enhanced save logic Remote Save Provider refactoring and enhancements Jul 14, 2022
@vedg vedg requested a review from ashishchoudhary001 July 14, 2022 21:09
}

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);
Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

@ashishchoudhary001 ashishchoudhary001 left a 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);
Copy link
Contributor

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) {
Copy link
Contributor

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

@vedg vedg merged commit 77af5f1 into webExtension-preview Jul 15, 2022
@vedg vedg deleted the save_provider_changes branch July 15, 2022 09:33
ashishchoudhary001 added a commit that referenced this pull request Sep 6, 2022
* 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]>
ashishchoudhary001 added a commit that referenced this pull request Sep 8, 2022
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants