You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@answer.apache.org by "Dinesht04 (via GitHub)" <gi...@apache.org> on 2025/10/10 21:22:40 UTC

[PR] feat(internal,ui): add minimum tags property [answer]

Dinesht04 opened a new pull request, #1402:
URL: https://github.com/apache/answer/pull/1402

   fix: #1177 
   
   The video showing working fix:
   https://github.com/user-attachments/assets/f1130a77-4fcc-4381-a1a9-825c7ae21397
   
   hey @fenbox , sorry for bothering you but could you please review this PR and guide or point me towards the resources for the process of adding the correct labels for the backend errors and their respective  front-end labels since I cannot figure it out. 
   I tried adding 
   `    
     minimum_count:
           other: Not enough tags were entered.
   ` 
   in tag errors in en_US.yaml
   
   and
   `	TagMinCount                      = "error.tag.minimum_count"
   `
   in Reason.go and passed it as the error in case of  tags less than minimum tags count and it resulted in this 
   <img width="421" height="143" alt="image" src="https://github.com/user-attachments/assets/0e8dfcaa-f8d9-4a2e-94c5-f9eb879a0746" />
   
   I am unable to figure out where to add the labels for the error such that the translation library picks it . I tried to decode from other values but couldn't find anything.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3405808622

   I tested the previous issue and confirmed it has indeed been resolved.
   
   > I think a good addition could be sending an error to the front-end clearly stating that the tags were not updated due to less than minimum number of tags, or maybe implementing this error and check in the front-end for better UX.
   > 
   
   @Dinesht04 You're absolutely right—it would be better if users could receive error messages.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "fenbox (via GitHub)" <gi...@apache.org>.
fenbox commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3436177614

   It may be necessary to set a minimum number to avoid entering negative values.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "Dinesht04 (via GitHub)" <gi...@apache.org>.
Dinesht04 commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3408511187

   I have added the above discussed error. 
   
   The below video tests creating and editing post's tags for the following cases:-
   1) minimum tags = 0
   2) minimum tags = 1
   3) minimum tags = 3
   
   
   https://github.com/user-attachments/assets/db16239e-c6d4-4d25-b73c-9736568bf1ac
   
   I think this includes all the possible test cases and interactions related to this feature. Please review it @shuashuai @LinkinStars 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "Dinesht04 (via GitHub)" <gi...@apache.org>.
Dinesht04 commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3436714920

   @fenbox thank you for pointing this out, my bad for missing these test cases. Will open a new pull request for setting the minimum tag's lower limit to 0 and upper limit to 5.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3408868421

   The feature is complete. Thank you very much for your contribution.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "LinkinStars (via GitHub)" <gi...@apache.org>.
LinkinStars commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3400893506

   During testing, I encountered a issue. When setting `min_tags = 0`, it is not possible to clear all tags for a question while editing it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "Dinesht04 (via GitHub)" <gi...@apache.org>.
Dinesht04 commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3402837204

   Thank you @shuashuai for pointing it out. I have added the correct labels in case of 0, 1 or more than 1 tags.
   
   Thank you @LinkinStars for reporting the issue. I have fixed the logic in ObjectChangeTag function to check against the minimumTags instead of zero in order to escape the function. 
   
   Since earlier at least 1 minimum tag was required, the behavior was to exit the function if 0 tags were sent in the update request, ie, all the tags were removed while editing. In the latest commit the function is changed to check against the minimum tags and exit if the tags sent in the request are less than the minimum number of tags. 
   
   I think a good addition could be sending an error to the front-end clearly stating that the tags were not updated due to less than minimum number of tags, or maybe implementing this error and check in the front-end for better UX.
   
   But since no error was sent/shown in the previous implementation, the code in the latest commit just exits the function like before.
   
   Any feedback regarding this would be very welcome.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai commented on PR #1402:
URL: https://github.com/apache/answer/pull/1402#issuecomment-3399852243

   I checked the changes in the UI directory and the logic is fine.
   
   But on the writing page, the prompts under Tags need to be modified.
   <img width="1187" height="315" alt="image" src="https://github.com/user-attachments/assets/0b3294d8-9109-410b-8eea-a6072fce5786" />
   
   When the number of labels is greater than 0, pass in the corresponding number here.
   
   eg: Describe what your content is about, at least {{ min_tags_number }} tag is required.
   
   When the number of labels is less than or equal to 0
   
   eg:  Describe what your content is about.
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org


Re: [PR] feat(internal,ui): add optional tags [answer]

Posted by "shuashuai (via GitHub)" <gi...@apache.org>.
shuashuai merged PR #1402:
URL: https://github.com/apache/answer/pull/1402


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@answer.apache.org
For additional commands, e-mail: issues-help@answer.apache.org