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

💡 [Feature]: Present solutions deployed per app catalog #215

Closed
Adam-it opened this issue Apr 17, 2024 · 18 comments · Fixed by #319
Closed

💡 [Feature]: Present solutions deployed per app catalog #215

Adam-it opened this issue Apr 17, 2024 · 18 comments · Fixed by #319
Assignees
Labels
👨‍💻 CLI for Microsoft 365 Requires to first extend CLI for Microsoft 365 ⭐ enhancement New feature or request hacktoberfest 👨‍💻work in progress I am working on it
Milestone

Comments

@Adam-it
Copy link
Member

Adam-it commented Apr 17, 2024

🎯 Aim of the feature

The aim of this issue is to show apps deployed to each app catalog (similar way like we now present tenant-wide extensions for tenant level app catalog)

Additionally, we could introduce the following features:

  • allow to disable and enable a solution
  • allow to move solutions between app catalogs (from site level to tenant level and the other way around)
  • allow to remove and retract a solution
  • clicking on app link should go to the solution appStore.aspx page
  • allow to add a webpart to all sites

we should add an extension setting that will allow to hide this information in the UI

📷 Images (if possible) with expected result

image

🤔 Additional remarks or comments

parent issue: #15

@Adam-it Adam-it added ⭐ enhancement New feature or request 🙏 help wanted Open for contributors labels Apr 17, 2024
@Adam-it Adam-it added this to the v3.X milestone Apr 17, 2024
@Adam-it Adam-it added the 👨‍💻 CLI for Microsoft 365 Requires to first extend CLI for Microsoft 365 label Jun 22, 2024
@Saurabh7019
Copy link
Contributor

Hi @Adam-it , Can you assign this to me please?

@Adam-it Adam-it added 👨‍💻work in progress I am working on it and removed 🙏 help wanted Open for contributors labels Jul 8, 2024
@Adam-it
Copy link
Member Author

Adam-it commented Jul 8, 2024

Hi @Adam-it , Can you assign this to me please?

Sure thing.
This one is a bit more difficult. Please do ask questions if you have any kind of problem or doubt 👍

@Saurabh7019
Copy link
Contributor

Please do ask questions

Sure. Thank you :)

@Saurabh7019
Copy link
Contributor

Hi @Adam-it,
Is cli-cjs updated? I am getting an error in the latest dev branch:

image

The account signin is not working.

image

@Adam-it
Copy link
Member Author

Adam-it commented Jul 11, 2024

Hi @Adam-it, Is cli-cjs updated? I am getting an error in the latest dev branch:

image

The account signin is not working.

image

how did you obtain cli-cjs version?
I am asking as currently it is very hacky and tricky and there is no good way around it. and running just npm install wont solve this.
What you need to do i to manually replace CLI for M365 in node modules with your local version of CLI in cjs
you may do it by follwoing those steps:

  • Clone the cjs version of CLI for Microsoft 365 from the following Github repo/branch cli-cjs next to vscode-viva repo
  • In the cloned CLI for Microsoft 365 repository, run: npm install, npm run clean, npm run build to generate the CLI for Microsoft 365 output. Make sure the cloned CLI for Microsoft 365 repository is in the same workspace as the SharePoint Framework Toolkit repository. So for example you should have the following structure:
root:
  - cli-microsoft365
  - vscode-viva  
  • from the cloned for of SharePoint Framework Toolkit repository run the following script cli-for-microsoft365-copy-local-version passing the workspacePath the full path to the root folder of the workspace. This script will copy the output of the CLI for Microsoft 365 to the SharePoint Framework Toolkit extension node modules folder.

@Saurabh7019
Copy link
Contributor

I was trying exactly as you mentioned. I tried again with a fresh clone, and now I am getting another issue:

image

If it works fine for you, I must be doing something wrong. I will try again later today.

@Adam-it
Copy link
Member Author

Adam-it commented Jul 11, 2024

I was trying exactly as you mentioned. I tried again with a fresh clone, and now I am getting another issue:

image

If it works fine for you, I must be doing something wrong. I will try again later today.

this error says that you are using esm version of js which is not supported in VS Code extensions.
This would seem like you still have CLI in esm no in cjs from my branch 🤔.
Are you trying to add some CLI command which is not already used? maybe there is some bug in cli-cjs branch 🤔. do you wanna share your branch with your changes done so far and some details? I could give it a check over the weekend

@Saurabh7019
Copy link
Contributor

It works after cleanup. Thanks for looking into it. I will work on this issue soon; have a great summer. :)

@Adam-it Adam-it modified the milestones: v3.X, v4.X Sep 8, 2024
@Adam-it
Copy link
Member Author

