Android: Dynamic menu items

Created on 19 Jan 2017  Â·  16Comments  Â·  Source: nextcloud/android

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

approved enhancement green pr exists

Most helpful comment

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.

All 16 comments

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

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

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".

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)

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 ;)

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.

@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 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.

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

Sure but there is no API for this yet

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 :)

K. You know the three types of links?

On Tue, 28 Feb 2017 at 16:21, Andy Scherzinger notifications@github.com
wrote:

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 :)

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/nextcloud/android/issues/555#issuecomment-283068249,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAWsoxz3EZ1h3mcpFKOZcKLo0ht5bzHks5rhDtcgaJpZM4Ln9Ar
.

Erm, no. :) Which are they?

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

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

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 :)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

JSoko picture JSoko  Â·  3Comments

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments

tobiasKaminsky picture tobiasKaminsky  Â·  3Comments

Shagequi picture Shagequi  Â·  3Comments

markbryanduncan picture markbryanduncan  Â·  3Comments