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

Dynamic menu items #555

Closed
mario opened this issue Jan 19, 2017 · 16 comments
Closed

Dynamic menu items #555

mario opened this issue Jan 19, 2017 · 16 comments

Comments

@mario
Copy link
Contributor

mario commented Jan 19, 2017

Capabilities API would expose menu items to be added to the sidebar. The menu items would simply open a web page, and the API would expose title and the URL - but @MorrisJobke probably knows a bit more about this than I do.

While I will have an issue regarding sidebar menu redesign, in the current design the links would probably go between uploads and settings.

Involving @nextcloud/designers team just in case they have any issue with the suggested approach.

@AndyScherzinger @tobiasKaminsky

PR: #806

@tobiasKaminsky
Copy link
Member

What menu entries would be added?
We need to make sure that only important and not too many entries are shown.

@mario
Copy link
Contributor Author

mario commented Jan 19, 2017

The user would be able to add the entries on the server side. Including @karlitschek so he can tell us more about this.

@MorrisJobke
Copy link
Member

The user would be able to add the entries on the server side. Including @karlitschek so he can tell us more about this.

It's not the user, but the admin. Stuff like "more information about our service" (can be found on the web page and therefore an URL is used here and open the browser from within the app).

The entries can be fully defined by the admin of the instance and should be placed on a fixed position (as in hardcode the position within the Android code) but not at the very end. Maybe after "Uploads" and before "Settings".

@tobiasKaminsky
Copy link
Member

Oh, great stuff.
Is every "self defined" entry just a link, which should be opened as a webview in the app?
Where can I (as an admin) adjust this? (for testing purpose)

@MorrisJobke
Copy link
Member

Is every "self defined" entry just a link, which should be opened as a webview in the app?
Where can I (as an admin) adjust this? (for testing purpose)

Yes. It's defined as "name and URL". This needs to be developed ;)

@AndyScherzinger
Copy link
Member

Sounds rather easy :)

We already do this for the account menu list, so basically define a menu item group which you populate dynamically based on the server response. While for bandwidth savings there should be some caching though.

@mario
Copy link
Contributor Author

mario commented Jan 23, 2017

@MorrisJobke do you know if this is going to be available for 12, as I need it in the app?

Poking @karlitschek so he doesn't forget about the need for this :P

@MorrisJobke
Copy link
Member

@MorrisJobke do you know if this is going to be available for 12, as I need it in the app?

Sure :) I guess we also will bring this to an older version. We are currently settling on an API. I will keep you posted.

@AndyScherzinger
Copy link
Member

I created a branch for development here: https://github.com/nextcloud/android/tree/dynamicMenuItems

@mario
Copy link
Contributor Author

mario commented Feb 28, 2017 via email

@AndyScherzinger
Copy link
Member

I know. Just thought I can do some UI preparation work to support you with this change, so we "just" have to integrate the server's API at some point while the UI part is already there :)

@mario
Copy link
Contributor Author

mario commented Feb 28, 2017 via email

@AndyScherzinger
Copy link
Member

Erm, no. :) Which are they?

@mario
Copy link
Contributor Author

mario commented Feb 28, 2017

Regular sidebar links, quota link (will go below quota bar), and settings links (will replace our settings links like help etc etc).

@tobiasKaminsky tobiasKaminsky self-assigned this Apr 4, 2017
@tobiasKaminsky
Copy link
Member

Just a quick screenshot of how the webview looks like
device-2017-04-04-155724

  • Javascript is enabled, even though "Using setJavaScriptEnabled can introduce XSS vulnerabilities into your application, review carefully." But I guess websites without JS are pretty hard to display.
  • The webpage is not reloaded when rotating, but rotation is done be webview, so it is a really smooth UI feeling

Tomorrow I will start with fetching the items via ocs

@MorrisJobke

@mario
Copy link
Contributor Author

mario commented Apr 4, 2017

Hi @tobiasKaminsky - some comments:

  • maybe show back icon so you can go back to settings instead of drawer icon (which is disabled)
  • please make sure to disable local file access for webview
  • please open a PR with WIP so we can track progress :)

This was referenced Apr 6, 2017
@MorrisJobke MorrisJobke reopened this Apr 20, 2017
@AndyScherzinger AndyScherzinger added this to the Nextcloud App 1.5.0 milestone Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants