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

Multi Tiers upgrade new structure - part 1 - Business logic and API #7176

Closed
wordpressfan opened this issue Dec 10, 2024 · 5 comments · Fixed by #7178
Closed

Multi Tiers upgrade new structure - part 1 - Business logic and API #7176

wordpressfan opened this issue Dec 10, 2024 · 5 comments · Fixed by #7178
Assignees
Labels
effort: [S] 1-2 days of estimated development time
Milestone

Comments

@wordpressfan
Copy link
Contributor

wordpressfan commented Dec 10, 2024

Is your feature request related to a problem? Please describe.
Part of this issue: https://github.com/wp-media/wp-rocket.me/issues/4326 we need to depend on the API from our website backend to show the upgrade section with generic blocks so we have the full control from the backend.

Describe the solution you'd like
As discussed with service team, we have a semi-final API contract here:
https://github.com/wp-media/wp-rocket.me/blob/9acee8e8d432d960a0fca8465319f6cd85a00198/openapi.yaml#L496-L524

So we have upgrades property in user API endpoint, so we will use this and prepare the list of upgrades details considering the stack property => if true, we will show them in the UI as select dropdown menu, exactly like what we have in our website new pricing page:

Image

Here we need to agree on the data being passed to the UI view, I propose to have something like (the below example is for single license):

$choices = [
    'growth' => [
        'name' => 'Growth',
        'price' => '',
        'websites' => '',
        'upgrade_url' => '',
    ],
    'stacked' => [
        'multi10' => [
            'name' => 'Multi',
            'price' => '',
            'websites' => '',
            'upgrade_url' => '',
        ],
        'multi50' => [
            'name' => 'Multi',
            'price' => '',
            'websites' => '',
            'upgrade_url' => '',
        ],
        'multi100' => [
            'name' => 'Multi',
            'price' => '',
            'websites' => '',
            'upgrade_url' => '',
        ],
        'multi500' => [
            'name' => 'Multi',
            'price' => '',
            'websites' => '',
            'upgrade_url' => '',
        ],
    ]
];

We shouldn't have any static (hard-coded) values here.

Additional context
Slack discussion: https://wp-media.slack.com/archives/C0837DFAFEX/p1733383902203979

@remyperona
Copy link
Contributor

This is in grooming to review, but there isn't any grooming done?

@MathieuLamiot
Copy link
Contributor

@wordpressfan Can you update on this? Is there a grooming / the PR to review? Or is it grooming in progress? Or something else? Thanks

@wordpressfan
Copy link
Contributor Author

@remyperona @MathieuLamiot

I mentioned the technical details in the issue itself and to make it easier I already started the PR to show the approach we will take also added the effort.
I was thinking of directly start working on it and continue on the mentioned PR and see how it goes.
Let me know if you think that detailed grooming is needed in this case.

@wordpressfan wordpressfan self-assigned this Dec 13, 2024
@piotrbak piotrbak added this to the 3.17.4 milestone Dec 17, 2024
@Mai-Saad Mai-Saad assigned Mai-Saad and unassigned Mai-Saad Dec 17, 2024
@Mai-Saad
Copy link
Contributor

Related initial test plan
https://wpmediaqa.testrail.io/index.php?/runs/view/941&group_by=cases:section_id&group_order=asc
(screenshots can be added to tests while execution)

@wordpressfan
Copy link
Contributor Author

I'll move this to Done, and we will do the QA on our main feature pull request here: #7197

@Mai-Saad Mai-Saad self-assigned this Dec 20, 2024
@wordpressfan wordpressfan mentioned this issue Dec 30, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort: [S] 1-2 days of estimated development time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants