81c3463816
The enforcing of the derivation path editing rules is done in a structured way by handling all the changes on the array of `Element` stored in d.elements and then recomposing the HTML string to be displayed after every change. Main limitation is the workaround in `onTextChanged` that regenerates the text in order to dismiss foreign characters introduced by pasting which I couldn't find a way to disable without disabling also the ability to copy content to clipboard. Highlights: - Implement DerivationPathInput control that intercepts the modifiable keyboard events in order to edit the visible TextEdit.text while respecting the requirements of the derivation path editing - Implement a JS Controller that handles the logic of the decomposing and recomposing the derivation path string - Add anew StatusQ with the TextEdit basic look and feel to be used in DerivationPathInput control without duplicating the style - Allow passing modifiable events that are not generating characters in order to allow copy to clipboard - Disable add account when control is in error state - Limit to maximum 5 elements in the derivation path Testing: - Integrate the control with StoryBook for a quick preview of the control - Add unit tests for the Controller basic functionality and regression for the main control Item - Removed forcing x64 architecture on apple arm64 hardware from the storybook build configuration Note: initially the implementation was suppose to be simple parse the derivation path string edit elements and format it. However, I could not find a quick way fix the circular dependency issue between editing the text and reformatting it. The solution was to use a one way from the structured data to the formatted string which complicates the implementation logic. Closes: #9890 |
||
---|---|---|
.. | ||
doc | ||
include/StatusQ | ||
sandbox | ||
sanity_checker | ||
scripts | ||
src | ||
tests | ||
.gitmodules | ||
CHANGELOG.md | ||
CMakeLists.txt | ||
README.md | ||
StatusQSources.cmake |
README.md
StatusQ
An emerging reusable QML UI component library for Status applications.
Usage
StatusQ introduces a module namespace that semantically groups components so they can be easily imported. These modules are:
- StatusQ.Core
- StatusQ.Core.Theme
- StatusQ.Core.Utils
- StatusQ.Components
- StatusQ.Controls
- StatusQ.Layout
- StatusQ.Platform
- StatusQ.Popups
Provided components can be viewed and tested in the sandbox application that comes with this repository. Other than that, modules and components can be used as expected.
Example:
import Status.Core 0.1
import Status.Controls 0.1
StatusInput {
...
}
Viewing and testing components
To make viewing and testing components easy, we've added a sandbox application to this repository in which StatusQ components are being build. This is the first place where components see the light of the world and can be run in a proper application environment.
Using Qt Creator
The easiest way to run the sandbox application is to simply open the provided CMakeLists.txt
file using Qt Creator.
Using command line interface
To run the sandbox from within a command line interface, run the following commands:
$ git clone https://github.com/status-im/StatusQ
$ cd StatusQ
$ git submodule update --init
$ ./scripts/build
Once that is done, the sandbox can be started with the generated executable:
$ ./build/sandbox/Sandbox