Mosquito-Alert / Mosquito-Alert-Mobile-App

http://www.mosquitoalert.com
4 stars 3 forks source link

Improve Settings -> Autotag #183

Closed DigitalSeneca closed 4 months ago

DigitalSeneca commented 4 months ago

fixes #134

autotag_orange

DigitalSeneca commented 4 months ago

@epou

  1. Do we have translation strings for 'Auto-tag reports' and ''Enter tag...'? (See GIF in the description)
  2. The API endpoint accepts the hashtag as a string, so I'm concatenating it into a string, ie ['tag1', 'tag2', 'tag3] -> 'tag1, tag2, tag3'. If you're changing the API endpoint let me know so that I can directly send the list instead
epou commented 4 months ago
  1. Do we have translation strings for 'Auto-tag reports' and ''Enter tag...'? (See GIF in the description) You can use the following string_ids:
  1. The API endpoint accepts the hashtag as a string, so I'm concatenating it into a string, ie ['tag1', 'tag2', 'tag3] -> 'tag1, tag2, tag3'. If you're changing the API endpoint let me know so that I can directly send the list instead

As far as I know, the current API should get the tags from the 'notes' field, and should be a text-like field. So then, the tags should be appended to the notes field automatically in the form of a text list where each element begins with a #. like: #tag1, #tag2, #tag3. In the case the user has added a note, it should be appended at the end, example: Here the user notes talking about whatever. #tag1, #tag2, #tag3 @aescobarr could you confirm that?

aescobarr commented 4 months ago
  1. The API endpoint accepts the hashtag as a string, so I'm concatenating it into a string, ie ['tag1', 'tag2', 'tag3] -> 'tag1, tag2, tag3'. If you're changing the API endpoint let me know so that I can directly send the list instead

As far as I know, the current API should get the tags from the 'notes' field, and should be a text-like field. So then, the tags should be appended to the notes field automatically in the form of a text list where each element begins with a #. like: #tag1, #tag2, #tag3. In the case the user has added a note, it should be appended at the end, example: Here the user notes talking about whatever. #tag1, #tag2, #tag3 @aescobarr could you confirm that?

Yes, that should be the case. The hashtags have to be somewhere inside the fields note, it does not matter where but at the end is nice and easily readable when looking at the database content. About separating multiple hashes with commas, it's also ok and looks nice, but it's not necessary either, spaces should be enough as long as the different hashes are different substrings inside the notes field.

The thing that's really important is that each hashtag starts with the '#' character. Never remove this when adding the tags at the end of the string, since if there is no '#' we can't distinguish between somebody using the word 'tag' in the notes and the hashtag '#tag'.

DigitalSeneca commented 4 months ago

Thank you for the explanation, I've implemented it: image

epou commented 4 months ago

Is there a way of making it foldable + adding counter? (see image in issue #134 )

DigitalSeneca commented 4 months ago

Is there a way of making it foldable + adding counter? (see image in issue #134 )

Yes, in the first version I made it work. Now I've just pushed this one where it's foldable. Only the counter is missing, which should need a similar implementation as the notification

new_autotag

epou commented 4 months ago

Nice! So then, only the counter is missing (only show if not 0). I was wondering if you could add the text enable_auto_hashtag_text when the section is unfolded. It's the description of what auto-tagging means.

DigitalSeneca commented 4 months ago

I've added the counter now too new_autotag_counter

I was wondering if you could add the text enable_auto_hashtag_text when the section is unfolded. It's the description of what auto-tagging means.

I just added this description too (only when unfolded). It makes the tile bigger but it's very descriptive: image

epou commented 4 months ago

@DigitalSeneca you've used the wrong string_id for the description, it should be enable_auto_hashtag_text

DigitalSeneca commented 4 months ago

sorry I took your string and then messed it up when getting the same font color from the background tracking