This is the first step in refactoring the NetworkFilter, by cleaning the base component that handles the check states.
This component supports multiple configurations:
1. Single selection with or without radio button
2. Multiple selection with or without checkbox
3. Automatic handling of the check state. The component will change the check state based on user clicks
4. Manual handling of the check state. The component will not change the check state, but offers a toggled signal and expects the user to change the check state based on external flows
+ Fix minor bugs
- Some NIM's models define additional (not part of the
QAbstractModelItem API) method rowData to allow access to model's data
on UI side
- The same job can be done relying fully on public QAbstractModelItem
API using ModelUtils utility. It gives full transparency if we need
nim's model or other like ListModel replacement in tests/storybook
- propagate `tokensStore` to unbreak the Browser's wallet menu
Fixes#14805
Major changes:
- Don't allow empty network selection. End up using the nim model
directly instead because of individual row changes issues
encountered with nim models
- Made the clone model a generic implementation to be used in other
places where we need to clone a model: ReceiveModal,
AddEditSavedAddressPopup
- Use cloned model as alternative to NetworksExtraStoreProxy in
ReceiveModal
- Added tristate support to our generic checkbox control
- UX improvements as per design
- Fix save address tests naming and zero address issue
- Various fixes
Notes:
- Failed to make NetworkSelectPopup follow ground-truth: show partially
checked as user intention until the network is selected in the
source model. Got stuck on nim models not being stable models and
report wrong entry change when reset. Tried sorting and only updating
changes without reset but it didn't work.
- Moved grouped property SingleSelectionInfo to its own file from
an inline component after finding out that it fails to load on Linux
with error "Cannot assign to property of unknown type: "*".".
It works on MacOS as expected
Closes: #10119