-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changed alert message on wiki creation #8452
changed alert message on wiki creation #8452
Conversation
@gauravano Could you please review ? |
Codecov Report
@@ Coverage Diff @@
## main #8452 +/- ##
=======================================
Coverage ? 79.67%
=======================================
Files ? 98
Lines ? 5947
Branches ? 0
=======================================
Hits ? 4738
Misses ? 1209
Partials ? 0 |
Hi @Hassanelashram, thank you for opening the PR. The current solution requires improvement. A new user can post to publiclab.org only if they have one approved node (question/research note). Now, there can be 2 cases:
Currently, we don't differentiate between the above 2 cases and show this message - Please post a question or other content before editing the wiki. Click here to learn why. Now, either we can start differentiating with an extra condition to check if there is any post in review for the current user which will make one more DB query or we can just append in the current message to say that Please post a question or other content before editing the wiki. Click here to learn why. If you have already posted a note then you would be able to edit the wiki as soon as your post get approved by moderators -- something like this :) @jywarren @cesswairimu what do you think would be better? |
I think differentiating the two and giving different flash messages would be ideal |
Sorry, just trying to retrigger the tests now that we've resolved an unrelated issue! |
I think this might need a rebase Travis still shows up after reopening |
c2be97d
to
792ba22
Compare
Rebased! |
@@ -193,7 +193,7 @@ def teardown | |||
id: 'chicago' | |||
} | |||
|
|||
assert_equal flash[:notice], "Please post a question or other content before editing the wiki. Click <a href='https://publiclab.org/notes/tester/04-23-2016/new-moderation-system-for-first-time-posters'>here</a> to learn why." | |||
assert_equal flash[:notice], "You can create the wiki once your research note/question is approved by moderators. Click <a href='https://publiclab.org/notes/tester/04-23-2016/new-moderation-system-for-first-time-posters'>here</a> to learn why." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So strange that this failed!? I don't understand -- we changed the test here too!
Progress: |=== FAIL WikiControllerTest#test_disallow_viewing_edit_wiki_page_for_first-timers (38.87s)
--- expected
+++ actual
@@ -1 +1 @@
-"Please post a question or other content before editing the wiki. Click <a href='https://publiclab.org/notes/tester/04-23-2016/new-moderation-system-for-first-time-posters'>here</a> to learn why."
+"You can create the wiki once your research note/question is approved by moderators. Click <a href='https://publiclab.org/notes/tester/04-23-2016/new-moderation-system-for-first-time-posters'>here</a> to learn why."
test/functional/wiki_controller_test.rb:196:in `block in <class:WikiControllerTest>'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha! Ok, we actually have to make the change twice in the controller. I'll make a suggestion!!!
OK, my apologies, there were a couple extra places to make the same change! I was able to add the extra changes and with luck this will now pass. Thank you for your patience!! |
Code Climate has analyzed commit 1f5a9e6 and detected 0 issues on this pull request. View more on Code Climate. |
Excellent, thank you so much!!! |
* changed alert message on wiki creation * Update wiki_controller.rb * Update _like.html.erb Co-authored-by: Jeffrey Warren <[email protected]>
* changed alert message on wiki creation * Update wiki_controller.rb * Update _like.html.erb Co-authored-by: Jeffrey Warren <[email protected]>
Fixes #4504
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test
@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!