-
Notifications
You must be signed in to change notification settings - Fork 20
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
💡 [Feature]: Add possibility to add custom additional step #217
Comments
Hi @Adam-it. How did you envision the array being stored? |
so my idea was to use expose it as and advance setting of an extension. and we add something like "editPresentation": "multilineText" the field should be present as a multiline text field. In this setting my idea was to store a JSON array with those settings like [
{
"label": "PnP JS SharePoint",
"command": "npm install @pnp/sp"
},
{
"label": "PnP React Reusable Controls",
"command": "npm install ...."
},
{ }
] we should add good docs and description how it works so it is clear how to modify this JSON and add your own nodes to the array with your own custom defined steps which then will be present in the scaffolding form. |
Hi @Adam-it . Thank you for the example. This helps me. I did not know of this option. I know that you mentioned not allowing for removal of the default ones but this json array would only specify the additional packages that someone would want installed. Yes, I believe that this addition would require good docs with examples to effectively help everyone. |
Exactly, |
Yes, please assign this to me. |
All yours 👍 |
Hi @Adam-it. I have made progress with this item but I do have some issues with the implementation. Currently I tried with selecting React and React Dom, PnP and then I added a new "Additional Step" called Install custom steps. This reads the setting value and then I loop through the json. This works. However, what I am seeing is that the React and React Dom step is being bundled with the install dependencies initial powershell task where npm i is executed. Every additional custom step is created in a new terminal window and installed simultaneously. In some cases the package is installed and no errors are shown, folder in node_modules but the package entry is not in package.json. I have tested this about 15 times so far. Do you know what would cause this? Also, I intended to show what would be installed in the scaffolding form but passing the setting value to the view didn't work as I expected so for now I have reverted that code. |
@ervingayle thanks for reaching out. I checked your commits and most probably I would investigate this part Here you have a Let me know if it helps. |
Hi @Adam-it . Thank you for the response. I tried with a for loop and get similar behavior. I realize the behavior that I am seeing is due to the fact that I set a unique title for each package that is set in the extension setting and the TerminalCommandExecutor is looking at title/name value to determine if a new terminal should be created. I don't change the name for the React, React Dom install option but I did for the custom steps which is why I was confused at first. Its tested and working now. |
Hi @Adam-it . Thanks for your help. PR submitted for this item. |
You Rock 🤩 |
Hi @Adam-it . Thank you for all your help. The guidance you provided helped. I have created a new PR for this issue. |
🎯 Aim of the feature
We should add some possibilities, preferably extending it as a setting for the extension, to allow devs to define their own additional setup options.
We could expose a setting in which users could manage a json array that will have a
label
andcommand
.label
will hold the string that will be present in the UI in the scaffolding form andcommand
will be the npm command that should be executed after this option was selected.example idea for a this kind of json object:
We should NOT allow to disable the pre-defined options
📷 Images (if possible) with expected result
No response
🤔 Additional remarks or comments
doing this change we should keep an eye out for this issue #216
if it is already done we should also add a option like
visiblity
that will allow to list out in as string array components that should have this option visibleThe text was updated successfully, but these errors were encountered: