Wp-calypso: Earn: feature flags for payments/pay with paypal rename

Created on 12 Jun 2020  路  8Comments  路  Source: Automattic/wp-calypso

For clarity we鈥檒l be renaming Recurring Payments -> Payments and Simple Payments -> Pay with PayPal button. Naming changes are expected to land on July 7th to match the Jetpack 8.7 release.

In order to safely land our naming changes in Calypso and on the server, we'll need to add feature flags

  • [x] New feature flag in Calypso
  • [ ] Some flagging mechanism in wpcom

see also pbMlHh-jI-p2

Earn [Type] Task

Most helpful comment

I think so, but we'd need to combine Automattic/jetpack#16095 and Automattic/jetpack#16133 into one single PR. They both are relatively small, so I guess it makes sense. Will look into it later today 馃憤

Just merged changes from Automattic/jetpack#16095 to Automattic/jetpack#16133, so from now on all Earn features renames are covered as follow:

Since we have a proper feature flag in Calypso, we can leave the Calypso PRs separated.

All 8 comments

Calypso will have a earn/pay-with-paypal feature flag, introduced in https://github.com/Automattic/wp-calypso/pull/43192/commits/cf7fea37d9f348bdb356b2443335ed7bc0326ffc

Some flagging mechanism in wpcom

I've suggested a temporary constant and asked for advice from JP people: https://github.com/Automattic/jetpack/pull/16133#issuecomment-644458597

Until now, we've just held off committing matching WordPress.com diffs until an hour before the release whenever a diff would introduce changes to block markup or other important changes like that. I keep a list of such diffs and usually commit them myself or coordinate with the PR author so they commit themselves on release day.

@jeherve suggested to hold onto the wpcom diffs, though we'll have quite a number. Any preferences here @kwight @mmtr? I think we can break this down into three main options, though feel free to chime in if folks can think of more.

1. Hold onto our wpcom diffs and keep them relatively updated (should anything land in those files in the meantime).

Pros: Simple. Cons: lots of floating diffs and some upkeep to keep them up to date.

2. Manually generate our wpcom diffs with a constant like ENABLE_PAYMENTS_RENAME.

Pros: One line diff to turn this on when Jetpack is released. Diffs can land. Cons: Unfusions the file (we'll of course re-sync and tidy afterwards). May cause some headaches for others if folks are landing changes to those files.

3. Add a filter or equivalent on both Jetpack and wpcom changes.

Pros: Files remain fusioned. Can land in diffs early. Cons: a bit awkward in code usage, need to cleanup on both Jetpack/wpcom after this is done.

Add a filter or equivalent on both Jetpack and wpcom changes

I'd vote for this one. While unlikely, if we are in need of deploying a critical fix for the Simple Payments block, it'd be much easier if we have the fusioned files in sync.

Agree that the code logic will be a bit weird, but I think that not keeping updated the undeployed diffs or avoiding a manual generation is worth it.

though we'll have quite a number

Is this only to update the names of the 2 blocks? If so, that should be all done with D44970-code, correct? Things are a bit messy right now since some of the changes were already committed, and then modified on WordPress.com before the Jetpack PR landed, but overall this could all be done with one diff?

If so, I'd still vote for just holding off committing it for the next couple of weeks. We always have a few of those in each Jetpack release, and while it's certainly not a perfect way to handle things, I think it can work.

Is this only to update the names of the 2 blocks?

We also have to rename a few public facing usages in D44951-code that are outside Jetpack. But since files modified there don't depend on https://github.com/Automattic/jetpack/pull/16133 / D44970-code, we wouldn't need to worry to much.

some of the changes were already committed, and then modified on WordPress.com before the Jetpack PR landed

We should be good now, we reverted them in D44958-code.

this could all be done with one diff?

I think so, but we'd need to combine https://github.com/Automattic/jetpack/pull/16095 and https://github.com/Automattic/jetpack/pull/16133 into one single PR. They both are relatively small, so I guess it makes sense. Will look into it later today 馃憤

I think so, but we'd need to combine Automattic/jetpack#16095 and Automattic/jetpack#16133 into one single PR. They both are relatively small, so I guess it makes sense. Will look into it later today 馃憤

Just merged changes from Automattic/jetpack#16095 to Automattic/jetpack#16133, so from now on all Earn features renames are covered as follow:

Since we have a proper feature flag in Calypso, we can leave the Calypso PRs separated.

Closing this out since we decided to hold off merging WP.com diffs.

Was this page helpful?
0 / 5 - 0 ratings