Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add-Ons: Refactor data-layer – Billing Transactions #87529

Closed
2 tasks
Tracked by #81374
chriskmnds opened this issue Feb 16, 2024 · 1 comment · Fixed by #87985
Closed
2 tasks
Tracked by #81374

Add-Ons: Refactor data-layer – Billing Transactions #87529

chriskmnds opened this issue Feb 16, 2024 · 1 comment · Fixed by #87985

Comments

@chriskmnds
Copy link
Contributor

chriskmnds commented Feb 16, 2024

Details

Billing Transactions state used in add-ons will need to surface into data-stores (or be passed in as a prop) as part of pau2Xa-59h-p2

Billing transactions are used for finding purchased space upgrades. I am not sure if this needs a refactor of its own (whether something we can retrieve through the site or user purchases or keep using the transaction/billing log for it).

I think the simplest to unblock the NPM migration is to actually pass either useSpaceUpgradesPurchased as a helper or an object spaceUpgradesPurchased into the grid. The alternative (to migrate the Billing state to data stores) feels like a humongous effort - there is also I think UI state for the billing transaction filters being used in add-ons that's not readily portable.

We need to decide on the best course of action with some reflection i.e. this will need to reach the usePricingMetaForGridPlans hook, which is used at various places, not only in the plans-grid-next package. Having a self-contained hook (that queries billing transactions) is easier reusable & portable (otherwise we may need to feed these extra layers on every call for consistent values).

Related exploratory (parent) PR: #85465
Related GH issue: #81374

Checklist

Related

#81374

@chriskmnds
Copy link
Contributor Author

A related issue that's incredibly relevant here: #86147
should be addressed while working out this refactor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment