Giter Club home page Giter Club logo

expense-manager-demo's Introduction

Progressive Web App with full offline capabilities

This is an example project for how you can build a Progressive Web Application with Polymer and Vaadin components.

The application uses a Service Worker to cache the Application Shell. A Web App Manifest file ensures that the browser identifies our app as a Progressive Web Application and offers the user to install the application through an install banner.

Live Demo

Try the live demo of the Progressive Web Application.

Running locally

  1. Fork this repository and clone it locally.

  2. Make sure you have npm installed.

  3. Run npm install bower polymer-cli -g to install tools needed to run the project.

  4. When in the expense-manager directory, run npm install and then bower install to install dependencies.

  5. Run polymer serve to start the development server.

  6. Go to http://127.0.0.1:8081

Linting

Run all lint tasks in parallel

npm run lint

Run ESLint for JS

npm run lint:javascript

Run Stylelint for CSS

npm run lint:css

Run polymer-linter

npm run lint:polymer

Docker container for production

You can use the included Dockerfile to deploy the built app using prpl-server.

Build project locally

The default polymer.json contains the "autoBasePath": true setting to support differential serving with the prpl-server. This option makes the build incompatible with static file servers, though. So, in order to serve bundled app locally using polymer-cli, do the following steps:

  1. Remove "autoBasePath": true setting from the polymer.json

  2. Run polymer build

  3. Run polymer serve build/es6-bundled (you can choose es5-bundled instead)

Read more about the build options in the Polymer: Build for production documentation.

expense-manager-demo's People

Contributors

jouni avatar juhopiirainen avatar limonte avatar manolo avatar marcushellberg avatar platosha avatar tehapo avatar tomivirkki avatar web-padawan avatar yuriy-fix avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

expense-manager-demo's Issues

Add bottom padding to display dialogue buttons on mobile

The simplest way to fix this is to add bottom padding on mobile. Other alternatives could be a fixed button container at the bottom of the viewport, or placing the buttons smaller in the header bar at the top on mobile. Might be harder to redesign/implement these in a bulletproof way so I would stay away from that path for now.
screen shot 2015-12-11 at 10 55 39

Can't get past log-in page when ran locally.

I run the demo on my local machine and the red bar just goes across forever. The log-in page never fully pops up. How could I get rid of that log-in portion to go directly to the list view on the demo?

Replace filter inputs with combo boxes

I am guessing the inputs are not yet combo boxes because we don't have one available, yet. Anyhow, filtering the grid by having to type the values feels awkward (e.g. on the screenshot when you would want to limit the results with "Max ($): 200") and you start typing "2" the grid momentarily shows nothing because the value is so small). Also because there is a prefedined set of "Merchants" available, it would make more sense to have the options in a dropdown rather than having to type them yourself.

screen shot 2015-12-11 at 11 04 05

Readme outdated / incomplete

It is not possible to get a local development version running using the README.md instructions without previous knowledge about Polymer, PouchDB, Vaadin Elements etc.
e.g. the mentioned <pouch-db> element is missing from overview-page.html and simly running polymer build fails with
Error: ENOENT: no such file or directory, open '/home/jonni/Downloads/expense-manager-demo/bower_components/polymer/polymer.html'

back button bug with new expense on mobile.

Must click back button twice on mobile, if you previously clicked cancel.
Context:

  • Android latest stock nexus 6.

Steps to Repro:

click the new button to make a new expense

  • click cancel and it will close the dialog
    click the new button again
  • click the mobile "back" button. Nothing will happen
  • click the mobile "back" button. It will close.

Online Demo no longer working?

I was very excited to come across this web app, and was eager to experiment with it. However, it appears that the online demo version isn't working. It loads up fine, but it doesn't actually save any of the data that's entered. I've tried various different devices and browsers, but all of them have the same behavior. And my developer console is displaying numerous errors that I suspect might be related to couchDB.

Are there any special requirements in order for this application to work .. like the enabling of a flag in the browser settings or something similar? And are there any special hosting or server configuration requirements?

Thanks,

  • Yvan

Additional filters missing on mobile

"Min($)" and "Max($)" and "Status" filters are not accessible on mobile. Even if other filters except "Merchant" are hidden on purpose, there should be less padding above and more padding below the "Merchant" input on mobile. Screenshot with desktop and mobile side by side:
screen shot 2015-12-11 at 10 30 56

Frozen column is missing drop shadow

To make it more clear for mobile users that they can scroll the grid also horizontally, the frozen column should at least have the drop shadow to the light as in the attached example. The horizontal 1px lines added between rows in the demo might make the light shadow less noticeable so I might try removing the lines as in the original design. If a more visible zebra contrast between lines is needed for poor displays, then try a bit darker grey background for the altering rows.
iphone 6 - overview - total - teal

client/gulp serve fails

client/gulp serve produces error

[09:49:00] Finished 'styles' after 3.76 s

app/elements/expense-service.html-script-0
  line 317  col 20  'findMonth' was used before it was defined.
  line 577  col 19  Don't make functions within a loop.

  ⚠  2 warnings

