privly / privly-android

The Official repository for Privly Android
MIT License
14 stars 27 forks source link

Hide Menu Options from the PrivlyApplications. #16

Closed vshivam closed 9 years ago

vshivam commented 10 years ago

The JS Applications show a menu which gives options to create new ZeroBin/PlainPost etc. This isn't useful for the mobile use case and hence should be hidden on the mobile. screenshot_2014-03-16-09-49-03

smcgregor commented 10 years ago

You should open an issue on https://github.com/privly/privly-applications for this as well since that is where this change needs to be made.

metlaivan commented 10 years ago

Hi, I fix it. And add to pull https://github.com/privly/privly-android/pull/14

vishalpathikgupta commented 10 years ago

Correct me if I am wrong, as the privly-applications is used under assets and not resources, so it will just act as a file system and these files will be locally accessible using our app, if that's the case, as Sean suggested we can use a class mobile hide or we can just comment the navigation part in the assets, it won't change privly applications globally but its just when we use that webview in our Android app, it will just use the assets which are just tuned up for the mobile usage.

smcgregor commented 10 years ago

@tech-pill I believe you are correct. @metlaivan is working through it here: https://github.com/privly/privly-applications/pull/49

vishalpathikgupta commented 10 years ago

Yeah Sean I saw that, so do you think we can take the approach what I suggested too? If that will be the case then my commit and pull request would be much targeted in making changes(which would be just to comment out the navigation part) to https://github.com/vshivam/privly-applications and not the main privly-applications branch.

smcgregor commented 10 years ago

I think it is simpler at this point to maintain a single definitive version of privly-applications for all browsers. If this becomes too complex, we can modify the build system or start maintaining different branches for different platforms. I am hoping that we can keep the single version, however.

vshivam commented 10 years ago

I agree with what Sean said, i.e. we should maintain a single version of privly-applications. The applications have a method which will tell you what platform the application is running on and I think it should be fairly easy to hide the menu options once you know the platform.

https://github.com/vshivam/privly-applications/blob/master/shared/javascripts/network_service.js#L91

@smcgregor However, I am guessing this will require changes to the individual applications rather than just the shared js. ?

Regarding which menu options to hide, I think we should hide the complete menu since we'll be providing navigation options inside the android application itself.

vishalpathikgupta commented 10 years ago

@vshivam @smcgregor Yeah I understand that keeping a single version will keep its uniformity all throughout privly. So taking your suggestions, I tried the below two lines, thinking it will do the job:

else if (privlyNetworkService.platformName() === "ANDROID") { document.getElementById('navbar').style.visibility = 'hidden';

[Tried this for not just navbar but all the nav related classes that have been used in the privlyapplications] But somehow its not working as it is suppose to. So Sean now even I have the same doubt which shivam asked above.

smcgregor commented 10 years ago

@vshivam We would need to change the template files, which would lead to changes in all the applications. It would not be terribly difficult, but we have a working CSS solution that doesn't require different compiled versions for every platform.

@tech-pill You should just use the CSS class shown in https://github.com/privly/privly-applications/issues/49, no?

vishalpathikgupta commented 10 years ago

@smcgregor Yes I got what you are trying to say, I will do the CSS implementation and do a pull request soon.

vishalpathikgupta commented 10 years ago

@smcgregor @vshivam I have made a pull request here https://github.com/privly/privly-applications/pull/55. Kindly review it.

P.S. Sorry for the delay in the pull request had my exams.