Commit Graph

1453 Commits

Author SHA1 Message Date
Alex Jbanca 9410de4286 fix(StatusQ): Fixing crash when the source model is a nim model
Nim models are crashing when calling `itemData`. A workaround for this is to re-implement the `itemData` calls in the writableModel.
2024-01-17 10:14:56 +02:00
Sale Djenic e115d5e7ce refactor(wallet): show qr popup updated to meet new ui requirements
Show Qr popup is partially refactored because of the two things:
- to meet new UI requirements (introduced in the new saved addresses design)
- to make usage of that popup more generic, that it can be easily used from different places
2024-01-16 18:36:30 +01:00
Lukáš Tinkl 6f3a180f41 feat: Emit notifications when an asset/collectible is hidden in the settings
- emit the signal from the backend
- trigger the toast notification in QML
- update the test(s)

Fixes #12704
2024-01-16 14:00:11 +01:00
Lukáš Tinkl 263ed2a822 feat: Add Advanced settings in new Advanced Tab
... under Settings/Wallet/Manage Tokens

- rename Tokens List tab to Advanced tab
- introduce a new `CurrencyAmountInput` component, backed by
`FormattedDoubleProperty` C++ class (plus the respective SB page)
- use `FastExpressionFoo` for the collectibles views as well

Fixes #12611
Fixes #13040
2024-01-11 14:52:52 +01:00
Michał Cieślak e053d267f0 fix(StatusQ): FastExpressionSorter's test fixed for mac
Threshold for acceptable accesses has been increased but also
additional check regarding roles has been introduced to ensure
expected behavior.

Closes: #13181
2024-01-11 13:35:05 +01:00
Jesse Guo 9f2443f5e6 Update StatusWindowsTitleBar.qml 2024-01-10 10:46:38 -05:00
Jesse Guo 4195935f77 Update StatusWindowsTitleBar.qml
signal should be closed
2024-01-10 10:46:38 -05:00
Alex Jbanca 56f194c96c fix: Updates based on comments 2024-01-09 20:20:04 +02:00
Alex Jbanca 6da897e733 StatusQ: Adding WritableProxyModel
WritableProxyModel is a QAbstractProxyModel that allows you to modify the data without modifying the source model.
It is useful for implementing a "dirty" state for a model, where you can modify the data and then commit the changes
to the source model.

Supported features (reimplemented):
- setData
- setItemData
- removeRows
- insertRows
- moveRows (TODO)
- toVariantMap
- to be continued...
2024-01-09 20:20:04 +02:00
Michał Cieślak 56493fa5e1 feat(StatusQ): Faster version of SFPM's ExpressionSorter
Provides FastExpressionSorter component compatible with
SortFilterProxyModel. In comparison to original ExpressionSorter it allows
to define which role values should be provided to the expression's
context and improves performance significantly.

Closes: #13062
2024-01-09 13:47:47 +01:00
Michał Cieślak a6cf37278c feat(StatusQ): Faster version of SFPM's ExpressionFilter
Provides FastExpressionFilter component compatible with
SortFilterProxyModel. In comparison to original ExpressionFilter it allows
to define which role values should be provided to the expression's
context and improves performance significantly.

Closes: #13063
2024-01-09 13:47:47 +01:00
Michał Cieślak a2aedb5c6a chore(StatusQ): Generic TestModel excluded to a separate file
Closes: #12843
2024-01-05 13:34:45 +01:00
Michał Cieślak 57ee01b239 chore(StatusQ): ListModelWrapper excluded to a separate file 2024-01-05 13:34:45 +01:00
Sale Djenic df8e74feec feat(savedaddresses): make save addresses list as per design (without search logic)
Closes #13090
2024-01-04 17:45:57 +01:00
Sale Djenic ff9062a1b0 feat(savedaddresses): update adding saved address popup to match new design
Implemented:
- adding selection color section
- all input field validations
- interactions within the popup
- an ephemeral notification when adding an address

Closes #13089
2024-01-04 17:45:57 +01:00
Sale Djenic bc2642c5e8 fix(@desktop/wallet): display short address form in the wallet settings account order page 2024-01-04 13:57:13 +01:00
Lukáš Tinkl e2fa5b756a feat(CollectiblesView): Add combobox/popup with custom filtering options
.. to filter by community or collection name

- make the HistoryView own filter button look like the other combos
- fix some cosmetic issues for StatusCombo in small/secondary mode
- fix StatusBaseInput bg color in dark mode (was invisible)
- update CollectiblesViewPage with options to include regular and/or
community collectibles

