vscode-viva icon indicating copy to clipboard operation
vscode-viva copied to clipboard

πŸ’‘ [Feature]: Allow to use SPFx Toolkit AI Capabilities not in context of SPFx project

Open Adam-it opened this issue 8 months ago β€’ 1 comments

🎯 Aim of the feature

Currently, we allow to use the Github Copilot Chat participant and LLM Tools already outside of SPFx project but the biggest challenge here is that some of those capabilities will only work when we are signed in to our Tenant. Currently, it is possible using the VSCode command to perform login not in the context of the SPFx project Image

The biggest challenge is that it is not that obvious and not everybody may know about it. So we could think of refactoring the welcome experience of the extension when it is used not in the context of an SPFx project.

  • The most simple refactor I was thinking of is just add an additional button which will run the sign in action/command of this extension
  • Also I was thinking we could refactor the extension walkthrough to include a description of the AI capabilities with additional login action there as well
  • Optionally, we could totally rebuild this experience. Internally, there was a suggestion that some help links could be helpful to show even outside of SPFx Project. Also, the extension manage capabilities like showing the appcatalog lists and allowing to manage SPFx apps could also be helpful always not only in the context of SPFx project

πŸ“· Images (if possible) with expected result

No response

πŸ€” Additional remarks or comments

No response

Adam-it avatar Apr 30 '25 21:04 Adam-it

@Saurabh7019, @nicodecleyre what do you think? IMO adding a login button to the welcome experience is quite easy thing to do and could be a good start BUT I am really interested in your opinion on exposing other functionalities of the extension when not being in the context of the SPFx solution. I mean the whole account view and app catalog view make sense to be visible always not only in the SPFx project right? Also maybe some part of the help section?

The problem here is that the welcome experience is very, and I mean Veeeeery limited. It is actually a string in the package.json and VSCode has nothing on the roadmap to improve this https://code.visualstudio.com/api/ux-guidelines/views#welcome-views The way to go around it is just doing a standard view or a webview (BUT a webview in the primary sidebar, although it is possible, it is not the best idea, already know that from experience from PnP PS VS Code extension πŸ˜‰)

Adam-it avatar Apr 30 '25 21:04 Adam-it

@Saurabh7019, @nicodecleyre what do you think of this issue? besides AI capabilities I am really interested if maybe we should expose the management capabilities of SPFx Toolkit. Like login and managing app catalogs and app, outside of SPFx project scope. So that this extension would present those views always even if VS Code is not opened in the context of an SPFx solution

Adam-it avatar Jun 05 '25 00:06 Adam-it

I agree that making the login option more prominent is required. +1 on integrating the Help & Feedback section into welcome view as well.. those links could be most useful before someone starts working on an SPFx solution. Should we just add a link to the Help & Support page in our docs from the welcome view? it would keep the view clean and uncluttered.

Saurabh7019 avatar Jun 05 '25 12:06 Saurabh7019

app catalog view make sense to be visible always

since the toolkit supports both development and management of SPFx solutions, it does make sense to make the management options available outside the context of an SPFx project. A webview for this, similar to samples gallery?

Saurabh7019 avatar Jun 05 '25 12:06 Saurabh7019

It's a good idea! The login button is low-effort, high-impact. Also the help & feedback section is a great added value.

Besides that a custom view or a lightweight dashboard with quick actions (login, add app catalog etc..), help links would be another added value πŸ‘

nicodecleyre avatar Jun 05 '25 18:06 nicodecleyre

@Saurabh7019, @nicodecleyre, thanks for the feed. So lets agree on what we want to make available always (outside of the context of SPFx project). From what I understood, we could benefit to expose:

  • login option (maybe even the whole account view)
  • app catalog view
  • help & feedback view

the biggest problem is that the welcome experience is kinda totally not flexible in VS Code extensions 🀣. Its just a string we define in package.json so either we make a custom one like this OR we could totally rethink this experience. ... so I am thinking, what if we just DROP the welcome experience 😱😱😱😱 and do the following:

  • when in context of SPFx project we do exactly what we have now.
  • when NOT in context of SPFx project we:
    • show the account view - so allow to login, show the admin links and health info etc.
    • show app catalog view - of course we show it when we are logged in and allow all apps and app catalog management
    • NOT show the task view - no sense to show gulp tasks when not in context of SPFx project
    • show the actions view as well BUT - we hide most of the actions as most of them make sense in context of SPFx project and show actions:
      • create new project (instead of Add new component action) - this would open the scaffolding form with the possibility to create new SPFx project
      • View samples - the same as it works now
      • Set Form Customizer - the same as it works now
      • Validate local setup - a new action that will run the check dependencies action
      • Install dependencies - a new action that does the same as the button with that name on welcome experience we have now
      • Use SPFx in GitHub Copilot - a new action that does the same as the button with that name on welcome experience we have now. This action actually could be also added to be present even in the context of SPFx project
    • show the help and feedback section

What do you guys think?

Adam-it avatar Jun 05 '25 21:06 Adam-it

@Adam-it Sounds good to me, i like it 🀩 πŸ‘

nicodecleyre avatar Jun 07 '25 22:06 nicodecleyre

@Adam-it Sounds good to me, i like it 🀩 πŸ‘

This would be a huge change especially for the welcome experience but I think all in all for the better. @Saurabh7019 what about you? Do you think it is the way to go? or is it to drastic?

Adam-it avatar Jun 08 '25 00:06 Adam-it

Its perfect. Zero hesitation on this. Let's go!

Saurabh7019 avatar Jun 08 '25 03:06 Saurabh7019

Ok, thanks for the feedback. I will take this one since it seems kinda bigger and at times may be tricky

Adam-it avatar Jun 08 '25 06:06 Adam-it

This was merged to dev

Adam-it avatar Jul 20 '25 09:07 Adam-it