Skip to content

Better dialog error when trying to create a project with an already existing name and the projects limit hit error.#601

Merged
ValentinBuira merged 16 commits intomasterfrom
better-dialog-error
Sep 25, 2024
Merged

Better dialog error when trying to create a project with an already existing name and the projects limit hit error.#601
ValentinBuira merged 16 commits intomasterfrom
better-dialog-error

Conversation

@ValentinBuira
Copy link
Copy Markdown
Contributor

@ValentinBuira ValentinBuira commented Jul 9, 2024

This PR improve the dialog error given to user when trying to create a project and sync project. Instead of giving a dump of the server error we display only the part that matter to the users

So far we handle

  • Project with an already existing name
  • projects limit hit error
  • Storage limit error
  • Another syncing process running

This PR also relies on another PR in the mergin python api client (see : MerginMaps/python-api-client/pull/209 )

resolve #599
resolve #561

Before:
Capture d’écran before


Capture d’écran before quota

After:
Screenshot from 2024-07-09 15-27-29

Screenshot from 2024-07-09 16-11-00

@ValentinBuira ValentinBuira requested a review from tomasMizera July 9, 2024 14:21
@ValentinBuira ValentinBuira changed the title Better dialog error Better dialog error when trying to create a project with an already existing name and the projects limit hit error. Jul 9, 2024
@ValentinBuira ValentinBuira marked this pull request as ready for review July 9, 2024 14:29
@ValentinBuira
Copy link
Copy Markdown
Contributor Author

For reviewer, I think it works fine by now but as we handle more and more case we will have a lot of duplicate code because the same error can happen in mutiple place : for exemple StorageLimitHit happen both in create_project and sync_project

I advice to make a more general framework to handle error dialog in the futur

@ValentinBuira ValentinBuira added this to the 2024.3 milestone Aug 27, 2024
Copy link
Copy Markdown
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.

Just some AI suggestions for the texts, otherwise it looks good 👍🏻

@alexd0793
Copy link
Copy Markdown

Testing all cases, looking good :)

@ValentinBuira ValentinBuira merged commit 9865c04 into master Sep 25, 2024
@ValentinBuira ValentinBuira deleted the better-dialog-error branch September 25, 2024 12:47
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.

Better dialog for error "project with the same name already exists" Better notification for already runing synchronization

3 participants