Currently when someone publishes their work, two messages are displayed and they both are almost the same.
Please describe the desired behavior.
One success message would suffice. And as both messages are saying the same thing, there is no point of displaying them both.
Watch this
I would like to may be work on this issue. Can you please tell me in which file do I have to make the concerned changes?
@AgyeyaMishra glad you're taking up this. Thanks :tada:
As I'm not sure what needs to be done here, I'm tagging @cesswairimu @sagarpreet-chadha @keshavsethi to help you out. :rocket:
Great! Thank you. Any kind of leads or help will be highly appreciated.
@AgyeyaMishra
the url is /post
the method that renders the flash messages is here https://github.com/publiclab/plots2/blob/main/app/controllers/application_controller.rb#L147-L166
and on this particular template is called here https://github.com/publiclab/plots2/blob/main/app/controllers/notes_controller.rb#L58
Let me know if you need anything else. Thanks
Hi @AgyeyaMishra. Are you still working on this issue? I would like to take this up if you are no longer working on this
Hi @urvashigupta7! Please go ahead. I am not working on this issue for the time being.
Hi I noticed that when we add a new question it is redirected to dashboard. Instead, it should be redirected to the newly added question I also observed that this behavior is due to this condition being evaluated as true. I want to confirm if node status- 0 is for spams? If this the case we can change the condition to @node.status==0 && !(logged_in_as(['admin', 'moderator'])) and then we just need to add this line flash[:first_time_post] = true
here so that flash message does not get displayed twice
@jywarren Can you please give your views on my last comment?
Hi! I think this sounds right - thank you @urvashigupta7 and we'd love a fix for this! Perhaps you'd like to make a first-timers-only issue from it? Just be aware that a test may fail if we change the behavior, and that it may have to be adjusted as well.
Thank you!!!
Sure @jywarren Will do that 馃槃
Hi @jywarren . I was trying to check if the changes suggested above produces any test failure. I have not made any change yet but tests are failing when I try to run them locally using rails test command. Am I doing something wrong??
Now i know this line is to ensure that if a user is not author of the post or a moderator or admin, they cannot see a moderated post.
@jywarren I have created new first-timer-issue. Please take a look. Thanks !! :smile:
FTO https://github.com/publiclab/plots2/issues/8595 thanks for converting this to a fto @urvashigupta7 . Closing this. Thanks everyone :+1:
Most helpful comment
@AgyeyaMishra
the url is
/post
the method that renders the flash messages is here https://github.com/publiclab/plots2/blob/main/app/controllers/application_controller.rb#L147-L166and on this particular template is called here https://github.com/publiclab/plots2/blob/main/app/controllers/notes_controller.rb#L58
Let me know if you need anything else. Thanks