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

Add admin config to always show manually selected users on "Suggested people to follow" list #10917

Merged

Conversation

sidemt
Copy link
Contributor

@sidemt sidemt commented Oct 18, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

  • Added a config to allow admins to choose to always show "Suggested users" instead of system-generated suggestions in "Suggested people to follow" screen.

I also made some related fixes:

  • Fixed some missing whitespace in the description of "Suggested users" input field
  • Refactored some tests related to "Suggested users" and this change to resolve the linting errors I encountered

Related Tickets & Documents

Closes #9367

QA Instructions, Screenshots, Recordings

http://localhost:3000/admin/config > Under "All Site Configuration" > Onboarding

  • I added a checkbox
    issue_9367

  • I don't know if there is an easy way to see the onboarding process again but if you visit http://localhost:3000/users?state=follow_suggestions you can see the list of users in JSON format. You can validate that the list changes according to this config.

Added tests?

  • yes
  • no, because they aren't needed
  • no, because I need help

Added to documentation?

  • docs.forem.com
  • readme
  • no documentation needed

@pr-triage pr-triage bot added the PR: unreviewed bot applied label for PR's with no review label Oct 18, 2020
@benhalpern
Copy link
Contributor

benhalpern commented Oct 18, 2020

I like the naming. "Prefer x" is a good type of config language we can integrate more. 👍

Copy link
Contributor

@vaidehijoshi vaidehijoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @sidemt! Thanks so very much for taking this issue on and submitting this PR 😸

I left a couple of comments and suggestions for you, let me know what you think!

app/controllers/users_controller.rb Outdated Show resolved Hide resolved
app/controllers/users_controller.rb Outdated Show resolved Hide resolved
app/lib/constants/site_config.rb Outdated Show resolved Hide resolved
app/views/admin/configs/show.html.erb Outdated Show resolved Hide resolved
spec/requests/user/user_suggestions_spec.rb Show resolved Hide resolved
sidemt and others added 4 commits October 28, 2020 07:36
Improve the wording of the description of prefer_manual_suggested_users

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
@sidemt
Copy link
Contributor Author

sidemt commented Oct 28, 2020

@vaidehijoshi @lisasy Thanks for the review! I made changes according to your comments so could you please check again?

Copy link
Contributor

@lisasy lisasy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@pr-triage pr-triage bot added PR: partially-approved bot applied label for PR's where a single reviewer approves changes and removed PR: unreviewed bot applied label for PR's with no review labels Oct 28, 2020
Copy link
Contributor

@vaidehijoshi vaidehijoshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making the updates to this PR! I've restarted the build for you, and once it passes, we should be able to get this merged :)

@vaidehijoshi vaidehijoshi merged commit fc22e2c into forem:master Oct 28, 2020
@pr-triage pr-triage bot added PR: merged bot applied label for PR's that are merged and removed PR: partially-approved bot applied label for PR's where a single reviewer approves changes labels Oct 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged bot applied label for PR's that are merged
Projects
None yet
5 participants