Skip to content
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

Simplify the questions page #4413

Closed
SidharthBansal opened this issue Dec 26, 2018 · 36 comments
Closed

Simplify the questions page #4413

SidharthBansal opened this issue Dec 26, 2018 · 36 comments
Assignees
Labels
design issue requires more design work and discussion (i.e. mockups and sketches) gsoc in progress rgsoc Rails Girls Summer of Code

Comments

@SidharthBansal
Copy link
Member

As per @jywarren's suggestion, we want to change the design to
image
See publiclab.org/questions/
app/views/questions/show.html.erb
Refer #4255 (comment)
Related to #4159.

@SidharthBansal SidharthBansal added the design issue requires more design work and discussion (i.e. mockups and sketches) label Dec 26, 2018
@SidharthBansal SidharthBansal added this to the OAuth milestone Dec 26, 2018
@SidharthBansal
Copy link
Member Author

Refer #4255 for discussion.

@IshaGupta18
Copy link
Collaborator

Hey, I could help in this one!

@SidharthBansal
Copy link
Member Author

Great

@IshaGupta18
Copy link
Collaborator

Could you please elaborate more on this? I have read the discussion at #4255 but could you tell me exactly what is to be linked with what? Thank you very much and I am so sorry if I bother you too much

@SidharthBansal
Copy link
Member Author

You can check the current design at pl. We have different buttons. Now we want to club them together as shown in the design given above.
Flag post to moderator will be linked to opening of Mozilla Thunderbird etc... For email purpose
Spam post will be linked as the current spam button is linked.
Become a moderator and other button, I need to search them in the codebase and tell you

@SidharthBansal
Copy link
Member Author

Also please see that some buttons will be only viewed to the admin or moderator while other buttons will be viewed by non admins and non moderators only.
So,we will be looking for if-else condition for this.
Thanks

@SidharthBansal
Copy link
Member Author

For the other two buttons let's ask @jywarren. I think become a moderator should open up email to moderation@publiclab.org .

@IshaGupta18
Copy link
Collaborator

Absolutely, so if I have got this right, this is what needs to be done:

  1. On clicking the flag button now, a popover will be displayed, that popover will contain:
    Flag post to moderators, Spam post, Spam post and ban user for admins/moderators
    Flag post to moderators, become a moderator for non admin/non moderators

  2. Flag post to moderators will be linked to Mozilla Thunderbird etc. for email purposes
    Spam post will be linked to the link which is accessible to admin/moderator currently

We'll be waiting for @jywarren for the remaining 2 buttons.

Have I got it right?

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Dec 27, 2018 via email

@IshaGupta18
Copy link
Collaborator

Yes I agree, it would be wise to wait for @jywarren to get the correct idea about the functionality. I hope he is having an amazing time :D
When a user, be it moderator or normal, asks a question for the first time, moderator has to mark it approved or spam.
For the next time onwards, the question is posted. On clicking th flag button, the setup for mail account is shown for now. I think once its set up, the original functionality will be displayed.

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Dec 27, 2018 via email

@IshaGupta18
Copy link
Collaborator

Any updates here @SidharthBansal ?

@SidharthBansal
Copy link
Member Author

Most of the mentors are on vacations for celebrating the new year. As soon as they will arrive they will respond. We need to wait till 3-4 January I guess at least for this.
You can work on other issues in the meantime. I am there to help you on them.

@IshaGupta18
Copy link
Collaborator

Yes, I thought so too. Thank you so much for your help, I'll see what all I can help on in the meanwhile. I hope our mentors have an amazing vacation!

@oorjitchowdhary
Copy link
Member

What if we add an if-else for the icons only..
So we could do 'if user' -> fa fa-flag and open email
'if moderator' -> fa fa-spam and the spam function

This working is right now on /comments

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Dec 31, 2018 via email

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Dec 31, 2018 via email

@IshaGupta18
Copy link
Collaborator

yes @oorjitchowdhary we expect it only, thanks a lot!

@jywarren
Copy link
Member

jywarren commented Jan 2, 2019 via email

@IshaGupta18
Copy link
Collaborator

Absolutely, so if I have got this right, this is what needs to be done:

  1. On clicking the flag button now, a popover will be displayed, that popover will contain:
    Flag post to moderators, Spam post, Spam post and ban user for admins/moderators
    Flag post to moderators, become a moderator for non admin/non moderators
  2. Flag post to moderators will be linked to Mozilla Thunderbird etc. for email purposes
    Spam post will be linked to the link which is accessible to admin/moderator currently

We'll be waiting for @jywarren for the remaining 2 buttons.

Have I got it right?

Okay so @jywarren @SidharthBansal should I start with this for now?

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Jan 3, 2019 via email

@IshaGupta18
Copy link
Collaborator

Should I leave 'Spam post and ban user' for a follow-up like @jywarren said? Also, I am thinking of linking 'become a moderator' to /moderators as said in #4255 . Is this all fine? Thanks a lot!

@IshaGupta18
Copy link
Collaborator

Hey @SidharthBansal I think I have completed most of this issue, but the part where I am getting stuck is, I am not able to render the partial I have created for the buttons as data-content of a bootstrap popover. I have tried several different ways, even from our codebase, but there seems to be some bug in rendering it, could you help me out here with this? Thanks a lot!

@IshaGupta18
Copy link
Collaborator

Also, I am not able to find the route for this page https://publiclab.org/wiki/moderation in routes.rb, what should I link "become a moderator" to in the meanwhile?

@ebarry
Copy link
Member

ebarry commented Jan 3, 2019

Possibly, the link "become a moderator" should go to "mailto:moderators@publiclab.org"?

@IshaGupta18
Copy link
Collaborator

Isn't "flag post to moderators" linked to the same?

@jywarren
Copy link
Member

jywarren commented Jan 3, 2019 via email

@IshaGupta18
Copy link
Collaborator

Okay @jywarren ! Thank you sir!

@IshaGupta18
Copy link
Collaborator

Okay @SidharthBansal @jywarren , so here's what I have implemented:

For moderators/admins:

image

Flag post to moderators is linked to email.
Spam post is linked to "/moderate/spam/<%= node.id %>", which was originally a separate 'Spam' button.

For users (when signed in):

image

Flag post to moderators is linked to email.
Become a moderator is linked to /moderators which is available in production as /wiki/moderation

For users (when they aren't logged in):

The flag button would simply show up the login modal, as there is no meaning to display the options which require the user to login.

image

Please have a look at it and please let me know if any changes are required.

(PS: I have made a partial, as suggested, for rendering the content inside the popover)

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Jan 3, 2019 via email

IshaGupta18 added a commit to IshaGupta18/plots2 that referenced this issue Jan 3, 2019
@IshaGupta18
Copy link
Collaborator

#4511 is the link to my PR. I am waiting for approval, do let me know what else I can do! Thanks a ton!

@SidharthBansal
Copy link
Member Author

@IshaGupta18 just checking, have you linked the login modals to all the new buttons created in the pr. I commented here because I don't want to diverge the nice conversation going on between you and Jeff.
Thanks

@SidharthBansal
Copy link
Member Author

@IshaGupta18 ?

@IshaGupta18
Copy link
Collaborator

I am so so sorry, I don't know how I didn't receive this mail and it's been five days.

@IshaGupta18
Copy link
Collaborator

Yes I have linked the login modal to the flag button when the user is not signed in, I think that was what I was supposed to do. The modal will be shown to the user if he's not logged in and clicks on the flag button and consequently the popover won't be displayed. Once again I am very sorry for missing out on the mail.

@SidharthBansal
Copy link
Member Author

SidharthBansal commented Jan 11, 2019 via email

@SidharthBansal SidharthBansal added rgsoc Rails Girls Summer of Code gsoc labels Jan 11, 2019
jywarren pushed a commit that referenced this issue Feb 1, 2019
* Fixes #4413 Simplify the questions page

* Updating the test file

* Updating test 2

* Updating test 3

* Updating test 4

* Attempting @response.match fix

* Fixing indentation

* Fixing indentation again

* Update home_controller_test.rb

* Refactoring flag_list partial code and changing test in home controller

* Update home_controller_test.rb

* Update home_controller_test.rb

* Adding assert_equal in test

* Update home_controller_test.rb
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this issue May 5, 2019
* Fixes publiclab#4413 Simplify the questions page

* Updating the test file

* Updating test 2

* Updating test 3

* Updating test 4

* Attempting @response.match fix

* Fixing indentation

* Fixing indentation again

* Update home_controller_test.rb

* Refactoring flag_list partial code and changing test in home controller

* Update home_controller_test.rb

* Update home_controller_test.rb

* Adding assert_equal in test

* Update home_controller_test.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design issue requires more design work and discussion (i.e. mockups and sketches) gsoc in progress rgsoc Rails Girls Summer of Code
Projects
None yet
Development

No branches or pull requests

5 participants