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

5560 Hide community spotlight setting if not enabled #5562

Merged
merged 1 commit into from Jan 21, 2015

Conversation

@sjain1107
Copy link
Contributor

commented Jan 16, 2015

No description provided.

@@ -7,5 +7,6 @@
%br
%br
= t('.try_adding_some_more_contacts')
!= t('.or_spotlight', :link => link_to(t(".community_spotlight") , community_spotlight_path))
- if current_user.show_community_spotlight_in_stream?

This comment has been minimized.

Copy link
@Flaburgan

Flaburgan Jan 16, 2015

Member

This is not the good condition, we want to hide this message if the podmin didn't activate community spotlight in diaspora.yml. Besides, #5560 is about the setting in the user panel, not this message, but you are right, both have to be hidden.

@svbergerem

This comment has been minimized.

Copy link
Member

commented Jan 16, 2015

You are now hiding the information that one could also add contacts from the community spotlight if someone doesn't want to see the community spotlight in its stream? I don't think that was the behavior #5560 was referring to.

This message and the setting itself should be hidden if the community spotlight is disabled for the whole pod. (See https://github.com/diaspora/diaspora/blob/develop/app/views/contacts/_sidebar.html.haml#L4)

@Flaburgan

This comment has been minimized.

Copy link
Member

commented Jan 16, 2015

@svbergerem I was first! :p

@svbergerem

This comment has been minimized.

Copy link
Member

commented Jan 16, 2015

@sjain1107 Btw. it is great to see you contributing again. :)

@sjain1107

This comment has been minimized.

Copy link
Contributor Author

commented Jan 16, 2015

Thanks :)

@sjain1107

This comment has been minimized.

Copy link
Contributor Author

commented Jan 16, 2015

Question: Where are the settings and how to enable or disable community spotlight for the whole pod?

@svbergerem

This comment has been minimized.

Copy link
Member

commented Jan 16, 2015

Settings:
https://github.com/diaspora/diaspora/blob/develop/app/views/users/edit.html.haml#L88
(header dropdown -> settings -> stream settings)

Enable/Disable the community spotlight for the pod:
https://github.com/diaspora/diaspora/blob/develop/config/diaspora.yml.example#L430

@Flaburgan

This comment has been minimized.

Copy link
Member

commented Jan 16, 2015

So the test you want to write is - if AppConfig.settings.community_spotlight.enable?

@goobertron

This comment has been minimized.

Copy link

commented Jan 16, 2015

Wow, that was quick! Thanks for your PR, Sakshi, and it's good to see you contributing again.

@sjain1107

This comment has been minimized.

Copy link
Contributor Author

commented Jan 19, 2015

@svbergerem @Flaburgan @goobertron Thanks! Will look into it.

@sjain1107 sjain1107 force-pushed the sjain1107:5560-Hide-community-spotlight branch from 9a5fcba to 327edca Jan 19, 2015

@jhass

This comment has been minimized.

Copy link
Member

commented Jan 19, 2015

Two simple controller tests that assert the checkbox is included in the response or not depending on the setting would be nice :)

@sjain1107 sjain1107 force-pushed the sjain1107:5560-Hide-community-spotlight branch from 327edca to 8b1f045 Jan 20, 2015

@sjain1107

This comment has been minimized.

Copy link
Contributor Author

commented Jan 21, 2015

@jhass Added tests. Please review. :)

@jhass jhass added this to the next-major milestone Jan 21, 2015

@jhass jhass merged commit 8b1f045 into diaspora:develop Jan 21, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details
jhass added a commit that referenced this pull request Jan 21, 2015
Merge pull request #5562 from sjain1107/5560-Hide-community-spotlight
5560 Hide community spotlight setting if not enabled
@jhass

This comment has been minimized.

Copy link
Member

commented Jan 21, 2015

Great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.