Skip to content

Developer menu on version click - #2439

Closed
hannesa2 wants to merge 1 commit into
owncloud:masterfrom
hannesa2:DeveloperMenu
Closed

hannesa2 wants to merge 1 commit into
owncloud:masterfrom
hannesa2:DeveloperMenu

Conversation

@hannesa2

@hannesa2 hannesa2 commented Feb 8, 2019

Copy link
Copy Markdown
Contributor
  1. The first click nothing happen
  2. after you need 4 more clicks
  3. now the developer menu appears (currently only log option)
  4. further clicks point to github.com commit like before

You could use this switch for some other use cases too, but this is your decision (and your or additional PR)
Btw, I use it here to investigate why my upload doesn't work and AndroidX should crash

developermenu

@hannesa2
hannesa2 force-pushed the DeveloperMenu branch 2 times, most recently from 4ef5b51 to f970be7 Compare February 8, 2019 17:03
@michaelstingl

Copy link
Copy Markdown
Contributor

Awesome, I ❤️ it! 👍

BTW I granted you permissions to open branches in this repo.

@hannesa2

hannesa2 commented Feb 9, 2019

Copy link
Copy Markdown
Contributor Author

I pointed out, it makes no sense, to show in release the log, when switch isBeta() prevents from logging.
So I merge new isDeveloper() (controlled by user) and isBeta()(controlled by build) with a second commit

@davigonz

davigonz commented Feb 11, 2019 •

Copy link
Copy Markdown
Contributor

Thanks for this @hannesa2 , I guess we can now include logs for customers and PlayStore versions @michaelstingl

@davigonz davigonz added this to the 2.11.0 milestone Feb 11, 2019
@hannesa2
hannesa2 force-pushed the DeveloperMenu branch 3 times, most recently from fa8459b to a23bf50 Compare February 13, 2019 05:57
@davigonz
davigonz requested a review from hosy February 13, 2019 11:13
@hannesa2
hannesa2 force-pushed the DeveloperMenu branch 4 times, most recently from 9f9f0b5 to 1f184e3 Compare February 16, 2019 21:18
@davigonz
davigonz self-requested a review February 22, 2019 11:29
@davigonz

Copy link
Copy Markdown
Contributor

@hannesa2 I've just cloned your code and I'm able to see the Logs option (in debug and release) even before enabling the developer menu, any clue?

@hannesa2

Copy link
Copy Markdown
Contributor Author

Fresh install?


public void readIsDeveloper() {
mDeveloper = BuildConfig.DEBUG || PreferenceManager.getDefaultSharedPreferences(getApplicationContext())
.getInt(CLICK_DEV_MENU, 0) > CLICKS_NEEDED_TO_BE_DEVELOPER;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

here is the magic

@hannesa2

Copy link
Copy Markdown
Contributor Author

With commit use isDevloper() everywhere instead of isBeta() you see it in debug always
https://github.com/owncloud/android/pull/2439/files#r259567889
and release can't be build locally with current repo.

It seems you have set the System.env.OC_RELEASE_KEYSTORE , I'm not.
Where is the release build ? I've the fear you build it local on your machine

@davigonz

Copy link
Copy Markdown
Contributor

With commit use isDevloper() everywhere instead of isBeta() you see it in debug always
https://github.com/owncloud/android/pull/2439/files#r259567889
and release can't be build locally with current repo.

I will try it again

@davigonz

davigonz commented Feb 26, 2019 •

Copy link
Copy Markdown
Contributor

release can't be build locally with current repo.

It seems you have set the System.env.OC_RELEASE_KEYSTORE , I'm not.
Where is the release build ? I've the fear you build it local on your machine

@hannesa2 you can build it by using release variant but you won't be allowed to install the generated apk without signing it. I signed the apk and installed it and as I said before, Logs option is visible in debug release even before enabling the developer menu.

You could give it a try after signing the apk with a test keystore.

@hannesa2

Copy link
Copy Markdown
Contributor Author

Arghhh , it was working, please see animation in first post.
Anyway, this repeating rebasing destroyed it, and I fixed it again.
Please have a look

@hannesa2
hannesa2 force-pushed the DeveloperMenu branch 2 times, most recently from b8b5130 to 283f85b Compare February 28, 2019 19:52
@hannesa2
hannesa2 force-pushed the DeveloperMenu branch 2 times, most recently from 3b6342b to 80bf9a8 Compare March 9, 2019 06:26
}

