status-desktop/storybook
Lukáš Tinkl 46b81b30a6 feat: [UI - Wallet Stability] Create Max button component
- create a reusable "Max" send button component
- use it in SwapModal and SendModal
- add some more tests in tst_SwapInputPanel.qml

Fixes #15066
2024-06-12 17:08:56 +02:00
..
pages feat: [UI - Wallet Stability] Create Max button component 2024-06-12 17:08:56 +02:00
qmlTests feat: [UI - Wallet Stability] Create Max button component 2024-06-12 17:08:56 +02:00
src feat(@desktop/wallet): Integrate recurring onramp providers in Recurrent tab 2024-06-04 11:09:59 +02:00
stubs feat: [UI - Wallet Stability] Create Max button component 2024-06-12 17:08:56 +02:00
tests chore(Storybook): Exclude DirectoryFilesWatcher from PagesModel, add tests 2023-10-16 13:37:08 +02:00
CMakeLists.txt chore(storybook) load WalletConnect SDK in storybook by QRC for now 2024-05-20 15:09:57 +02:00
README.md
StoryBook.pro
cachecleaner.cpp
cachecleaner.h
directorieswatcher.cpp
directorieswatcher.h
directoryfileswatcher.cpp chore(Storybook): Exclude DirectoryFilesWatcher from PagesModel, add tests 2023-10-16 13:37:08 +02:00
directoryfileswatcher.h chore(Storybook): Exclude DirectoryFilesWatcher from PagesModel, add tests 2023-10-16 13:37:08 +02:00
figmaio.cpp
figmaio.h
figmalinks.cpp
figmalinks.h
figmalinksmodel.cpp
figmalinksmodel.h
main.cpp feat(wallet) run WebEngineView as a service in background 2023-11-27 22:54:11 +01:00
main.qml feat(settings) blur background when re-encrypting due to password change 2024-03-19 13:18:56 +01:00
modelutils.cpp
modelutils.h
pagesmodel.cpp chore(Storybook): Exclude DirectoryFilesWatcher from PagesModel, add tests 2023-10-16 13:37:08 +02:00
pagesmodel.h chore(Storybook): Exclude DirectoryFilesWatcher from PagesModel, add tests 2023-10-16 13:37:08 +02:00
sectionsdecoratormodel.cpp feat(Storybook): reflect pages model changes in sections decorator model 2023-10-02 11:17:56 +02:00
sectionsdecoratormodel.h feat(Storybook): reflect pages model changes in sections decorator model 2023-10-02 11:17:56 +02:00
storybook-resources.qrc chore(storybook) load WalletConnect SDK in storybook by QRC for now 2024-05-20 15:09:57 +02:00
systemutils.cpp feat(wallet) Wallet Connect integration prototype 2023-10-30 09:29:33 +01:00
systemutils.h feat(wallet) Wallet Connect integration prototype 2023-10-30 09:29:33 +01:00
testsrunner.cpp feat(Storybook): Open tests dir from the app 2023-10-16 13:37:08 +02:00
testsrunner.h feat(Storybook): Open tests dir from the app 2023-10-16 13:37:08 +02:00
validator_main.cpp fix: Log storybook page validator errors 2024-05-20 13:38:04 +03:00

README.md

Building Storybook

For regular usage of Storybook it's enough to open status-desktop/storybook/CMakeLists.txt in QtCreator. Please do not use StoryBook.pro which is intended for WebAssembly builds. Please make sure that selected run target is Storybook.

Building Storybook with Webassembly and Qt 5.14

Configuring the environment

Install Emscripten v1.38.27

# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

#go to emsdk folder
cd emsdk

#install Emscripten v1.38.27
./emsdk install emscripten-1.38.27

#activate emscripten-1.38.27
./emsdk activate emscripten-1.38.27

#install Fastcomp backend
./emsdk install fastcomp-clang-tag-e1.38.27-64bit

#activate Fastcomp backend
./emsdk activate fastcomp-clang-tag-e1.38.27-64bit

#add emsdk tools to env variables
#this can be done by following instructions received from previous activate command
#there are two options:

#1. Configure the env variables for the current shell only:
source emsdk_env.sh

#2. Configure the env variables using the shell startup script:
echo 'source "[path to emsdk folder]/emsdk_env.sh"' >> $HOME/.zprofile

#WARNING: this will configure the environment to use the emsdk compiler
#Ex:"which clang" command will now point to the emscripten clang instead of the system clang
#to disable the env configuration comment the source command added earlier in ~/.zprofile

#check environment
#python needs to be installed. The emsdk scripts state that it should work with pyton 2 and 3
#make sure python command can be resolved
which python
em++ --version
emcc --version
#clang should point to fastcomp-clang-tag-e1.38.27-64bit
which clang
which clang++

More documentation: https://emscripten.org/docs/getting_started/downloads.html

Configure QtCreator (optional)

Newer versions of QtCreator won't support Qt5.14 with Webassembly. Latest version found to support Qt5.14 with WebAssembly is 4.14.2 Download: https://download.qt.io/archive/qtcreator/4.14/

Adding the Emscripten compilers (emcc and em++) Details here: https://doc.qt.io/qtcreator/creator-tool-chains.html

Adding Qt version 5.14: https://doc.qt.io/qtcreator/creator-project-qmake.html

Adding Qt5.14 for Webassembly kit: https://doc.qt.io/qtcreator/creator-targets.html

Open StoryBook.pro in Qt Creator and configure it using the new kit.

Qt creator might not set the env paths correctly. In this case manually set build environment variables (Projects -> 5.14.2 kit -> Build -> Build Environment -> Batch edit). Ex:

EMSCRIPTEN=~/Repos/emsdk/emscripten/1.38.27
EMSDK=~/Repos/emsdk
EMSDK_NODE=~/Repos/emsdk/node/14.18.2_64bit/bin/node
EMSDK_PYTHON=~/Repos/emsdk/python/3.9.2_64bit/bin/python3
EM_CONFIG=~/Repos/emsdk/.emscripten
LLVM_ROOT=~/Repos/emsdk/fastcomp-clang/tag-e1.38.27/build_tag-e1.38.27_64/bin
PATH=[check echo $PATH]

Running qmake (without qt Creator)

#create build folder
mkdir buildStoryBook

#go to folder
cd buildStoryBook

#run qmake (add CONFIG+=debug CONFIG+=qml_debug to qmake command for debug build)
~/Qt/5.14.2/wasm_32/bin/qmake [path to StoryBook.pro] -spec wasm-emscripten && /usr/bin/make qmake_all

#build (add -j[nb of cores] for parallel execution)
make

#run
emrun StoryBook.html