Giter Club home page Giter Club logo

lisk-desktop's Introduction

Logo

Lisk Desktop

Build Status Coverage Status License: GPL v3 GitHub package.json version DeepScan grade GitHub issues GitHub closed issues

Installation

You can download the latest release from Lisk.com. The link automatically detects your operating system and downloads the correct app. Currently we are supporting the following operating systems:

  • MacOS (individual builds for Apple Silicon and Intel chips)
  • Windows
  • Linux

For Contributors

Please see CONTRIBUTING_GUIDE.md for more information.

Development

Using Commercial Fonts

Basier Circle and Gilroy used in the production version are commercial fonts. This repository only contains open fonts and uses Open Sans as a replacement for the commercial ones.

If you have licensed copies of Basier Circle and Gilroy, you can add them to fonts folder. If you don't have the fonts, you need to remove lines 25 - 81 of type.css. After that, the build and dev yarn scripts run without any errors.

Setup environment

The development environment currently depends on:

Note: For Windows users, make sure to set the correct msvs_version config for installing and packing the Lisk Desktop application.

git clone https://github.com/LiskHQ/lisk-desktop.git
cd lisk-desktop
nvm use
yarn --cwd app && yarn
yarn run dev

Open http://localhost:8080 to access the wallet.

Build

Production build

To build the project simply run

yarn run build

Under the hood, this script runs

yarn run build:prod

to build the React app under src/ and

yarn run build:electron

to build the electron app under app/ using webpack. You can run the above scripts individually if you're looking to see the changes solely on one of the two said applications.

Run Electron

If you have already built the application as described above, you can launch Electron using

yarn run start

Run with parameters

To launch a version which supports hardware wallets, you can run

yarn run dev:hw

or to launch electron and receive live updates from already running webpack-dev-server on port 8080 and you can run

LISK_DESKTOP_URL="http://localhost:8080" DEBUG=true yarn run start

This comes with Redux dev tools.

How to use the Ledger hardware wallet

Please see HARDWARE_WALLET_DEVELOPMENT.md for more information.

Distribution

Windows

Build package for Windows (on Windows in Git BASH).

yarn run pack:win

macOS

Build package for macOS (on macOs)

yarn run pack

Linux

Build package for Linux (on Linux).

yarn run pack

Testing

Unit tests

Single run

yarn run test

Run each time a file changes

yarn run test:live

Directory Layout

Note: The following layout structure may not appear exactly as shown below due to the legacy code/features. However, this is the layout that we try to follow:

โ”œโ”€โ”€ .husky/                        # Contains a pre commit hook which checks that files are prettified before committing.
โ”œโ”€โ”€ app/                           # Electron based application that launces the react app.
โ”œโ”€โ”€ build/                         # Build specific materials.
โ”œโ”€โ”€ coverage/                      # Results of Jest test coverage.
โ”œโ”€โ”€ dist/                          # Platform specific built outputs.
โ”œโ”€โ”€ docs/                          # Project documentation such as contribution guides and development guidelines.
โ”œโ”€โ”€ libs/                          # Modules which can be consumed individually in other projects.
โ”‚   โ”œโ”€โ”€ hardwareWallet/            # HardwareWallet integrations.
โ”‚   โ”œโ”€โ”€ wcm/                       # Wallet connect.
โ”œโ”€โ”€ node_modules/                  # 3rd-party libraries and utilities.
โ”œโ”€โ”€ setup/                         # The top most application layer, contains MainRouter and globally imported css files.
โ”‚   โ”œโ”€โ”€ config/                    # Automation scripts (Webpack configurations, i18n scanner, etc.).
โ”‚   โ”œโ”€โ”€ react/                     # React presentational components are located here.
โ”‚   โ”‚   โ”œโ”€โ”€ app/                   # The bootstrap React application.
โ”‚   โ”‚   โ”œโ”€โ”€ assets/                # Static files (images, fonts, etc.).
โ”œโ”€โ”€ src/                           # Application source code.
โ”‚   โ”œโ”€โ”€ const/                     # Static configurations and other values used throughout the application.
โ”‚   โ”œโ”€โ”€ locales/                   # Contains the built localization files.
โ”‚   โ”œโ”€โ”€ modules/                   # Divided logic in domain specific areas, an example structure is shown below.
โ”‚   โ”‚   โ”œโ”€โ”€ hardwareWallet/        # Module/Domain.
โ”‚   โ”‚       โ”œโ”€โ”€ __fixtures__/      # Contains mock data for the hardwareWallet module.
โ”‚   โ”‚       โ”œโ”€โ”€ components/        # Components related to the hardwareWallet domain.
โ”‚   โ”‚       โ”œโ”€โ”€ hooks/             # Hooks related to the hardwareWallet domain.
โ”‚   โ”‚       โ”œโ”€โ”€ store/             # Redux encapsulated logic related to the hardwareWallet domain.
โ”‚   โ”‚           โ”œโ”€โ”€ actions/       # HardwareWallet actions.
โ”‚   โ”‚           โ”œโ”€โ”€ selectors/     # HardwareWallet selectors.
โ”‚   โ”‚           โ”œโ”€โ”€ reducers/      # HardwareWallet reducers.
โ”‚   โ”‚       โ”œโ”€โ”€ utils/             # Utils used in the hardwareWallet module. Global utils should be put in src/utils.
โ”‚   โ”œโ”€โ”€ redux/                     # Contains the root reducer, all other reducers are imported here. It also has legacy pattern, selectors, and actions (these should now be encapsulated in its specific module).
โ”‚   โ”œโ”€โ”€ routes/                    # Contains all routes in the application as well as modals.
โ”‚   โ”‚   โ”œโ”€โ”€ routes.js              # Route and modal paths with metadata. This object is used in all our links.
โ”‚   โ”‚   โ”œโ”€โ”€ routesMap.js           # Maps components to routes, this is used in the MainRouter.js.
โ”‚   โ”œโ”€โ”€ service/                   # Add services, such as mock services.
โ”‚   โ”œโ”€โ”€ theme/                     # Themed components (Button, Input, etc.).
โ”‚   โ”œโ”€โ”€ utils/                     # Global utility functions used throughout the app.
        โ”œโ”€โ”€ i18n/                  # Localization setup.