public void onActivityCreated(Activity activity) {
if (!BuildConfig.DEBUG) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Same and in the rest of the classes where you have removed it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

there is no need of this anymore
image

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

That's what I mean, if is not needed anymore, please delete the import com.owncloud.android.BuildConfig; dependency at the top of the classes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok, this I missunderstood

@davigonz

Copy link
Copy Markdown
Contributor

@hannesa2 some changes requested

@hannesa2

hannesa2 commented Mar 14, 2019 •

Copy link
Copy Markdown
Contributor Author

This is my tested way, I will not change this anymore.
If you want to have it change, I pushed branch to 'upstream' remote, so you can change it and rebase .... what ever you want

I'm done here

@hannesa2
hannesa2 force-pushed the DeveloperMenu branch 2 times, most recently from 577a769 to d1a9f94 Compare March 14, 2019 08:12
@davigonz

davigonz commented Mar 14, 2019 •

Copy link
Copy Markdown
Contributor

This is my tested way, I will not change this anymore.
If you want to have it change, I pushed branch to 'upstream' remote, so you can change it and rebase .... what ever you want

I'm done here

Sorry @hannesa2 but this is not how contributions work, there's a process that you most likely already know and if any contributor wants to have his code merged, first it needs an approved code review and to achieve that, we normally request some changes. And being honest, all of our contributors do always agree with this.

Not all the changes requested are mandatory of course and all of them are opened to discussion but leaving a PR half done and expecting that anyone of the Android core developers is going to finish your contribution is not the best way to proceed because we have spent time reviewing your code to make it better - or at least, that's the intention - when we could directly apply the changes without expending time in adding comments to the review.

We've already performed some changes in our flow to make the contributors feel more comfortable and work less, now you have permissions to create branches directly in the ownCloud Android repository and we were willing to rebase your contributions even knowing that is not the best approach - the owner of each PR should take care of rebases, including contributors, and solve conflicts if needed, is the process we follow from time ago -.

It's a fact that you are using your spare time to contribute here and we are very grateful but as developers it does not mean that we have to finish your contributions or you are allowed to skip some steps of our process.

So now let's resume the work in the code review:
#2439 (comment) and #2439 (comment) would be necessary - make the code cleaner and readable - to merge this contribution.
If you do not agree with #2439 (comment) for instance, please give us an argument cause you just wrote this.

Screenshot 2019-03-14 at 10 25 07

Thanks

@hannesa2

hannesa2 commented Mar 14, 2019 •

Copy link
Copy Markdown
Contributor Author

No problem, currently I'm not in the mod to do all suggestions to get merged.

Maybe this will change again, but currently you have my suggestions as PR. You can use it as source of an ideas, accept it, or decline it.

I learned, when I've serious issues (the broken sync) I've to do it by myself. Nobody does the paining deeper bug fixing. -that's a fact-

All my remaining PRs are just by-products of this sync-fix to help me (nobody else) to investigate what's wrong.

One big thing I've to fix is #2460 (help yourself seems the only way) and I guess the world should have this bugfix too.

But when I get as a review issue, to remove an empty line (!) #2439 (comment) I feel the strong trigger to change my work mode

So I do my changes, show it to this repo, to let you participate. Maybe I should rethink this too, to avoid misunderstandings

But I've to save my time, that's the part of free (gratis) volunteers.

@hannesa2
hannesa2 force-pushed the DeveloperMenu branch 2 times, most recently from 41c8349 to ed707fe Compare March 15, 2019 05:44
use isDevloper() everywhere instead of isBeta()

use BuildConfig.DEBUG in isDeveloper() only

start logging when reach developer

(cherry picked from commit 7a766041f08cb3be055525e33a873b245a20e32e)

fix developer menu

review comment
@jesmrec

jesmrec commented Mar 15, 2019

Copy link
Copy Markdown
Member

Just to clarify:

Your time is your time and you plan it, of course. When the oC team asks you for changes, this is not a matter of time. I mean, you can do it whenever you can/want. If today you are busy, do it the next week or the next month, this is not a problem. Community works in this way.

Priorities are set by the team, taking in account many factors. We take care of the incoming PRs when the whole team agrees to do it. If any PR is not attended at any moment is because other stuff with more priority is being attended.

Code reviews try to get the best code quality. Everyone has his own idea about "quality", i know. But things like "remove an empty line" is asked for everyone in the community and also internally in the team as part of the code review. Will not take exceptions. CR is mandatory to pass, and discussions about the suggestions are welcome, making not all the changes to be always done. But skipping or refusing... is not the solution.

The team (and specially @davigonz) is fully engaged with community as always did. Product MUST be the target for team and community, and not "me", "myself" and similars. All of us together, by respecting ourselves, will make our lives easier.

Hoping for a solution regarding the current PR.

@davigonz

davigonz commented Mar 15, 2019 •

Copy link
Copy Markdown
Contributor

I learned, when I've serious issues (the broken sync) I've to do it by myself. Nobody does the paining deeper bug fixing. -that's a fact-

All my remaining PRs are just by-products of this sync-fix to help me (nobody else) to investigate what's wrong.

One big thing I've to fix is #2460 (help yourself seems the only way) and I guess the world should have this bugfix too.

@hannesa2 you just need to have a look at #2394 (comment) and the rest of the comments I put on that issue to realise we were trying to help you, asking you for more information to find out the cause of your problem.

In addition, we tried to reproduce the issue in our side multiple times (#2394 (comment)) and was not possible, that's why we did not start the "deeper bug fixing". Then your broken sync was fixed by something we do not know clearly yet, as you commented in #2394 (comment).

Another example of our help => #2393 (comment)

But when I get as a review issue, to remove an empty line (!) #2439 (comment) I feel the strong trigger to change my work mode

You have picked the most insignificant change there, what about this where we could improve the code readability or this to remove unneeded dependencies? That's the aim of CRs.

So I do my changes, show it to this repo, to let you participate. Maybe I should rethink this too, to avoid misunderstandings

We have participated in many of your contributions, reviewed and merged 25 contributions in the ownCloud Android app and 16 in the ownCloud Android library, just for you to know.

We appreciate your work and would like to keep including your contributions but first we need mutual respect as @jesmrec suggests and discrediting our work here or suggesting we do not help is the worst way to achieve that in my humble opinion.

@michaelstingl

Copy link
Copy Markdown
Contributor

Maybe this will change again, but currently you have my suggestions as PR. You can use it as source of an ideas, accept it, or decline it.

Thank you very much! We'll consider to finish this and bring it to the final app. Maybe 2.11.0 – let's see…

@davigonz davigonz mentioned this pull request Mar 26, 2019
1 task done
@davigonz

Copy link
Copy Markdown
Contributor

Let's merge this via #2502, thanks @hannesa2 for the contribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants