Repository: oppia/oppia

Issue:
For community-editable explorations, the first avatar in the exploration summary tile should be a globe.
Thanks to @maitbayev, the exploration summary tiles in the gallery currently show a list of contributors on the top-right. However, for community-editable explorations, it would probably be nicer to show a globe as the first 'contributor' instead, similar to what we do in the info card modal in the learner view. This indicates which explorations can be edited by the community, and still allows the list of contributors to be viewed on-hover.

For community-editable explorations, the first avatar in the exploration summary tile should be a globe.
Thanks to @maitbayev, the exploration summary tiles in the gallery currently show a list of contributors on the top-right. However, for community-editable explorations, it would probably be nicer to show a globe as the first 'contributor' instead, similar to what we do in the info card modal in the learner view. This indicates which explorations can be edited by the community, and still allows the list of contributors to be viewed on-hover.



Discussion:
@seanlip Hi, I'd like to take on this issue.
Just a quick confirmation, will the tooltip for the globe icon show "Community Editable" here as well, as in the case of the info_card_modal ?

Sounds good, thanks @526avijitgupta! I'll assign you. And yes, I agree with that tooltip.

@seanlip The code [here](https://github.com/oppia/oppia/blob/ef246db0c0e806f80f78f7702ddfef0776ac1bad/core/templates/dev/head/player/information_card_modal.html#L43-L46) clearly indicates that the globe icon is visible only when `contributorNames.length == 0`.

Also, in the issue's description above, you mentioned that globe should be set as the 'first' contributor, and the list of contributors is viewed on-hover.

But then how can there be a list of contributors if the exploration is community-editable ?

Hi @526avijitgupta, the list of contributors in the exploration summary tile is derived by figuring out who has actually contributed to the exploration in the past, from the list of commits (i.e., it's not the "owners" of the exploration). Does that clarify?

@seanlip Thanks.

Also, I have actually fixed the issue, but there's a small problem, the globe's color and the card's color don't seem to be getting along well:

![screenshot from 2016-03-03 03 56 33](https://cloud.githubusercontent.com/assets/7583815/13477819/2fb97f4e-e0f4-11e5-9d7b-f09ea2c1a437.png)

And so I implemented a white colored icon for the globe:
![screenshot from 2016-03-03 05 04 39](https://cloud.githubusercontent.com/assets/7583815/13479529/8b292682-e0fd-11e5-8734-55c23fa8e203.png)

Should the icon color be kept white or should it be changed to something else ?

Thanks, @526avijitgupta! I think it should be kept white, but, also, only in the community-editable case, I suggest removing the "+" from the "+1". This is both more semantically correct, and also avoids the white-on-white issue.

Hi @526avijitgupta, just to check: are you still planning to work on this? (I'm just going down the issues list and making sure we haven't got obsolete assignments.) Thanks!

@seanlip Sorry, I was busy in some university projects the past week. 
I'm definitely planning to work on this. I'll push the updated code to the existing branch soon !

OK, thanks for confirming!

@seanlip Hi, I'd like to take on this issue.
Just a quick confirmation, will the tooltip for the globe icon show "Community Editable" here as well, as in the case of the info_card_modal ?

Sounds good, thanks @526avijitgupta! I'll assign you. And yes, I agree with that tooltip.

@seanlip The code [here](https://github.com/oppia/oppia/blob/ef246db0c0e806f80f78f7702ddfef0776ac1bad/core/templates/dev/head/player/information_card_modal.html#L43-L46) clearly indicates that the globe icon is visible only when `contributorNames.length == 0`.

Also, in the issue's description above, you mentioned that globe should be set as the 'first' contributor, and the list of contributors is viewed on-hover.

But then how can there be a list of contributors if the exploration is community-editable ?

Hi @526avijitgupta, the list of contributors in the exploration summary tile is derived by figuring out who has actually contributed to the exploration in the past, from the list of commits (i.e., it's not the "owners" of the exploration). Does that clarify?

@seanlip Thanks.

Also, I have actually fixed the issue, but there's a small problem, the globe's color and the card's color don't seem to be getting along well:

![screenshot from 2016-03-03 03 56 33](https://cloud.githubusercontent.com/assets/7583815/13477819/2fb97f4e-e0f4-11e5-9d7b-f09ea2c1a437.png)

And so I implemented a white colored icon for the globe:
![screenshot from 2016-03-03 05 04 39](https://cloud.githubusercontent.com/assets/7583815/13479529/8b292682-e0fd-11e5-8734-55c23fa8e203.png)

Should the icon color be kept white or should it be changed to something else ?

Thanks, @526avijitgupta! I think it should be kept white, but, also, only in the community-editable case, I suggest removing the "+" from the "+1". This is both more semantically correct, and also avoids the white-on-white issue.

Hi @526avijitgupta, just to check: are you still planning to work on this? (I'm just going down the issues list and making sure we haven't got obsolete assignments.) Thanks!

@seanlip Sorry, I was busy in some university projects the past week. 
I'm definitely planning to work on this. I'll push the updated code to the existing branch soon !

OK, thanks for confirming!


Resolving patch:
diff --git a/core/domain/summary_services.py b/core/domain/summary_services.py
--- a/core/domain/summary_services.py
+++ b/core/domain/summary_services.py
@@ -71,8 +71,6 @@ def get_displayable_exp_summary_dicts_matching_ids(exploration_ids):
                 'human_readable_contributors_summary':
                     get_human_readable_contributors_summary(
                         exploration_summary.contributors_summary),
-                'contributor_names': user_services.get_human_readable_user_ids(
-                    exploration_summary.contributor_ids),
                 'tags': exploration_summary.tags,
                 'thumbnail_icon_url': utils.get_thumbnail_icon_url_for_category(
                     exploration_summary.category),


Test patch:
diff --git a/core/domain/summary_services_test.py b/core/domain/summary_services_test.py
--- a/core/domain/summary_services_test.py
+++ b/core/domain/summary_services_test.py
@@ -189,8 +189,7 @@ def test_get_displayable_exp_summary_dicts_matching_ids(self):
             'ratings': feconf.get_empty_ratings(),
             'title': u'Exploration 2 Albert title',
             'num_views': 0,
-            'objective': u'An objective',
-            'contributor_names': [self.ALBERT_NAME]
+            'objective': u'An objective'
         }
         self.assertIn('last_updated_msec', displayable_summaries[0])
         self.assertDictContainsSubset(expected_summary,