[09:49:03] 'lint' errored after 11 s
[09:49:03] Error in plugin 'gulp-jshint'
Message:
    JSHint failed for: app/elements/expense-service.html-script-0
[09:49:03] gulp-imagemin: Minified 5 images (saved 54.58 kB - 35.8%)
[09:49:03] images all files 97.68 kB
[09:49:03] Finished 'images' after 5.4 s

Pouchdb fails at IE11

Browser: IE11
OS: Windows 10

expense-manager-demo unable to show data on IE11. Both demo.vaadin and local version fails.

demo.vaadin:
expense_ie_demo

Local version:
expense_ie_local

Disable certain fields when editing no 'new' expenses

Makes not sense that the user can modify certain fields when editing in_progress or reimbursed expenses. I would disable Merchant Total and Date fields, makes sense that the user can update his comment, and probably it is useful to update the picture.

Expense editor should have buttons bar always visible

When expense is long enough, buttons bar is not visible until the user scrolls the dialog, but some times is not clear that he needs to scroll the dialog in order to see the cancel button.
Note that clicking outside, or pressing escape dialog does not close, so user might not be able to close the dialog if he does notice that the dialog is scrollable.

screen shot 2018-05-02 at 09 47 44

Text in dialog changes when pressing cancel

When you click an item to edit it, the dialog says "Edit Expense".
When you press "Cancel" or "Save", the dialog suddenly changes to say "Add Expense" and all fields are cleared. This should not happen

Clean up bower.json

Depend on vaadin-core instead of individual elements. Remove unused components.

Merchant combo : vaadin-overlay-behavior.html:105 Uncaught ReferenceError: unwrap is not defined

The combo for the merchant gives an error when running local .. maybe I amd doing something wrong. Any idea ?

Local I see this (and the combox box does not work) :

selection_432

The Live demo shows :

selection_434

In the console I have the error
vaadin-overlay-behavior.html:105 Uncaught ReferenceError: unwrap is not defined

selection_431

selection_435

When I put a breakpoint in the _setPosition function on the LIve demo, the function is not being called... ?

Bug in the dates filter

The dates filters are not working correctly, for example if you select from 01-01-2018 to 01-31-2018 , then only dates from 01-02-2018 to 01-30-2018 show up on the table.

CORS data access blocked with URL provided to allow access

Using Chrome extension for Allow-Control-Allow-Origin:

From Vaadin demo Site:
XMLHttpRequest cannot load https://em2db.demo.vaadin.com/db_0e7ab06211/. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'https://wc.demo.vaadin.com' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.

From polymer serve:
XMLHttpRequest cannot load https://em2db.demo.vaadin.com/db_9e5c96a3b0/. A wildcard '*' cannot be used in the 'Access-Control-Allow-Origin' header when the credentials flag is true. Origin 'http://localhost:8080' is therefore not allowed access. The credentials mode of an XMLHttpRequest is controlled by the withCredentials attribute.

server.js fails on WebStorm 12 EAP with node version 3.8.0

HoonsMBPRetina:server hoonchung$ npm --version
3.8.0
HoonsMBPRetina:server hoonchung$ pwd
/Users/hoonchung/Documents/WebstormProjects/PolymerJSProjects/vaadin-expense-manager-demo-master/server
HoonsMBPRetina:server hoonchung$ node server.js
/Users/hoonchung/Documents/WebstormProjects/PolymerJSProjects/vaadin-expense-manager-demo-master/server/server.js:2
(() => {
^
SyntaxError: Unexpected token )
at exports.runInThisContext (vm.js:69:16)
at Module._compile (module.js:432:25)
at Object.Module._extensions..js (module.js:467:10)
at Module.load (module.js:349:32)
at Function.Module._load (module.js:305:12)
at Function.Module.runMain (module.js:490:10)
at startup (node.js:124:16)
at node.js:807:3
HoonsMBPRetina:server hoonchung$

The demo chart expands with every refresh

Tested against Firefox 39.0 on a wide screen.

The chart on the right side of the screen gets bigger and bigger whenever the window (viewport) is resized or it refresh itself with new data.

Fresh bower install conflicts

Hi All - if you wipe out your bower_components and do a bower install there are multiple conflicts.

Also may I ask if / when this will be a 2.0 version?

Adding an expense receipt fails and buttons become unresponsive

Started up Expense Manager, added it to iOS 11.3 home screen and started the app. Added an expense and tried to add a receipt. Instead of showing the receipt it just shows bordered label "Receipt". Save, Cancel nor Delete buttons work. See attached video.
img_8370 trim

File upload not working

Tried both, the file picker & drag n drop. Does not upload the file. Tried on Linux using Chromium and Firefox

Visual Improvements

  • Edit Dialog should be full-screen (mobile)
  • Buttons for closing dialog should be always visible instead of having to scroll (mobile & desktop) (#89)
  • Top bar exceed viewport in mobile. Title should be hidden, and elements width adjusted.
  • Dialogs should be cancellable by escape or outside click (desktop)
  • In mobile expense list is not easy to scroll, frozen column is not necessary, and we could shift merchant and total columns.

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.