Closed wang-li closed 8 months ago
Wow, great!
A few thoughts:
The icons draw a lot of attention but they will be used very rarely. In my opinion it would be better to hide them behind a more discrete button. This way power users will still find them, but they won't distract users the rest of the time.
To make it more future-proof and usable outside of the app we could add metadata to each tick/project
Example: { id: 80, name: "La Marie-Rose", grade: "6a", area: "Cuvier" }
instead of just 80
I think we should also add the timestamp when the tick/project was created (people may like to know when they ticked a given problem). And maybe also use this timestamp when doing the import
Should we also add bleau_info_id
when it exists? it may be useful if some people want to create a script
We could add a dialog to make it clear to the user that the import only works with json files generated by the Boolder app. Otherwise they may not understand what file to upload, and may think that they can import from external sources like bleau info
Voulez-vous tout remplacer ou fusionner l'import
=> this sentence is not super clear
Also, do you think we should confirm the choice of the user to avoid mistaps? It would be a shame for someone to lose their data because they tapped on the wrong button.
Other solution: always use the "fusionner" approach, and add a "delete all ticks/projects" in a separate button.
I changed the way the export and import actions are displayed, they are now in an overflow menu:
About the export file, I would prefer to keep it as simple as it can be, as we do not have any big needs regarding the addition of meta data or other information. The primary goal is to make sure the users can avoid losing their ticks and projects.
Other solution: always use the "fusionner" approach, and add a "delete all ticks/projects" in a separate button.
I am not sure to really grasp what you meant, as there are already two distinct buttons for the two possibilities 🤔
Voulez-vous tout remplacer ou fusionner l'import => this sentence is not super clear
I tried to find a concise prompt, but maybe you have a better formulation?
what happens if the json file has invalid structure/data? does it crash?
An error dialog will be displayed when the JSON file structure is incorrect, like shown in the screenshot below Also, the file picker is configured to only allow selection of JSON files.
what happens if one of the ticks/projects id doesn't exist in the database? does it crash?
The tick/project will be added in the user's database, but the already existing behavior is that it will not be displayed in the tick list screen if there is no matching problem in the Boolder database.
I changed the way the export and import actions are displayed, they are now in an overflow menu:
👍
About the export file, I would prefer to keep it as simple as it can be, as we do not have any big needs regarding the addition of meta data or other information. The primary goal is to make sure the users can avoid losing their ticks and projects.
ok but I think we should at least wrap the id into an object to make it more future-proof
{
"ticks": [ { "id": 80}, { "id": 594}, { "id": 47} ],
"projects": [ { "id": 137}, { "id": 230} ]
}
I am not sure to really grasp what you meant, as there are already two distinct buttons for the two possibilities
Forget what I said, it's not that important :)
I tried to find a concise prompt, but maybe you have a better formulation?
something like "Voulez-vous conserver ou supprimer votre liste actuelle ?" with 2 buttons "conserver" and "supprimer" there should be some sort of confirmation when user taps on "supprimer"
An error dialog will be displayed when the JSON file structure is incorrect, like shown in the screenshot below Also, the file picker is configured to only allow selection of JSON files
👍
The tick/project will be added in the user's database, but the already existing behavior is that it will not be displayed in the tick list screen if there is no matching problem in the Boolder database.
👍
I'm leaving for Japan for 3 weeks so I won't be able to comment further But you have the green light on my side to ship this feature 🚀
Alright, I have added the "id"
key in the JSON structure of the export as well as a confirmation when choosing an overwriting import 👍
With the current implementation of the tick list, a user could lose all its ticks and projects when uninstalling the app or changing a device. Waiting for the Boolder accounts to be implemented, exportation and importation features were needed.
The following screen recording demonstrates an exportation of the ticks to Google Drive:
https://github.com/boolder-org/boolder-android/assets/8343416/7562cfa2-d963-4c35-b8ee-64b4b10923d1
And this one, the importation of the ticks from Google Drive:
https://github.com/boolder-org/boolder-android/assets/8343416/5388a778-eded-443a-8e04-2c4a5a44bc0f
Of course, the exportation can be also done with Gmail, and any JSON file can be selected for the importation (not only from Google Drive).
The JSON format is the following:
Resolves #89