Fixes #12969
Fixes #12948
2024-01-04 12:32:41 +01:00
Boris Melnik c89032d0ea fix(images-formats): Remove .heif and .tif(f) from supported formats
Fixes: #13077
2023-12-22 14:04:47 +03:00
Michał Cieślak fbe6cc95d1 feat(StatusQ): Ability to change sources in LeftJoinModel
- ability to change left/right models
- improved handling of model deletion
- base class changed to QAbstractListModel, dataChanged signal
  emision improved

Closes: #12912
2023-12-21 14:19:10 +01:00
Michał Cieślak 6fe2067c22 fix(ConcatModel): Changed behavior on submodel destruction to not emit signals
The general rule should be to avoid any actions on destruction different
than setting relevant pointers to null. Other actions like emiting
signals are potentially dangerous when the whole objects hierarchy is
under destruction.

Closes: #13065
2023-12-21 14:11:14 +01:00
Michał Cieślak 1c4a936833 feat(StatusQ): Faster version of SFPM's ExpressionRole
Provides FastExpressionRole component compatible with
SortFilterProxyModel. In comparison to original ExpressionRole it allows
to define which role values should be provided to the expression's
context. This approach improves performance significantly in most cases.

Closes: #13047
2023-12-20 23:16:09 +01:00
Michał Cieślak 480673d8be feat(StatusQ): Test utility for tracking qt model access 2023-12-20 23:16:09 +01:00
Michał Cieślak 6ab6e4a26e feat(Storybook): Test library for common testing utils
StatusQ's test/CMakeLists.txt refactored:
- created library target for common test utils
- removed outdated cmake commands like add_definitions
- qml tests renamed from TestStatusQ to QmlTests
- qml test files made visible in QtCreator
- linking simplified
- unneeded cmake files removed from src dir

Closes: #13031
2023-12-19 10:41:42 +01:00
Michał Cieślak e8b1df696c chore(StatusQ): Qml unit tests file names unified/simplified 2023-12-19 10:41:42 +01:00
Lukáš Tinkl fe3b442155 (wallet) implement sorting for assets/collectibles views
- add the sort combobox to assets/collectibles main wallet view pages
- preserve the current view settings
- add the possibility to navigate/drill down into wallet settings
(sub)subsection
- some other minor changes/fixes

Note: currently assets can't be sorted by "1W change" and collectibles
by "Date added" due to missing backend for these

Fixes #12517
Fixes #12518
2023-12-18 10:52:48 +01:00
Lukáš Tinkl abe23c7f92 fix(StatusImage) blurry rendering due to wrong sourceSize
Fixes #12991
2023-12-12 13:00:53 +01:00
Michał Cieślak fd638de880 fix(StatusQ/ConcatModel): Handle source submodel reset properly, tests amended
Closes: #12974
2023-12-11 17:28:27 +01:00
Alexandra Betouni 7ee3b0bb57 fix(ActivityCenter): Notification title is cut when long
* Added wrapMode in Text

