remotestorage / remotestorage-widget

⬡ Connect widget for remoteStorage.js
https://remotestorage.io
28 stars 16 forks source link

add chart.css in remotestorage-widget #133

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hi everyone.

idea I added theus.github.io/chart.css in remotestorage-widget. Please, see this: new ui/ui in remotestorage-widget?

concept - img 1 image

concept - img 2 image

why? Things in the cloud have information about the amount of data available. I'm thinking of adding this feature for anyone using remote-storage or a third-party service with remote-storage.

example image

how?

  1. Please, see this: theus.github.io/chart.css - chart-css framework.
  2. I added tags html(css-chart) in widget.html and I added chart-css in index.html

index.html

<link rel="stylesheet" href="https://cdn.rawgit.com/theus/chart.css/v1.0.0/dist/chart.css" />

widget.html

...
<h1 class="rs-big-headline">Connect your storage</h1>
<!-- /.charts__chart -->
<div class="charts__chart" data-percent="60%" style="width: 60%"></div>
<!-- /.charts__chart -->
...

why send this pull-request here?

  1. I want to collaborate with open software, open protocol like remote-storage etc.
  2. Also, I was informed that I need to send pull-requet before issues. Please see this:

OK, then I don't see why we'd need a whole library for that. A couple of lines of CSS should do. Pull requests welcome! (No need to ask beforehand in the future, just open PRs with what you propose, so it can be discussed based on working code.)

demo? url-sample: https://myfavoritedrinks.remotestorage.io/ image

question/feedback What do you all think of the idea?

raucao commented 1 year ago

This raises many questions:

  1. How does it help with connecting to your storage that you know how much of it you're using?
  2. How would you even know how much you're using before you connect?
  3. Which part of the protocol provides this information? I know of no way of knowing this, other than the storage provider keeping track of it and showing you in their account panel somewhere.
  4. Why use a chart library for something that you can set a percentage width to via CSS? What value does the library provide over plain HTML/CSS?
ghost commented 1 year ago

Hi raucao.

This raises many questions: How does it help with connecting to your storage that you know how much of it you're using?

I will try to answer this question. Each remote-storage provider can say the amount of storage limit, for example, google drive is 15GB in the free plan and dropbox is only 2g in the free plan. In that sense, the remote-storage provider can also say a limit for the remote-storage through a panel - but the problem is that this information is restricted to the storage provider and not the user.

The advantage of knowing the amount of data, you can take precautionary measures if there is no local space or if the remote storage provider imposes some limit on you in remote-storage.

How would you even know how much you're using before you connect?

I can use official google drive and dropbox api before remote-storage to know the amount of data used.

Which part of the protocol provides this information? I know of no way of knowing this, other than the storage provider keeping track of it and showing you in their account panel somewhere.

  1. Actually, there is no such feature. About that, this feature is just something visual that can possibly be implemented with some api.
  2. But things like dropbox and google drive have api that can tell you how much storage space is used. So this can be solved, with a google drive/dropbox api without remote-storage.
  3. The only problem I see is that the storage space information in remote-storage is done by the provider and not by the implementation itself, which I consider an error initially, because this information in my view is very important for the user.

Why use a chart library for something that you can set a percentage width to via CSS?

I'm a classic and lazy programmer, I always try to use some framework to make my life easier. I used the css library just to demonstrate a possible implementation that I can do.

What value does the library provide over plain HTML/CSS?

It generates the graph in line mode, which is the default to show the amount of storage available on any third-party service such as drobpox, gmail, google drive etc.

DougReeder commented 1 year ago

It is a good idea, once the user has connected, to display the storage space available. However, there is no API for that in the remoteStorage protocol at present, and the Dropbox and Google Drive support is secondary to supporting servers that support the remoteStorage protocol natively. I can't see adding functionality that native remoteStorage servers don't support.

I think this PR will have to wait until there's a consensus that it's worth it to extend the remoteStorage protocol. Please post on the forums

The widget is used by almost every RS app, so we need to keep size to a minimum. I'm not seeing that implementing an analog gauge UI requires a new library.

ghost commented 1 year ago

Hi DougReeder.

It is a good idea, once the user has connected, to display the storage space available. However, there is no API for that in the remoteStorage protocol at present, and the Dropbox and Google Drive support is secondary to supporting servers that support the remoteStorage protocol natively. I can't see adding functionality that native remoteStorage servers don't support. I think this PR will have to wait until there's a consensus that it's worth it to extend the remoteStorage protocol. Please post on the forums

Thanks for the feedback. So you talked about extending remote-storage. One of my ideas is exactly that with orbit-db in "remote-storage with orbit-db", isomorphic-git in "version control in remote-storage", remote-storage extensions in "remote-storage extending" and this feature of amount of available data.

The widget is used by almost every RS app, so we need to keep size to a minimum. I'm not seeing that implementing an analog gauge UI requires a new library.

Thanks for the feedback again.