Adam-it commented Sep 23, 2024

Hi @Saurabh7019
Hows the work coming up with this issue?
Do you need any additional help from my side?
This year the SPFx Toolkit repo will participate in hacktoberfest and this issue will count so if you are also planning to join this event please do remember to rise a PR during October (no sooner no later 😉)

@Saurabh7019
Copy link
Contributor

Hi @Adam-it ,

Thanks for checking in. Most of the features are done, except for the 'Move apps between app catalogs' part. Also, to improve the extension load times, I made changes in ActionTreeDataProvider so that apps and extensions are loaded only when the user expands the relevant tree view node (I can undo this if needed during review). Right now, it looks like this:

image

I did most of the work during the summer vacation, but I am struggling to find time to wrap it up now. In hindsight, we should have broken this into multiple issues; it would have made things easier.

I will try to work on "Move apps" feature early next week and raise a PR.

@Adam-it
Copy link
Member Author

Adam-it commented Sep 24, 2024

Hi @Adam-it ,

Thanks for checking in. Most of the features are done, except for the 'Move apps between app catalogs' part. Also, to improve the extension load times, I made changes in ActionTreeDataProvider so that apps and extensions are loaded only when the user expands the relevant tree view node (I can undo this if needed during review). Right now, it looks like this:

I did most of the work during the summer vacation, but I am struggling to find time to wrap it up now. In hindsight, we should have broken this into multiple issues; it would have made things easier.

I will try to work on "Move apps" feature early next week and raise a PR.

wow looks really awesome 🤩 You Rock 🚀😍.
Some feed/question from my side:

  • what if for the move app feature we create a follow issue and take it later on when we have more time. I guess as first go we do not have to introduce everything at once 💪
  • what does the remove do? is it moving to recycle bin or permanent remove or there is a follow up question what should be the action?
  • what does the deploy do? does it install it on a selected SharePoint site? Because the app is already deployed to an app catalog right
  • I was also wondering if it would be better to add those 'actions' next to the app name not under it like this
    image
    it's also possible to add ... with menu to more options like this
    image
    we already use those actions next to the account to show the sign-out button here

    vscode-viva/package.json

    Lines 411 to 417 in fc90031

    "view/item/context": [
    {
    "command": "spfx-toolkit.logout",
    "when": "view == pnp-view-account && viewItem == m365Account",
    "group": "inline@1"
    }
    ],

BTW awesome to see you are also using the CLI VS Code extension 😍

@Saurabh7019
Copy link
Contributor

Saurabh7019 commented Sep 24, 2024

  • what if for the move app feature we create a follow issue and take it later on when we have more time. I guess as first go we do not have to introduce everything at once 💪
    Sounds good!
  • what does the remove do? is it moving to recycle bin or permanent remove or there is a follow up question what should be the action?
    remove is inverse of add. It moves the app to recycle bin. Once removed from the app catalog, the solution can't be deployed.
  • what does the deploy do? does it install it on a selected SharePoint site? Because the app is already deployed to an app catalog right
    Deployment of the solution makes it available to install in sites. It does not automatically install it on the selected site.
  • I was also wondering if it would be better to add those 'actions' next to the app name not under it like this.
    This design looks so much better. I will make this change.
  • Additionally, we have Enable and Disable actions:
    Enable: Enabling an app will allow end users to see it as an option to add to their SharePoint sites.
    Disable: Disabling the app will hide it from end users, preventing them from adding it to sites.

Saurabh7019 added a commit to Saurabh7019/vscode-viva that referenced this issue Oct 6, 2024
Saurabh7019 added a commit to Saurabh7019/vscode-viva that referenced this issue Oct 7, 2024
Saurabh7019 added a commit to Saurabh7019/vscode-viva that referenced this issue Oct 8, 2024
@Adam-it Adam-it linked a pull request Oct 13, 2024 that will close this issue
6 tasks
Adam-it pushed a commit to Saurabh7019/vscode-viva that referenced this issue Oct 14, 2024
Adam-it pushed a commit that referenced this issue Oct 14, 2024
## 🎯 Aim

> Present solutions deployed per app catalog and add additional
app-related actions (deploy, retract, remove, enable, disable etc.)

## 📷 Result

