jow- / luci-ng

LuCI on Angular
84 stars 26 forks source link

ui-core: proof of concept #56

Closed ianchi closed 5 years ago

ianchi commented 5 years ago

Hi @jow-

It's been a while, but I've finally put everything together to have a somewhat working proof of concept. I'd appreciate if you could take a look and have your feedback. The focus is not on the implementation (which is really incomplete and buggy) but to discuss the design principles

  1. Definitions of the views are completely on json files. This definition can be split between two files:

To define some behavior, only javascript expressions are allowed. No code can be written on the view, if more complex logic is needed, it should go to the backend and called as an UBUS service

  1. A change in the look & feel.
    image

It is still very incomplete, but you can get a taste of the idea. This POC is keeping all the old menu of ui-base, but the idea is to have much less options in the menu, and have them directly in the page. In the example above, for System the idea is that we should complete remove the second level of the menu, and have only one view to navigate all the options, (obviously, with some parts as subviews).

PD: the package cannot yet be installed with opkg. It must be run in developer mode from the PC, proxying all the ubus calls to the router.

ianchi commented 5 years ago

Hi @jow- Any comments on the PR are appreciated. Specially on the sintaxis of the JSON files (schema & views).

If the PR is OK for you, the next step would be to enhance the system/system view to:

The idea is to concentrate on this view to develop all the core functionality needed and then use it to define the remaining views.

Some sparring to discuss the ideas will be helpful.