Closes #12870
2023-12-06 17:07:35 +02:00
Mikhail Rogachev d77d049203
Hotfix: add include in ConactModel for Apple clang (#12954) 2023-12-06 21:06:08 +07:00
Lukáš Tinkl d7614beb99 feat(token mgmt): update main wallet view layout with community assets
- update the CollectiblesView.qml view and delegates according to the
latest design
- add CollectiblesView to Storybook
- add new section for Community Collectibles
- (re)use the community badge with tooltip and link action to take the
user to the respective community
- add Community Collectibles info icon + popup
- create context menu for token delegates with actions
(Send/Receive/Manage tokens/Hide)
- add confirmation popups when hiding a single or all community tokens
- emit a toast bubble after hiding the token(s)
- fix eliding the community name inside ManageTokensCommunityTag
- some smaller fixes/cleanups

Fixes #12519
2023-12-06 11:18:36 +01:00
Michał Cieślak e2fa702ec4 feat(StatusQ): QML-oriented proxy model concatenating source models vertically
Closes: #12682
2023-12-05 22:45:08 +01:00
Michał Cieślak a915f48fd9 fix(StatusQ): check if role exists in ModelUtils::contains
Without the check, asking for not existing role led to segfault.
2023-12-05 22:45:08 +01:00
Mykhailo Prakhov 02589421bb
feat(desktop/communities): show community users which will be automatically joined after the ownership change in the All Members tab (#12928) 2023-12-04 20:14:13 +01:00
Noelia c2bfc6b8f4 feat(SQ/Aggregator): Created utility `Aggregator`
- Abstract class created: `Aggregator`
- Derived abstract class created: `SingleRoleAggregator`
- Derived class created:  `SumAggregator`
- `Storybook` page created.
- Added unit tests.

Closes #12685
2023-12-01 18:57:01 +01:00
Lukáš Tinkl 3b60506460 feat(token mgmt): update main wallet view layout with community assets
- update the AssetsView.qml view and delegates according to the latest
design
- add AssetsView to Storybook
- add new section for Community Assets
- (re)use the community badge with tooltip and link action to take the
user to the respective community
- add Community Assets info icon + popup
- create context menu for token delegates with actions
(Send/Receive/Manage tokens/Hide)
- add confirmation popups when hiding a single or all community tokens
- emit a toast bubble after hiding the token(s)
- plus related controller/backend methods for handling the
settings-related actions
- some smaller fixes/cleanups

Fixes #12369
Fixes #12372
2023-11-29 16:13:08 +01:00
Stefan 5b9e4faa8a feat(wallet) run WebEngineView as a service in background
This is required to control the resource consumption in case of no
usage of wallet connect
Hence we load the WebEngineView only if we have active pairings and
such that SDK events are expected from the paired dapps.

Also:

- Moved the generic WebEngineView communication bridge to StatusQ
- Added basic tests for WebEngineLoader
- Add a way to know when wallet is loaded (`walletReady`)
- Add storybook support for mock of nim sections as context properties

Updates: #12639
2023-11-27 22:54:11 +01:00
Alex Jbanca f96460ead7 fix: Fix LeftJoinModel tests on Qt 5.15.8 2023-11-27 15:52:39 +02:00
Lukáš Tinkl 0dbbea383d fix(chat): Emoji is html-encoded in message reply
revert to previous behavior, we want RichText even though we really
don't :)

Fixes #12786
2023-11-27 12:46:18 +01:00
Lukáš Tinkl 88d0c2493e fix: supported image formats are case sensitive
check for the (supported) extension in case insensitive manner

Fixes #12835
2023-11-25 15:51:06 +01:00
Lukáš Tinkl db8cb6c74c fix: Misaligned profile image in chat header
align the left padding with the chat contents; reapply the needed extra
margin for the back button

Fixes #12859
2023-11-25 14:52:54 +01:00
Michał Cieślak 4d1806a656 fix(StatusQ): run all unittests via make and on CI
Closes: #12841
2023-11-24 23:32:08 +01:00
Jonathan Rainville d66540d74f feat(messages): add deleted system message that tells who deleted
Fixes #11712
2023-11-23 16:14:54 -05:00
Lukáš Tinkl fdc36b72e6 fix(Windows): unbreak Windows build
a feeble attempt to make M$ compiler grok otherwise valid C++17 code
2023-11-23 14:32:27 +01:00
Lukáš Tinkl 8791d028e6 feat: Integrate the new manage assets/collectibles panels into Settings
- display a customized floating bubble to save/apply the settings
- display a toast message on Apply with an action to jump to Wallet main
page
- add home/end/pgup/pgdown keyboard shortcuts to StatusScrollView to be
able to navigate more easily in long list views
- some smaller fixes and cleanups in wallet and settings related views

Fixes https://github.com/status-im/status-desktop/issues/12762
2023-11-22 18:29:31 +01:00
Alexandra Betouni 77197040a4 fix(StatusImage): Improved sourcesize width/height
Closes #10139
2023-11-22 17:33:13 +02:00
Stefan a87a11f92f fix(tests) fix UI tests when run from scratch
The STATUSQ_SHADOW_BUILD will allow loading the qml files from sources

The StatusQ dependency helps building StatusQ which is used for C++
helpers

Updates #12639

ghstack-source-id: cbe0a994e7
Pull Request resolved: https://github.com/status-im/status-desktop/pull/12787
2023-11-20 20:38:19 +01:00
Lukáš Tinkl ba30afd202 feat: Manage Collectibles panel UI component & model
- implements a QML panel to organize collectibles
- factors out the delegates to separate files to be reusable with the
Assets tab
- adds QML tests to assess the UI functionality (move, show/hide, save/load)
- does not cover the problematic "Arrange by collection" switch (TBD
later)

Fixes: https://github.com/status-im/status-desktop/issues/12379
2023-11-17 14:12:48 +01:00
Anthony Laibe 98207381da fix(@wallet): toast ui url add extra space 2023-11-17 12:18:57 +01:00
Jonathan Rainville d66c1f7b0d feat(sharding): add shard info args to requestCommunityInfo calls
Fixes #12015
2023-11-16 13:32:48 -05:00
Lukáš Tinkl 81d99c44e9 fix: workaround to crash on startup with Qt 5.15.11
the most recent Qt upstream version introduced a regression that causes
our app to crash right on startup when a grouped property is assigned to
inside a `PropertyChanges` handler

upstream issue: https://bugreports.qt.io/browse/QTBUG-107795

Upstream fix will be released with Qt 5.15.12, code being at
https://codereview.qt-project.org/c/qt/qtdeclarative/+/424702
2023-11-14 18:11:42 +01:00