โ””โ”€โ”€e2e/                            # E2E tests written with Playwright and Cucumber; also some helpers used by unit tests that live in /src.

Contributors

See contributors section.

License

Copyright ยฉ 2016-2024 Lisk Foundation

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

lisk-desktop's People

Contributors

alepop avatar balanced02 avatar bmaggi-lisk avatar colado avatar dependabot[bot] avatar efefefef avatar eniolam1000752 avatar faival avatar fchavant avatar francoilol avatar gadjacobs avatar greenkeeper[bot] avatar ikem-legend avatar karmacoma avatar manugowda avatar massao avatar michaeltomasik avatar mohammadmoaddab avatar nazgolze avatar oskarleonard avatar reyraa avatar rferro avatar rukayatsalami avatar shuse2 avatar slaweet avatar soroushm avatar sridharmeganathan avatar usamahameed avatar vibratious avatar yasharayari 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

lisk-desktop's Issues

Implement redesign of transactions component

It should look like the screenshot with these exceptions:

  • "Reference" column should be omitted because that data field comes wiht Lisk Core 1.0.0.
  • filter part can be a different issue.

screen shot 2017-11-14 at 11 01 08

Add unit tests to uncovered utilities

Expected behaviour

  • All of the modules should have unit tests
  • All of the modules should follows best practices

Actual behaviour

Currently some utility modules don't have any unit tests and some of the don't follow best practices. here is a list of them:

  • externalLinks
  • notifications
  • ipcLocale
  • socketShim

Set up karma-coverage check

Expected behaviour

Our CI should not pass with insufficient test coverage. We should use karma-coverage check to set thresholds for whole the project and individual files. In this task, we can use excludes and overrides for files that don't have reasonable test coverage (~80-90%) and create subsequent tasks to improve test coverage of those files.

Long term we should aim for test coverage >90% for each file.

Actual behaviour

Jenkins passes regardless of test coverage.

Add autoprefixer to webpack config

Expected behaviour

We should have some browser prefixes for some css features.This lets us to have same styles in all modern browsers.

Actual behaviour

We don't have them in our current version.

Steps to reproduce

  1. Add postcss autoprefixer plugin to the project.
  2. Add autoprefixer to our postcss configs in webpack config file and it will automatically add browsers prefixes to our css files.

Update Register and SetSecondPassphrase to use MultiStep component

Expected behaviour

We want to implement/update Register and SetSeconPassphrase components using MultiStep component. in order to do so we have to update Passphrase component and subcomponents.

Actual behaviour

Presently we use in-component conditions to render multiple steps of passphrase generation

Change saved accounts to save on login

Expected behaviour

  • Account should be saved when user logs in or creates a new account.
  • It should no longer display a toast when the account is saved.
  • It should make sure that the account is saved not saved multiple times if already saved.
  • The button mentioned below should be removed.

Actual behaviour

There is a button in account switcher to save the current account

Implement the account visual

Expected behaviour

Each account should have a visual which is

  • significantly different from visuals of other accounts, so users can tell accounts apart
  • has the same look and feel across accounts

Actual behaviour

There is no account visual

Implement redesign of menu and layout

Should look like this, except for top right elements:

  • Search will be implemented later when lisk-service product is available
  • Account has a separate ticket
    wallet_wrapper

