Giter VIP home page Giter VIP logo

canutin-desktop's People

Contributors

fmaclen avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

canutin-desktop's Issues

Multiple Prisma clients warning when running tests

warn(prisma-client) There are already 10 instances of Prisma Client actively running.
  • Needed to instantiate new PrismaClient's in some cases because the queries appear to returned cached data.
  • These additional Prisma clients were instantiated as uncachedPrisma.
  • uncachedPrisma.$disconnect() is called after using them but it doesn't seem like that is removing them correctly.

Increase coverage of unit tests for TrayMenu

Only a few of the methods in TrayMenu have unit tests, primarily due to difficulty mocking Electron's modules.

Specifically, we need tests for:

It wouldn't be a bad idea to go over the existing tests as there is probably quite a bit of room for improvement.

Also worth noting that the mocks in this test suite is printing an error to the console but it's not failing the test:

node:internal/modules/cjs/loader:936
  throw err;
  ^

Error: Cannot find module '/path/to/fake/assets/fake-image.png'
    at Function.Module._resolveFilename (node:internal/modules/cjs/loader:933:15)
    at Function.Module._load (node:internal/modules/cjs/loader:778:27)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  code: 'MODULE_NOT_FOUND',
  requireStack: []
}

It might be a good idea to break some of these tasks into separate issues and PRs.

Add UI to import CanutinFiles

  • Add Add data on the sidebar linking to a page where there would be a file chooser to select a CanutinFile.json to be imported.
  • It should validate the file before committing the changes to the DB.

Add status bar

The status bar would display:

  • Current settings
    • Currency
    • Language
  • Notices
    • Success
    • Errors
    • Warnings
    • Progress of long processes REF #38

Add Trends section

  • Show charts displaying aggregate balances over time for:
    • Net worth
    • Cash
    • Debt
    • Investments
    • Other assets
  • Charts will be stacked on top of one another.

Status Bar: auto-dismiss success notices

  • Add a progress animation to indicate the alert it's going to be dismissed automatically after a second or two.
  • Perhaps it could render a green top border that grows as time goes by.

Minimize bundle size for releases

  • The current bundle is ~100 MB
  • The biggest offender is the fact that Electron ships with Chromium
  • Since the app is meant to be run with the user's default browser we should explore ways to prevent shipping unnecessary dependencies
  • Consider migrating from Electron to Tauri

Increase resolution for tray bar icons in Windows

image

  • Icons look very low-res on hi-DPI screen resolutions in Windows.
  • Other apps in Windows use color icons for apps that run in the tray bar, might be worth using the version with blue background than the monochromatic icons we use in macOS.

Add a CSV import wizard

  • It should detect columns and add drop-downs for each one
  • The user can use the drop-downs to match each column with one of CanutinFile's types
  • Nice-to-have: add a table below the import form with a few rows of data so the user can see it as a reference when mapping the columns

Create "npm run setup" script

  • Run every step outlined in the README through a single command
  • Update .github/workflow's so they take advantage of such command
  • Update README

Reference

  1. Install Electron dependencies
% npm install
  1. Install SvelteKit dependencies
% cd sveltekit && npm install
  1. Generate Prisma's artifacts.
% cd sveltekit && npx prisma generate
  1. Create and seed a vault which will be seeded with the minimum required data (account/asset types, categories, etc).
% cd sveltekit && npx prisma migrate dev

Transactions: add section with API instructions

The Transactions page has an active API endpoint which can be interacted from outside the app with a GET request.
Should add a <Section /> (perhaps below the transactions table) with instructions on how to use it.

Example from Import page:
image

Add prompt to create or locate existing vault when the app starts

  • If a vault path is not stored in the app's settings a prompt will open when the app is opened.
  • The prompt should have 3 options:
    • Create new vault
      • Should open a save dialog window.
      • Once the user sets the path we create a copy of a blank vault at that location.
      • The server starts with that vault set.
    • Open existing vault
      • Maps to the existing behavior that triggers openVault()
    • Dismiss
      • Closes the prompt and keeps the app running in the background in an idle state.

Add Account & Asset index

  • Add the routes /accounts and /assets
  • This view will show a table with all of the accounts/assets (including those isClosed and isSold respectively)

Balance sheet: add detailed tests with seeded data

balanceSheet.test.ts.

// Check that the balanceGroups have the correct amounts after importing data
await importCanutinFile(baseURL!, 'minimum-data');
await page.reload();
expect(await page.locator('.card', { hasText: 'Cash' }).textContent()).toMatch('$0');
expect(await page.locator('.card', { hasText: 'Debt' }).textContent()).toMatch('$0');
expect(await page.locator('.card', { hasText: 'Investments' }).textContent()).toMatch('$0');
expect(await page.locator('.card', { hasText: 'Other assets' }).textContent()).toMatch('$7,571');

We should replace importCanutinFile() with databaseSeed() and add more detailed assertions (maybe in a separate test).

Form: add currency field

  • Fields such as assetBalanceStatement.value, accountBalanceStatement.cost, accountBalanceStatement.value, transaction.amount should be formatted as currency.
  • Number fields that don't need to be expressed as currencies should have monospace font-family (i.e. assetBalanceStatement.quantity)

Positive values should be in --color-greenPrimary
image

Negative values in --color-redPrimary
image

Zero should be the same shade of grey as the placeholder
image

Update SvelteKit (once again)

At least will need to settle this error:

Rename your server hook file from src/hooks.ts to src/hooks.server.ts (because there's also client hooks now). See the PR for more information: https://github.com/sveltejs/kit/pull/6586

sveltejs/kit#6586

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.