Commit Graph

15 Commits

Author SHA1 Message Date
Alex Jbanca 97da863d70 fix: Use StatusSynthaxHighlighter to format the hyperlinks in the chat input
1. Move the hyperlinks formatting from qml to c++ (StatusSynthaxHighlighter)
2. Update StatusChatInputPage
3. Update tests
2023-11-10 15:55:48 +02:00
Stefan ccd8c5b65f feat(wallet) Wallet Connect integration prototype
Implement a prototype of integrating [WalletConnect Web SDK]()

- integrate WalletConnect Web SDK using Node.js and packing it using
  [webpack](https://webpack.js.org/guides/getting-started/)
  - this way, we achieve the same versioning strategy for the SDK
- add WalletConnectSDK view
  - it is used to load the web SDK via a WebView (validated working on
  Mac and Windows)
- add new app dependency of WebView QT
  - also update vendor packages `Dotherside` and `nimqml` to add
    required WebView::initialize API used to initialize the WebView
    integration at the app start
- add WalletConnectPage to Storybook for quick prototyping
  - Also add dependency for WebView Qt lib
- index.js is the wrapper used to provide a simple stateful interface
  with the WC SDK
- Entry in ui/generate-rcc.go ensures the node_modules cache is excluded
  from the resource file

Notes:

- Added `com.apple.security.cs.allow-jit` entitlement when signing the
app package. This allows Execution of JIT-compiled Code Entitlement
required by the fast-path of the JavaScriptCore framework on MacOS
platforms.
- Keep some debugging entries expected to help debugging Linux package
- Removed outdated `DerivationPathInputRegressionTests` qml test

Closes #12301
2023-10-30 09:29:33 +01:00
Alex Jbanca 0a857cbf9c fix: Preserve the previous cursor position on `undo/redo` in StatusChatInput 2023-10-24 17:04:14 +03:00
Igor Sirotin e5b68e8823
fix: messaging settings and url unfurling fixes (#12457)
* remove browser selection setting
* remove main whitelist settings. replace tenorGif setting with gifUnfurlingEnabled
* remove old unfurling
* move history nodes section
* disable outdated e2e tests step
* remove isGifWidgetEnabled setting
* fix: StatusMessage height when gif unfurling disabled

---------

Co-authored-by: Anastasiya Semenkevich <anastasija.ig@gmail.com>
2023-10-18 10:03:32 +01:00
Michał Cieślak 8a996a9175 feat(Storybook): Add tests runner available from the app 2023-10-16 13:37:08 +02:00
Michał Cieślak cd870a2e56 chore(Storybook): Rename qml-tests dir 2023-10-16 13:37:08 +02:00
Alex Jbanca 424da13346 chore: fix StatusChatInput tests
Updating the `Undo` test that compares the `Undo` done in StatusChatInput with a standard TextEdit component.
Undo/Redo feature was changed by https://github.com/status-im/status-desktop/pull/12262. Now we're using a custom undo/redo logic and the undo is more granular as opposed to TextEdit.
2023-10-14 00:09:48 +02:00
Alex Jbanca 2c5039f7d3 chore: Fix or skip Storybook qml tests 2023-10-11 16:42:00 +03:00
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