Adjust css to our styleguide

Expected behaviour

All css should follow our style guide

Actual behaviour

Currently there are still some styles that are not following our best practises, e.g. there are missing variables, not enough nesting etc

Steps to reproduce

Look e.g. at the account/header component and look through the style guide

Add filters for transaction component

Expected behaviour

All these filter should work
screen shot 2017-11-22 at 12 07 48

If "Other" is too much work due to missing corresponding API endpoint, then it can be separated into another ticket.

Actual behaviour

We currently have no filters

Implement launch protocol for changing network

Expected behaviour

It should be possible to switch between mainnet, testnet and a custom node with URL search params using network keys from https://github.com/LiskHQ/lisk-wallet/blob/rebranding/src/constants/networks.js
The following options should be supported:

  • ?network=mainnet
  • ?network=testnet
  • ?network=customNode&address=http://localhost:4000 (where address is any valid address)

Network select and address input on login page should be removed because for the vast majority of users it is an unnecessary clutter.

Actual behaviour

There is a network select and address input on login page.

Implement timed lock of the account

Expected behaviour

  • Account should lock (forget passphrase) after 10 minutes from the last time the passphrase was used.
  • The remaining time should be displayed in the top right header.

Actual behaviour

Account stays unlocked as long as user is logged in.

Create custom basic UI components (Button, Input..)

In this ticket, the components (Button, Input, IconButton, Table) should be just wrappers of react-toolbox elements so that we can use them in all redesigned components. There will be another ticket to do the styles.

Apply basic typography rules to all component

Expected behaviour

  • All e2e tests should pass after applying new typography rules.
  • New component should follow semantic HTML and use basic typography rules

Actual behaviour

  • Transaction component CSS rules news some tweaks
  • Some e2e tests fail because of styling issues

Steps to reproduce

  • See src/components/transactions/transactions.css
  • Run e2e tests

Ignore case when e2e testing the text of elements

Expected behaviour

Text case is a design aspect and it doesn't affect the functionality of the components. Desired is that we do not take the test case into account while testing the inner text of elements.

Actual behaviour

Presently e2e tests expect LOGOUT and SENDEN while the new design shows them as Logout and Send. same is true for any other inner text of the elements.

Steps to reproduce

Change the value of LOGOUT to Logout and run the e2e tests.

Implement redesign of voting

Will be done in these parts:

  • Implement redesign of delegate list view #155
  • Implement redesign of delegate vote dialog #156
  • Implement filters of delegate list #215
  • Implement S breakpoint of delegates list #216
  • Implement S breakpoint of voting #217

Implement multiple unlocked accounts

Expected behaviour

Following #42 it should be possible to keep multiple accounts unlocked.
In other words, switching accounts should not log out of the first account.

Actual behaviour

Only one account can be unlocked (passphrase saved in redux store) at a time.

Avoid duplicate logic for saved accounts in localStorage and redux

Expected behaviour

saved accounts actions should only save to redux. localStorage should be updated based on what is in redux. There should be only two operations with localStorage: load data to redux and store data from redux. The first should happen on launch, the second on each change of saved accounts in redux.

Actual behaviour

CRUD operations on saved accounts are done twice: in redux and localStorage

Implement the dashboard

This should be tackled in the following subtasks:

  • Implement layout and latest activity of dashboard #131
  • Implement basic currency graph for dashboard #132
  • Implement advanced features of currency graph for dashboard #133

Create redesigned account component

It should look like this:

  • if the timeout is too time-taking to implement, delegate in to another ticket.
  • the ... floating icon should not be implemented here, but as part of #9

screen shot 2017-11-14 at 11 08 54

Implement edit mode in redesigned account switcher

Expected behaviour

The edit mode should allow to:

  • Remove account with a confirmation step
    04_favorite_ids- -favorite-ids-multi-remove-dashboard-lisk-xl

The drag and drop of accounts will be done in another ticket #52

Actual behaviour

After #9 the account switcher will not have the edit mode and remove will have no confirmation step.

Create initial set of common css files

We intend to create a set of CSS files including:

  • variables.css:
    This files includes variables for:

    • Font sizes
    • Sizes (box dimensions, border details, ...)
    • Colors
    • Z-Indexes ( in order to ensure the gap of required z-indexes for different elements like modal, alerts, custom menus, etc)
    • Margins
    • Paddings
    • Box properties (shadows, etc.)
    • Media Queries
  • mixins.css
    As name suggests, preserved for CSS mixins.

  • type.css
    As name suggests, includes typographical rules

  • .global.css
    Our common rules must go here.
    These rules must consist of only app related and positioning/visibility rules

Use icon font from designers

Expected behaviour

Icon font with icons from Taikonauten should be added to the project.

Actual behaviour

We don't have the icon font with icons from Taikonauten

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.