What if we bring back the SPFx Local Workbench? #545
Replies: 5 comments 6 replies
-
|
Hi guys, As to the benefit of testability: how would this be a benefit as opposed to the remote workbench? The same would be possible there I think? The same flies for dev proxy. Now I must say I still have my developer tenant, but I know and fully understand the pain point there. As to me personally: in all the years that I built SPFx webparts and extensions I think I never actually used the local workbench... We often build stuff remotely, while deploying the SharePoint artifacts that we need using (for example) pnp templating or scripts. So our "mock data" is actual SharePoint artifacts and content. We just build it out on SharePoint from the get go. The power of that is that these "mock" SharePoint sites and artifacts are easily deleted and reprovisioned in the shape that we need them to be. Another benefit of that is that we are actually prepping for live deployments while building our "mocks" in actual SharePoint. Of course this method has drawbacks of its own, but it works for us, and our SPFx projects are usually quite small. |
Beta Was this translation helpful? Give feedback.
-
|
Hi everyone, I haven’t used the local workbench at all. From my perspective as a SharePoint developer, you’ll need a real SharePoint environment at some point. I'm not sure how much effort it would take to fully recreate the local workbench, but it's likely that it would also require constant updates whenever Microsoft changes the behavior of SharePoint pages. While writing this post, I started to think that maybe recreating the local workbench isn't really necessary. However, if we can enhance the solution compared to the existing remote workbench (for example, by showing the web part in all types of sections to immediately check mobile behavior) then it could be a useful tool for a wider audience. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks Martin, that's how we do it as well. I also switched to the SPO workbench right away and never really used the local one. And I agree, the local workbench doesn't offer any real testability advantage over the remote one. The only real benefit would be when tenant access is a blocker. For example, in trainings, quick demos, or when testing basic logic without needing to set anything up. Like when you are running an SPFx workshop for a lot of people and not everyone has a tenant. This could help them get started quickly. Michael, the effort shouldn't be much since we were not thinking of fully recreating workbench or matching all features. Just a lightweight HTML and JS page that can load SPFx web parts locally. Nothing more. If we start enhancing it to support mobile responsiveness and test different section layouts, we may be opening up a bigger scope. We were discussing this internally as a possible tool in SPFx Toolkit and were divided on if it's worth the effort. So far, it looks like it is probably not needed. |
Beta Was this translation helpful? Give feedback.
-
|
@mkm17 said:
+1 to this The local workbench has been gone for a long time now & it was limited before supporting only a subset of web part & ACE projects. It's not a real-world scenario and was less useful than a similar existing project for Teams (M365 Agents Playground, formerly the Test Tool). IMHO, if a new local workbench option spun up, unless it addressed almost ALL the old limitations of the old one (such as those below), I wouldn't use it nor recommend or even mention it to my students. Legacy local workbench limitations:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks everyone for sharing your thoughts. It is clear from the discussion that the basic lightweight local workbench we were thinking of wouldn't really help with SPFx development. For training or workshops, it might have helped a little, but that doesn't seem like a strong enough reason to build and maintain a new tool. We will stop investing in this idea for now and focus on other things. Thank you again for you feedback, we have got enough input to write a clear spec in case we ever decide to revisit it in the future. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey folks,
We have been discussing this internally and wanted to open it up here. Curious to hear what you all think.
The SPFx Local Workbench was deprecated in version 1.13.1. Since then, running it requires a tenant. That wasn't a big issue, but things have changed. There are now a few new challenges that make the case for bringing it back.
A few reasons why we think it makes sense:
env.localchecks in the code. That's still needed, but with Dev Proxy, mocking responses is way easier.We are thinking about a small npm package that serves a static HTML page with basic JS and CSS to simulate a SharePoint workbench. It wouldn't be a full replica, just enough to load SPFx web parts locally and make testing easier.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions