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

Closes #2884 Upgrade plan link in admin bar #899

Merged
merged 21 commits into from
Oct 10, 2024

Conversation

remyperona
Copy link
Contributor

@remyperona remyperona commented Sep 25, 2024

Description

Fixes #2884

Add an upgrade plan link in the admin bar for free users with quota < 20%

Type of change

  • Enhancement (non-breaking change which improves an existing functionality).

Detailed scenario

  • Free account with more than 20% quota remaining
  • Display the imagify admin bar sub-menu
  • Upgrade plan link is displayed
  • Clicking on link opens the subscription popup

upgrade-plan

Technical description

Documentation

Display the button if free user and quota > 20%

Mandatory Checklist

Code validation

  • I validated all the Acceptance Criteria. If possible, provide screenshots or videos.
  • I triggered all changed lines of code at least once without new errors/warnings/notices.

Code style

  • I wrote a self-explanatory code about what it does.
  • I protected entry points against unexpected inputs.
  • I did not introduce unnecessary complexity.

@remyperona remyperona self-assigned this Sep 25, 2024
@remyperona remyperona added this to the 2.2.3 milestone Sep 25, 2024
@remyperona remyperona requested a review from a team September 25, 2024 18:55
@Mai-Saad
Copy link

Mai-Saad commented Sep 30, 2024

@Tabrisrp Thanks for the PR.

  • currently, the upgrade plan link is displayed when the remaining quota for the starter (free) user is <= 20% ==> It shall be displayed when the free account has a remaining quota > 20%. Can you please check? 🙏 (confirmed with @marija-nikolic )
    starter 20remaining

  • if we click the upgrade link, we will have an empty loading popup. can you please check 🙏 or let us know if anything needs to be done so popup data is displayed
    emptyPopUp

@marija-nikolic
Copy link
Collaborator

I've noticed there is a mistake here. If we have a pink banner displayed, we don't need a green "Upgrade plan" button.
You have details on this Notion page

image

I've just discussed it with Mai.

@remyperona remyperona requested a review from a team September 30, 2024 16:43
@marija-nikolic
Copy link
Collaborator

@Tabrisrp @Mai-Saad Did we fix this issue here with having both upgrade options (green and pink)?

@Mai-Saad
Copy link

Mai-Saad commented Oct 7, 2024

@Tabrisrp @Mai-Saad Did we fix this issue here with having both upgrade options (green and pink)?

Yes can see it fixed now
Screenshot from 2024-10-07 13-38-57

  • upgrade link
    Screenshot from 2024-10-08 09-28-24

  • popup after clicking link still keeps loading with me, @Tabrisrp can you please add screenshot of popup
    Screenshot from 2024-10-08 09-27-51

Copy link
Contributor

@wordpressfan wordpressfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to build the minified assets here?
We tried this PR in our test site and when SCRIPT_DEBUG equals false we see:

Screenshot from 2024-10-08 10-37-23

and once we set it to true, we see:

Screenshot from 2024-10-08 10-37-45

That's why I think we need to build assets.

@remyperona
Copy link
Contributor Author

Updated the JS min file that was missing

@Mai-Saad
Copy link

  • upgrade style is good now while script_debug is false
    Screenshot from 2024-10-10 15-46-02
    Screenshot from 2024-10-10 15-45-46

Screenshot from 2024-10-10 15-46-25

  • The banner is displayed when click upgrade (the new banner is in another PR as per @Tabrisrp )
    Screenshot from 2024-10-10 15-48-40

@remyperona remyperona added this pull request to the merge queue Oct 10, 2024
Merged via the queue into develop with commit feb9774 Oct 10, 2024
6 checks passed
@remyperona remyperona deleted the enhancement/2884-upgrade-link-toolbar branch October 10, 2024 17:57
@remyperona remyperona mentioned this pull request Oct 11, 2024
6 tasks
@wordpressfan wordpressfan mentioned this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants