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

Fix "Invite to <activity>" shown even for activities that don't support sharing #625

Merged
merged 1 commit into from Feb 17, 2016

Conversation

erilyth
Copy link
Contributor

@erilyth erilyth commented Dec 11, 2015

A fix for the issue #2702 (https://bugs.sugarlabs.org/ticket/2702)

@erilyth erilyth changed the title Fix issue #2702 Fix "Invite to <activity>" shown even for activities that don't support sharing Dec 11, 2015
@godiard
Copy link
Contributor

godiard commented Dec 11, 2015

Looks nice. Check your code with pep8 and do a test with activities that do not have the field max_participants in the file activity.info. (This field was a recent addition, not all the activities has been updated yet)

@erilyth
Copy link
Contributor Author

erilyth commented Dec 11, 2015

In the activitybundle, max_participants is initialized to 0, so currently the "Invite" option is not displayed if max_participants is not set in the activity.info file. Should this be displayed for activities which don't have max_participants set as well?

@quozl
Copy link
Contributor

quozl commented Dec 13, 2015

Reviewed this and also @i5o's abandoned #434.

Agree with @godiard that commit should describe tests with activities that do not have the field max_participants.

Please check that you are handling the journal activity correctly; the code in #434 is quite different to yours.

In my opinion the invite option should be hidden for activities that do not have max_participants set. This is also consistent with #434.

Please add to the commit message; what was wrong, what is fixed, how it is fixed. how to test.

Please also rebase your patches on this pull request to create one patch, and then force push. (Because merging two patches will make history harder to use for regression analysis.)

@erilyth
Copy link
Contributor Author

erilyth commented Dec 14, 2015

In #434 , The journal hides the invite menu as well, and the same thing is being done here, so I think it should be fine. Ill add details to the commit message.

@quozl quozl added the bug label Dec 15, 2015
@erilyth
Copy link
Contributor Author

erilyth commented Dec 19, 2015

Any updates on this?

@quozl
Copy link
Contributor

quozl commented Dec 19, 2015

@erilyth, I know how you feel; I've several pull requests waiting for review and merge. The next 0.108 date milestone is 28th December. Thanks for the force push, I've reviewed the commit.

I continue to agree with @godiard that you should test with activities that do not have the field max_participants. You may have done this, I'm not sure. The best place to put it is in the commit message, because that is what will be used later when someone reports a bug. Write something like "Tested with activity Name-99 which does not have field max_participants."

My other comments above, you have already integrated.

@erilyth
Copy link
Contributor Author

erilyth commented Dec 19, 2015

Ok, sure quozl :). I will add that to the commit message and force push it.

@@ -24,11 +24,13 @@
from gi.repository import GObject
import dbus


Copy link
Contributor

Choose a reason for hiding this comment

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

Why this newline?

@samdroid-apps
Copy link
Contributor

This looks good, I will test. I'd appreciate it though if you kept the summary (the 1st line) of your commit message less thatn 80chars. Then it displays correctly in most places. Maybe like "Do not show invite option for activities that do not support sharing" (if that is less than 80chars 😄).

@quozl My tests lead me to believe that this patch makes activities without max_partcipants not show the invite menu. I agree that this is a good thing, as older activities collab is probably broken anyway (from my fedora rawhide centric view of the world).

I will merge once you fix up the commit message @erilyth!

@erilyth
Copy link
Contributor Author

erilyth commented Dec 20, 2015

Done :)

@quozl
Copy link
Contributor

quozl commented Dec 20, 2015

I continue to wish for the commit message to refer to the testing that has been done, rather than depend on GitHub to keep the pull request discussion. At the moment the commit message does not do that.

Activities with max_participants<=1 also have an invite option, now they don't.
Now, we check for activities with less than 1 participants and disable the option.
To test launch activity with max_participants<=1 or max_participants is not set,
and the invite option will not be present.
Tested this with the read activity which supports a max of 10 participants and with
the write activity which has not specified max_participants.
@erilyth
Copy link
Contributor Author

erilyth commented Dec 21, 2015

Updated the commit message, added test details for the write and read activities.

@quozl
Copy link
Contributor

quozl commented Dec 21, 2015

Thanks. I've no further wishes.

@samdroid-apps samdroid-apps merged commit 1b45723 into sugarlabs:master Feb 17, 2016
@samdroid-apps
Copy link
Contributor

Great! It still works as intended. Sorry for taking soo long to merge this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants