Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.4k stars 1.98k forks source link

Anchor: The user is dropped in Home instead of the editor. #60316

Closed kwight closed 2 years ago

kwight commented 2 years ago

While testing https://github.com/Automattic/wp-calypso/pull/60271, I noticed that prod is dropping a new Anchor signup user in My Home, instead of in the editor with the home page. I don't know if this is intentional or not. 🙃

sixhours commented 2 years ago

I found a random revision where the original behavior (landing in the editor) exists at a9a7bc1606 so I'm running git bisect against it to see where this changed and whether it was intentional or accidental.

sixhours commented 2 years ago

Aha, ran into trouble with git bisect because some versions of older Calypso will not spin up. But as I was combing through the history, I found #56596 which sounds like the culprit. Testing it now.

sixhours commented 2 years ago

It seems like this decision was made on purpose, as part of consolidating the /start and /new signup flows: paYE8P-11m-p2#comment-959 and #56596

Later, sites enrolled in FSE beta were re-pointed to the site editor, while the rest point to My Home: #58976 based on discussion in p1638990744138800-slack-CHN6J22MP

My theory is sites that are created through the Anchor flow do not get flagged as FSE, and therefore do not go to the site editor, but with all my tinkering, I've messed up my local Calypso install and can't get /new?anchor_podcast=[podcastID] to work to test it. 🙃 Will try again tomorrow with fresh eyes.

sixhours commented 2 years ago

Alrighty, pinned this down. My theory was correct; where users are redirected is determined by the design they choose and whether the design supports full-site editing. In the case of Anchor, they have three potential designs to choose from, pulled from this list. Example of an Anchor theme:

https://github.com/Automattic/wp-calypso/blob/trunk/packages/design-picker/src/available-designs-config.json#L853-L864

The designs marked with the anchorfm feature do not also have the is_fse prop, so they get sent to My Home. If we fudge it and say these themes are FSE themes, they'll land on a non-existent site editor screen (because the themes aren't FSE compatible).

Potential solutions depending on how we want the flow to behave:

@kwight Did you have a preference? I'm leaning toward the first option to avoid additional fragmentation in the flow, but happy to work on a solution either way!

kwight commented 2 years ago

I'd say number 3 in the long run, and number 2 now – dropping Anchor users in My Home does not honour our agreement with them, so let's fix that quickly. And sure, in the long run, updating the Anchor themes to be based on FSE-compatible themes would be a good move. Thanks for sorting this out @sixhours !