[frontend] Enable AI button on media pressure article (#1128)
Proposed changes
- Remove limit for showing ask AI button
- Add limit to generate media
Related issues
- https://github.com/OpenBAS-Platform/openbas/issues/1128
Checklist
- [x] I consider the submitted work as finished
- [ ] I tested the code for its functionality
- [ ] I wrote test cases for the relevant uses case
- [ ] I added/update the relevant documentation (either on github or on notion)
- [x] Where necessary I refactored code to improve the overall quality
Further comments
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 25.87%. Comparing base (
7ac0d54) to head (8d80389).
Additional details and impacted files
@@ Coverage Diff @@
## master #1175 +/- ##
=========================================
Coverage 25.87% 25.87%
Complexity 1083 1083
=========================================
Files 486 486
Lines 11940 11940
Branches 650 650
=========================================
Hits 3089 3089
Misses 8761 8761
Partials 90 90
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This does fix the issue but I noticed several others (not linked to your code) that might need to be fixed at the same time :
- If I try to change tone without opening another popover before, the Generate button is always greyed out.
- The cancel button of the generate an article is not working at all.
- If I start generate something and then generate something else really quickly, the 2 calls collide and fight for the ownership of the paragraph input. @jborozco Should we fix this before shipping the smaller fix ?
Hi @Dimfacion @savacano28 Yes we should fix these 2 before shipping, otherwise the inconsistency might confuse the user.
- If I try to change tone without opening another popover before, the Generate button is always greyed out.
- The cancel button of the generate an article is not working at all.
The last one about prompt colliding is nice to have if it is easy to fix but otherwise we can skip it and open another ticket for it.
Hi! I made the changes.
For me, apart from the two three comments, the bug is fixed.