I'm having some trouble/missing some crucial step(s) when using the CLI tools to develop & test a theme for a Plus B2B shop.
With D2C shops, the "theme dev" command can be run and the CLI tools make a development version of the theme available at the local development URL. Easy, no fuss.
Running that same workflow with a B2B shop, the CLI starts up the development theme as usual, but then in the browser I'm routed through the B2B/OTP login experience and that link to the development theme seems to get lost in the process and I end up on the live shop or our sandbox shop used for testing.
Is there one or more extra steps needed when running "theme dev" for a B2B shop theme?
Just to confirm are you looking to view the different B2B contexts of a theme when generating a development theme with the CLI?
I'm speaking to the development workflow when developing a B2B theme, specifically.
When the "theme dev" command is run via Shopify's CLI tool and an in-development theme is made available for preview at http://127.0.0.1:9292, I get routed through the typical B2B OTP sign-in process. Along the way, http://127.0.0.1:9292 is cast aside and I end up on the live theme of the shop specified with the --store flag.
This process organized into an order of events looks like:
Net result is that I can't preview any changes that have been made to the theme without first deploying them into production, which is not a workflow that I want to undertake. Of course access to other benefits like hot reload are lost at that point, too.
Since my original post, I did realize that I can use the shareable preview URL of the theme in development, but that's not really ideal as hot reload also doesn't work when the theme is viewed via that method.
I see what you mean - let me dig into this a bit further with our internal teams to see how this developer experience could be improved.