Warn when using preview SharePoint Framework features
The latest version of the SharePoint Framework Yeoman generator contains a mix of features that are GA and preview features (for example connecting to MS Graph, web part connections, extensions). Whether the generated solution can be run in production depends on the features used to build the web part. With that, when bundling the project, the toolchain should warn of any experimental features being used in the project which would prevent the solution from being deployed to production tenants. This would help developers avoid deploying solutions depending on experimental features to production tenants, only to see the deployment fail.
We’re reviewing your suggestion. Like Pat already noted in the comments, we are looking into this one and hopefully can make this happen relatively soon. Thanks for your feedback!
Looking at the news center in Office 365 we can see, that even features that are GA already could take weeks to reach all tenants. So when should be the point in time to remove the warnings?
How about seeing this from the installers side? If there would be a message like 'Your tenant doesn't have the 'GraphHttpClient'-Feature yet!' when the package is added to the tenants app catalog that would be a valuable information.
Pat Miller (MSFT) commented
Hmn. Maybe I need to step back one step. I guess there are 4 different possible places to get involved.
1 - In yeoman
2 - During a build
3 - during package upload/activation
4 - during code execution
Those are probably in order of complexity as well :)
Which area would you like to drill into?
Waldek Mastykarz commented
Showing a warning in Yeoman is a good first step, but as not everyone on the team might be adding new components to the solution it would be better to have something more. What if the toolchain could produce a warning when building the project based on imported packages? You could easily extract them from webpack stats
Russell Gove commented
@PatMiller I would say option1(make user opt in when they run the yeoman) and then a warning Whenever we build saying that Preview features are used in the code.
Alex Terentiev commented
I would vote for annoying warning dialog like current one for "loading debug scripts". If it's implementable, of course.
Pat Miller (MSFT) commented
We were discussing this yesterday. There are a couple of things to consider, and getting some feedback would be good.
1 - There are times when there is something new at a top level (like the new extensions, or a new type of extension). One possibility here is that in Yeoman, there is a top level choice "Add Preview (not supported) component".
2 - There are times when you are using supported components (say a WebPart), but you are using a beta API (say the GraphHttpClient). What would be a good approach here? Intellisense saying "Beta" at the beginning of the description? A warning message each time you use a beta API? ( don't know what is even possible here to be honest)