Commit Graph

7 Commits

Author SHA1 Message Date
Igor Sirotin aefa2b9f48
fix(StatusQ): StatusQ is QML module (#10207)
* StatusQ QML module
* qzxing is static lib again
* updated StatusQ resources
* fixed Emoji lookup
* added display to tests-imports ci
2023-04-14 11:18:56 +03:00
Stefan 34c04f0af6 fix(Wallet) fix DerivationPathInput allow custom partial path
The non-standard derivation path was not allowed to be entered so paths
with custom indexes were not allowed.
Also implemented warning for non-ethereum coin
Added more tests for the new specifications
Other minor improvements and fixes

Closes #10135
2023-04-05 18:48:15 +04:00
Stefan 81c3463816 feat(wallet): implement DerivationPathInput control
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
2023-03-31 18:14:50 +04:00
Michał Cieślak 95d29c76f9 fix(Storybook): Register StatusQ types for Storybook/qmlTests
Closes: #9690
2023-03-02 11:33:37 +01:00
Alex Jbanca 6cba8810e0 Fix Mentions in statusChatInput
1. Don't allow mention invalidation by altering mention with mouse or keyboard
2. Don't allow mention duplication on the same position
3. Clean mentions after text with mentions changes
4. Fix mention selection
5. Make sure mention is separated by text with valid separators (we're using only space)
6. Cursor will consider the mention as an object and will jump over it as it would be a single character (placing cursor inside leaves room for mention invalidation)
2022-12-21 12:23:39 +02:00
Alex Jbanca 3059631226 Add qml tests for StatusChatInput
Test parts of the working functionality
2022-12-19 10:11:53 +02:00
Alex Jbanca b414a829e8 Adding qml tests to storybook
+ dummy StatusChatInput test
2022-12-08 15:31:43 +02:00