Automattic / wp-calypso

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

Live Preview with Bundle Themes #86274

Open okmttdhr opened 9 months ago

okmttdhr commented 9 months ago

Description

Lego shipped Live Preview in Premium and WooCommerce themes, as detailed in https://github.com/Automattic/wp-calypso/issues/79223. However, it is currently limited to Premium and Woo themes, while it should be expanded to all Bundle themes that are coming (See https://github.com/Automattic/wp-calypso/pull/85182#discussion_r1427994054, p6rkRX-75y-p2).

Several changes are required at this moment to facilitate this transition to Bundle themes-applicable. Here are some key areas to consider:

Aligning with the Theme Tiers project paYJgx-4mO-p2 might be necessary, as I saw some code comments. However, I haven't fully explored this aspect yet. Relevant code segments include:

Acceptance Criteria

Dev Tasks

TBD

Testing

TBD

Related

CC: @Automattic/lego @renatho @Automattic/t-rex

dsas commented 9 months ago

wrt to bundled themes:

For the canUseWooCommerceTheme logic, then no it's not always the same. Only Woo requires the FEATURE_WOOP feature. WOOP is perhaps badly named, I think it means Woo-on-Plans.

For the checkout link - yes, they all need the business plan or higher - "bundled" means "installing this theme will also install some plugins", and plugins are all on the business plan

dsas commented 9 months ago

For theme tiers, then use of theme tiers will simplify/genericise some of this logic, we can just check "the lowest plan necessary to use a theme of this tier", for example.

We're still some weeks away from releasing to customers though and as the live preview is part of the block-editor package it makes it hard to use feature flags inside of the live preview itself.

@rcrdortiz has been doing the work of updating the live preview to work with tiers.

okmttdhr commented 9 months ago

Thank you for providing helpful info, @dsas!

@Automattic/lego For more context on Bundle themes, please refer to p6rkRX-75y-p2 and https://github.com/Automattic/wp-calypso/pull/85182#discussion_r1427994054. This issue is not something that is a top priority, but I believe it'd be beneficial to expand Live Preview with some tweaks.

We're still some weeks away from releasing to customers though and as the live preview is part of the block-editor package it makes it hard to use feature flags inside of the live preview itself.

In light of this, I have decided to move this issue to the Backlog for the time being.

Other resources;