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

New Monthly Contributors Error Dialog #640

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

VitorVieiraZ
Copy link

@VitorVieiraZ VitorVieiraZ commented Nov 11, 2024

Displays Monthly Contributos Error Dialog when creating a project or syncing in case of failure.

Resolves #643, Python-api-client update: MerginMaps/python-api-client#221

@VitorVieiraZ VitorVieiraZ force-pushed the enhancement/newProjectLimitHitDialog branch from 1f24f80 to b187b78 Compare November 12, 2024 20:41
@VitorVieiraZ VitorVieiraZ changed the title WIP - New Project Limit Hit Dialog New Project Limit Hit Dialog Nov 12, 2024
@VitorVieiraZ VitorVieiraZ self-assigned this Nov 13, 2024
@VitorVieiraZ VitorVieiraZ changed the title New Project Limit Hit Dialog New Monthly Contributors Error Dialog Nov 13, 2024
Copy link
Contributor

@ValentinBuira ValentinBuira left a comment

Choose a reason for hiding this comment

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

Just few things I am not quite sure to understand otherwise look good to me

I added few general tips feel free to ignore them and mark them as solved

Mergin/monthly_contributors_error_dialog.py Outdated Show resolved Hide resolved
Mergin/monthly_contributors_error_dialog.py Outdated Show resolved Hide resolved
Mergin/configuration_dialog.py Outdated Show resolved Hide resolved
Mergin/monthly_contributors_error_dialog.py Outdated Show resolved Hide resolved
Mergin/projects_manager.py Outdated Show resolved Hide resolved
Mergin/projects_manager.py Outdated Show resolved Hide resolved
Copy link
Contributor

@tomasMizera tomasMizera left a comment

Choose a reason for hiding this comment

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

Looking good on the plugin side, only some tiny comment. Feel free to squash and merge after addressing it!

Comment on lines +27 to +30
quota = self.server_response.get("contributors_quota", "#NA")
quota_text = (
f"You've reached the maximum number of active monthly contributors ({quota}) for your current subscription."
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Just some nit picking - this might seem more friendly for users in case we have issues reading the quota

Suggested change
quota = self.server_response.get("contributors_quota", "#NA")
quota_text = (
f"You've reached the maximum number of active monthly contributors ({quota}) for your current subscription."
)
quota = self.server_response.get("contributors_quota", None)
quota_text = (
f"You've reached the maximum number of active monthly contributors {'(' + quota + ')' if quota else ''} for your current subscription."
)

@tomasMizera
Copy link
Contributor

Let's just bear in mind that we need a new Python-api-client version when releasing this one!

@tomasMizera tomasMizera added the dependencies Pull requests that update a dependency file label Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show dialog when active contributors per month limit is hit [plugin + py-client]
3 participants