os-js / OS.js

OS.js - JavaScript Web Desktop Platform
https://www.os-js.org/
Other
6.9k stars 822 forks source link

[CoreWM] Widgets support #122

Closed rubengc closed 8 years ago

rubengc commented 9 years ago

Add a desktop widgets support from apps installed

Something like Android/iOS widgets, where an app can contains some widgets with different sizes support

andersevenrud commented 9 years ago

This was [also] suggested in #100 and moved to #49. Do you have any specific types of widgets in thought ?

rubengc commented 9 years ago

An interesting widget to test this can be a clock for some reasons: Needs to get update every min (or every second) Has different sizes Has different date formats Has different styles (normal or digital)

In the future, sure that some apps will have a really useful widgets (the weather, a system usage visor, a RSS feed from your favourite page, a task pending visor, etc)

Edit: I recomend an app folder structure like: MyApp

Inside view/views/html the developer can specify different sizes using large, medium or small folders

andersevenrud commented 9 years ago

I think it would be better to make the widgets a "package" just like how the applications run. This way it's super easy to maintain them with install/uninstall. Also, then you can decide for yourself where to put the files. You can basically have some cake, and eat it too :) Sounds reasonable ?

A clock widget would be a nice place to start. Should be pretty stratight forward and easy. Thanks!

rubengc commented 9 years ago

So the user now will see in the store: apps, widgets and themes right? If someone publish an app, will be interesting add widgets to this installation (asking to the user if he wants to install them too) For example, a twitter app, would want to include a widget with latest tweets In the store, the developer can mark what widgets are included in this app

andersevenrud commented 9 years ago

This can be a store spesific feature. In the manifest for a store item there could be some entries that define an association. That way it works more or less like you described :)

MrSchism commented 9 years ago

I think a system resource panel would be single handedly the best, especially if you can see usage per user in a separate tab

Simple, like Virtual Machine Manager's interface... but instead of VMs, show users.

andersevenrud commented 9 years ago

@MrSchism

Simple, like Virtual Machine Manager's interface... but instead of VMs, show users.

Which users ?

MrSchism commented 9 years ago

Any 'user' accounts on a system. Like field 2 of top.

OR alternatively, if used in a multi-user mode, any logged-in users.

andersevenrud commented 9 years ago

@MrSchism But do you mean in OS.js or the underlying system ?

MrSchism commented 9 years ago

In the first instance, the underlying system.

In the second, OS.js. It'd ideally be set for only an elevated user to see.

andersevenrud commented 9 years ago

Yeah, because an OS.js user does not run on the underlying system... so getting any statistics for that would be pretty limited (only what the webserver has). If you had a handler that actually used PAM (which I have tested successfully) you can get some stats if a user actually executes some background tasks etc, but again limited.

But yes. The original intent of OS.js was to manage the underlying system. I was using it for virtual machine setups and webservers etc. Had a few D3.js charts going etc to see realtime traffic etc. Maybe I should redo these for v2 ?! ;)

MrSchism commented 9 years ago

It wouldn't be a bad idea. The ability for an admin/mod/op to monitor is always good, in my book.

andersevenrud commented 9 years ago

@MrSchism I could basically just include a bunch of wrappers and attach them to the API for cases just like this. Sort of like munin (but not that awful custom scripting stuff.... just pure js)

MrSchism commented 9 years ago

That'd be awesome. I was thinking something between the monitor I linked above and conky

andersevenrud commented 9 years ago

@MrSchism Yeah. That'd be nice :)

MrSchism commented 9 years ago

I say between the two because while conky is nice, it might be offputting to casual and new moderators/administrators.

eraffaelli commented 8 years ago

Totally need this ^^ I'm working on a Weather app (well, it's more a playground for now but) and it would be nice to have a "favorite" city widget.

andersevenrud commented 8 years ago

I am closing this issue in favour of #329.

Just FYI: I've started on an implementation on this that uses a <canvas> based system (so everything scales correctly). So it will not be long until you finally can do this -- but for progress, se #329 :)

andersevenrud commented 8 years ago

You can now follow the progress in #479 :)