Giter Site home page Giter Site logo

osteele / banyan Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 1.0 1.32 MB

Visualize Dropbox file and folder sizes

Home Page: https://banyan.osteele.com

License: MIT License

Elm 80.52% JavaScript 2.28% CSS 2.15% Shell 0.20% Haskell 14.43% Makefile 0.41%
dropbox dropbox-client treemap visualization webapp

banyan's Introduction

Banyan

Visualize Dropbox file and directory sizes.

Live version: https://banyan.osteele.com/

Develop

Install

  1. Install yarn.

  2. Install npm and elm packages:

    $ yarn install

Create a Dropbox API Key

  1. Sign into Dropbox.

  2. Create a new app. Select “Dropbox API”, and give it “Full Dropbox” access.

    ![](./docs/dropbox-create-app.png)
    
  3. Add http://localhost:4000/ to the list of Redirect URIs.

  4. Set the DROPBOX_APP_KEY environment variable to the app's API key (highlighted below). If you use direnv, you can copy .envrc.template to .envrc and edit the key into that file.

Run

$ yarn start

Test

$ yarn test        # run the tests once
$ yarn test:watch  # test in watch mode

Lint

$ yarn lint

Acknowledgements

Build with Elm, elm-dropbox, Highcharts, Semantic UI, and Poi.

The Banyan tree image used in this app's Dropbox OAuth page was donated to the Wikimedia Foundation by Pearson Scott Foresman. It is in the public domain.

Highcharts is used under the Creative Commons (CC) Attribution-NonCommercial licence for personal use and demonstrations.

License

MIT

banyan's People

Contributors

osteele avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

superleah

banyan's Issues

Display more accurate progress information

The progress bar currently displays r/(r+1), once r responses have been received. This is at least monotonically increasing.

Ideally, it would display r/n, where n is the total number of responses. But we can't know n in advance.

Alternatively, d/(currentTime-firstRequestTime) could be a better estimate, where d = maxTime(currentRequest), firstRequestTime = maxTime(firstRequest), and maxTime(request) = max(data.clientModified, data.serverModified for data in currentRequest.items).

Cache the state between page loads

Cache the Dropbox file entries so that re-visiting the page is fast.

index.js contains code for this, that used to work and has been disabled pending investigation of #2 as a possibly better solution.

Better UI

Oliver has no graphic design skillz. The UI reflects this.

Some ideas:

  • Remove the invert from the menubar. (Or make it go all the way across, a la github.)
  • Progress bar should be lower contrast once it's complete.
  • Make the GB / MB units lower contrast.
  • The breadcrumbs are shown twice. Remove the second instance. Make the first one smaller.
  • Make the level / sort buttons smaller. This will help on mobile too.
  • Remove the “Sign In” / “Sign Out” icons?
  • Or, add a Sync icon. But then we might want to spin it while it's syncing.
  • Pick a color scheme.
  • Use (low-contrast) folder and file icons? This could be helpful with different icons for different file types.
  • Use background color or lines to separate the panels
  • Add a footer with more information? (The Github link could go here.)

Add an application icon

The Dropbox application page is configured with an image, that's displayed during OAuth. Add that to the app's navigation menu, and as a favicon.

Add a “remember me” option

The app currently stores the access token in localStorage, so the user is still signed in the next time they visit the page, until they explicitly sign out. Make this an option.

Show more than one level in the treemap

The file tree shows up to three levels, but the treemap is pinned to one. This is because add a second level sometimes causes the treemap to crash. Fixing this may depend on #2.

Follow Dropbox changes

Invoke the Dropbox listFolder API with include_deleted: true. Use listFolder/continue with a cursor in order to update the model: when the user pushes a “sync” button; when the page is reloaded; and/or, by polling.

The listFolder API is much slower when include_deleted: true is specified. (It requires a much larger number of requests, that seem to be throttled.) If we do this, we probably want to initiate both a recursive and a non-recursive sequence of listFolder requests, so that we can show the full results from the include_deleted: false sequence early, and switch to the include_deleted: true results once they're complete.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.