Show renewal alert 3 months prior to expiration of community program subscriptions
Community program subscriptions can be renewed 3 months prior to expiration.
it makes sense to show it 3 months before expiration, and we can reuse the same copy from the alert in CustomersDot (that directly them to reapply).
Created from #3
from this note.
Proposed solution
- We should show the expiry alert banner 3 months prior to expiration on Billing page in Gitlab.com similar to Customers Portal
- We can re-use the same copy we show in Customers Portal for the alert in Gitlab.com
Your GitLab for Education Program subscription (A-S00200341) is up for renewal
Before you can renew your subscription, you'll need to fill out the application and be verified by our system.
Implementation plan
We're going to convert the existing HAML banner to be a Vue component so we don't block the page load while we get the information needed to show this banner for various use cases. This would also resolve GitLab downtime when we get unexpected errors from Customers Portal and will be easier to extend this banner for other use cases in the future.
- This means we need to access all the necessary information from the front end. Most of it (
subscribable.block_changes?
,subscribable.expired?
,subscribable.expires_at
,renew_subscription_path
,upgrade_subscription_path
) already exists in the helpers in GitLab project but we need to make them accessible from the frontend through the API - we need to verify if some of it already exists in the GraphQL endpoint and add missing fields to the appropriate GraphQL types. There is also some logic around subscription/license which needs to be preserved. Issue for API changes - API changes to convert HAML renewal banner to V... (#371585) - For banner copy, see message here to figure out the necessary API changes
Do the community program alerts need all the logic in that class? I'd be tempted to try copy the parts we need into the frontend so we don't have to send the message via the API but if there's a lot of logic we need to replicate then I think you're right that we can leave that refactor for later
- Exposing
enable_renew_from
field is already done in Customers Portal.
This would need some testing effort to make sure the banner behaves as expected where applicable as before.
More details on implementation proposal in this thread.