![image](https://github.com/user-attachments/assets/9bf83f77-83ea-44a6-9fe5-fec24e47ac12)

## ✅ What was done

- [X] Dynamic loading of children for ActionTreeItem
- [X] Present solutions deployed per app catalog
- [X] Allow to disable and enable a solution
- [X] Allow to deploy and retract a solution
- [X] Allow to remove a solution
- [X] Clicking on app link should go to the solution appStore.aspx page
- [] Allow to move solutions between app catalogs (from site level to
tenant level and the other way around)
- [] Allow to add a webpart to all sites

## 🔗 Related issue

> Closes #215
@Adam-it
Copy link
Member Author

Adam-it commented Oct 14, 2024

@Saurabh7019 Awesome work 👏👏👏. You Rock 🤩
I just merged the PR and will try to create a pre-release ASAP 👍
@Saurabh7019 would you be so kind and create a follow up issue to this one?
I think we could think of more manage features like:

  • promoting to tenant-level from site-level
  • install to a specified sitecollection (we could present an additional input to specify the site URL)
  • uninstall from a specified sitecollection (we could present an additional input to specify the site URL)
  • upgrade the app at the specified sitecollection

what do you think 😍 Sounds really awesome right 👍

@Adam-it Adam-it closed this as completed Oct 14, 2024
@Saurabh7019
Copy link
Contributor

would you be so kind and create a follow up issue to this one?

Absolutely, I'd be happy to create a follow up issue.

I noticed that you have not included the 'allow to move solutions between app catalogs' feature. I think that's a good idea; I have never encountered such a use case. If anything, it should be 'Allow to copy solutions between app catalogs.'

I was also thinking about the extension settings to hide apps/extensions. Since we now only load them when the nodes are expanded to ensure that the additional API calls don't affect the extension load time, do we really need additional extension settings to hide/show them?

For now, I will create an issue to track the four ideas you suggested. We can always add more when you have had a chance to review them.

@Adam-it
Copy link
Member Author

Adam-it commented Oct 15, 2024

Absolutely, I'd be happy to create a follow up issue.

Awesome. Thanks a ton 👏👏

I noticed that you have not included the 'allow to move solutions between app catalogs' feature. I think that's a good idea; I have never encountered such a use case. If anything, it should be 'Allow to copy solutions between app catalogs.'

Yes I forgot about that. We could have one single issue to group all ideas what could be included there (like an epic) and then create 'sub issues' with a issue describing a single action we could add. Similar approach we take in CLI for M365 with adding new command areas.

I was also thinking about the extension settings to hide apps/extensions. Since we now only load them when the nodes are expanded to ensure that the additional API calls don't affect the extension load time, do we really need additional extension settings to hide/show them?

Good call. This setting doesn't make sense now. We could either remove this setting totally or we could try to rebuild it to a setting that will allow to either load apps from appcatalogs or don't and show only the app catalog list. What do you think? This could be a separate issue as well 😉. I will try to create one for that. Good team work 👍

For now, I will create an issue to track the four ideas you suggested. We can always add more when you have had a chance to review them..

Feel free to point out more ideas if you have any. I was thinking also of a action that would show the app details in the SPFx Toolkit extension like to what hosts is it applicable (like Teams Tab or Personal App etc).

@Saurabh7019
Copy link
Contributor

I was thinking also of a action that would show the app details in the SPFx Toolkit extension like to what hosts is it applicable (like Teams Tab or Personal App etc).

Are you referring to presenting the supportedHosts property from the web part manifest? If so, I am curious how that would work for an app that contains multiple web parts?

@Adam-it
Copy link
Member Author

Adam-it commented Oct 18, 2024

Are you referring to presenting the supportedHosts property from the web part manifest? If so, I am curious how that would work for an app that contains multiple web parts?

that's why we have prototype stage for every feature 😉 Wanna brainstorm on this?

Adam-it pushed a commit that referenced this issue Oct 19, 2024
## 🎯 Aim

> Present solutions deployed per app catalog and add additional
app-related actions (deploy, retract, remove, enable, disable etc.)

## 📷 Result

![image](https://github.com/user-attachments/assets/9bf83f77-83ea-44a6-9fe5-fec24e47ac12)

## ✅ What was done

- [X] Dynamic loading of children for ActionTreeItem
- [X] Present solutions deployed per app catalog
- [X] Allow to disable and enable a solution
- [X] Allow to deploy and retract a solution
- [X] Allow to remove a solution
- [X] Clicking on app link should go to the solution appStore.aspx page
- [] Allow to move solutions between app catalogs (from site level to
tenant level and the other way around)
- [] Allow to add a webpart to all sites

## 🔗 Related issue

> Closes #215
@Saurabh7019
Copy link
Contributor

Wanna brainstorm on this?

Absolutely! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👨‍💻 CLI for Microsoft 365 Requires to first extend CLI for Microsoft 365 ⭐ enhancement New feature or request hacktoberfest 👨‍💻work in progress I am working on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants