Commit Graph

94 Commits

Author SHA1 Message Date
Honza Rychnovský 16bf1afa90
[#947] About screen UI/logic/tests
* [#947] About screen UI (partially implemented)

* [#947] About screen UI

* [#947] Fixed failing test case

* [#947] Added Zashi text logo

---------

Co-authored-by: Honza Rychnovský <rychnovsky.honza@gmail.com>

* [#947] UI: About Screen

* [#1005] Remove DebugMenu from Home screen

- The new design does not require it on the Home screen
- Partially moved to the Settings and About screens

* [#392] Update About screen texts

Closes #392 as not needed now

* [#1006] Enhance VersionInfo with other fields

* [#947] About screen UI + logic + tests

* Adopt VersionInfo on different screens

* VersionInfo test

Update .gitignore

---------

Co-authored-by: Venkat-corebts <143575548+Venkat-corebts@users.noreply.github.com>
2023-10-17 15:56:04 +02:00
Honza Rychnovský e871c4eb45
[#941] Opening screen + Load animation
* [#941] Loading screen UI

Co-authored-by: Honza Rychnovský <rychnovsky.honza@gmail.com>

* Fix unallowed doubled scroll

* Remove duplicate icon

* [#997] Splash alignment with welcome animation

* [#999] Compile SDK version 34

* [#1000] Colour system bars

* [#941] Load + Opening screens

- Contains UI of both these screens
- Their logic
- And the Load screen animation
- Designed util ScreenHeight composable
- Redesigned SecondaryButton to match the design and fixed its positioning on different screens

---------

Co-authored-by: Venkat-corebts <143575548+Venkat-corebts@users.noreply.github.com>
2023-10-12 19:04:23 +02:00
Honza Rychnovský 57a133a12c
[#946][#993] Warning screen + button animation (#994)
* [#946] Warning screen UI

[#946] Code review changes
moved security warning to separate folder
changed main heading text style
changed static version text to dynamic

Co-authored-by: Honza Rychnovský <rychnovsky.honza@gmail.com>

* [#993] New Primary Button Click Animation

* [#946] Warning Screen [UI][Logic][Tests]

- Security Warning screen incorporated into the app onboarding logic
- NeedsWarning wallet state persisted and is required if the user re-runs next time, and the Security Warning screen still needs to be presented
- Privacy Policy opened by part of the screen text clicking in an external web browser app
- Unit tests
- UI tests
- Screenshot tests

---------

Co-authored-by: Venkat-corebts <143575548+Venkat-corebts@users.noreply.github.com>
2023-10-10 12:41:17 +02:00
Honza Rychnovský e4d744fc98
[#975] Post Core BTS UI changes
- PrimaryButton centered horizontally on all screen
- Compose Preview switched to light theme on all screens as Zashi supports light theme only
- Closes #975
2023-10-04 16:01:40 +02:00
Venkat-corebts 705386e031
[#948] Updated Settings screen UI
* [#948] Updated Settings screen UI

* [#948] Crash fix on settings screen

* Center button UI components text

So the text aligns with the center when the button is displayed on a very small device or, e.g., when the system accessibility text size increase feature is used.

* Keep button spacing

When rotated to landscape, the weighted spacing disappears. But we ideally want buttons to have all the same spacing around them in this scenario.

* Kotlin code style

* Move previous settings option to overflow

- As the new design prescribes no debug/test options in the settings screen, we moved these useful actions into the only troubleshooting menu in the app bar.
- Tests added

* Add UI tests

* Text in all caps in the components

Rather than enforcing all caps in translations.

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-09-28 14:17:21 +02:00
Venkat-corebts 3bababb0a6
Added Checkbox changed Primary button and TextField (#957)
* Added Checkbox changed Primary button and TextField

* Did code refactoring

* Moved colors and dimens to ZcashTheme color and dimens files

* Changed color resource for Primary button

* Added buttonShadowColor to ExtendedColors

---------

Co-authored-by: Venkatareddy Seelam <45472390+venkatAmigo@users.noreply.github.com>
2023-09-04 11:05:26 +02:00
Honza Rychnovský 54e522090a
[#951] Add Archivo font
* [#951] Add Archivo font

- Font added
- License documentation file updated
- This slightly changes the provided font accessibility. Both Inter and Archivo are now available with the `ZcashTheme.typography` API.
- Closes #951

* Update license documents
2023-08-30 10:36:31 +02:00
Honza Rychnovský 6ec3c95914
[#915] Black and white color themes
* [#915] Black and white color themes

- Simplified color model to just black and white colors
- Reworked send fab button to a regular primary button
2023-08-07 14:52:24 +02:00
Honza Rychnovský 01b24f47ed
[#914] Rectangle shapes 2023-08-04 13:01:16 +02:00
Honza Rychnovský 3c751a5893
[#917] Use Inter font 2023-08-03 16:02:51 +02:00
Alex fc7321e049
[#664] Transaction History List
* [#664] Transaction history

* Move under the screens folder

* Fix Request screen Preview

* Add TODO link

* Improve Text design component

* HistoryView UI enhancing

* Adopt ZcashCurrency API

* Add transaction history sync state

* Compact time format

* Bump Compose Material Icons to v1.5.0-beta02

* Add support for pending and expired transactions

* Add progress in syncing with no transaction yet

* Screenshot test

* Simplified no transaction check

* Transaction history manual test case

* Home screen history button test

* Fix flow collecting

* View tests

* Sent transaction sign

* Remove unused transaction snapshot from VM

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-07-04 13:24:07 +02:00
Honza Rychnovský a71ea7577d
[#873] Detekt enhance
* [#873] Detekt - consider MaxLineLength rule on

* [#882] Detekt Compose 0.1.10

* [#872] Detekt 1.23.0
2023-06-19 08:59:00 +02:00
Carter Jernigan 8045df9e6d [#818] Androidx updates 2023-05-10 05:52:41 -04:00
Honza Rychnovsky cb98cc048f
[#808] Use Dimens Across App
* [#808] Use Dimens across the app

- Shorter Onboarding screen design enhanced

* Shorter New Wallet Backup screen UI enhanced

* Home screen UI enhance

* Seed screen UI enhance

* Link SendArgumentsWrapper issue

* Move custom buttons paddings to PaddingValues

- Optional Modifier parameter should have a default value of Modifier
- Thanks to this we introduced the outerPaddingValues parameter to all our buttons with default paddings
- Also notice the difference between e.g. ShortOnboardingView and ShortNewWalletBackupView. In the backup, we have the bottom button to be part of Scaffold’s bottomBar, which is maybe a better pattern than stretching the buttons with spacers in case of part of the screen content view, but it has also its tradeoffs.

* Settings screen enhance

* Support screen UI enhance

* About screen UI enhance

* Scan screen UI enhance

- Move modifiers to the caller’s side
- Match texts to predefined styles
- Add color to Small text component + reorder parameters

* Send screen UI enahnce

- Lifted out some modifiers arguments to the caller’s side
- Fixed button’s horizontal paddings

* Scan move BackHandler to Android class

* Update screen UI enhance

* Receive screen UI enhance

* Address screen UI enhance

* Ignore AndroidUpdate back action test

- Will be refactored soon

* Remove TODO as already implemented

* Restore screens UI enhance

* Create UpdateViewAndroidTest

* [#807][Design system] Remove deprecated Paddings

* [#705] Instrumentation coverage generation fails locally

* [#808] Use Dimens across the app

- Shorter Onboarding screen design enhanced

* Shorter New Wallet Backup screen UI enhanced

* Home screen UI enhance

* Seed screen UI enhance

* Link SendArgumentsWrapper issue

* Move custom buttons paddings to PaddingValues

- Optional Modifier parameter should have a default value of Modifier
- Thanks to this we introduced the outerPaddingValues parameter to all our buttons with default paddings
- Also notice the difference between e.g. ShortOnboardingView and ShortNewWalletBackupView. In the backup, we have the bottom button to be part of Scaffold’s bottomBar, which is maybe a better pattern than stretching the buttons with spacers in case of part of the screen content view, but it has also its tradeoffs.

* Settings screen enhance

* Support screen UI enhance

* About screen UI enhance

* Scan screen UI enhance

- Move modifiers to the caller’s side
- Match texts to predefined styles
- Add color to Small text component + reorder parameters

* Send screen UI enahnce

- Lifted out some modifiers arguments to the caller’s side
- Fixed button’s horizontal paddings

* Scan move BackHandler to Android class

* Update screen UI enhance

* Receive screen UI enhance

* Address screen UI enhance

* Ignore AndroidUpdate back action test

- Will be refactored soon

* Remove TODO as already implemented

* Restore screens UI enhance

* Create UpdateViewAndroidTest

* [#807][Design system] Remove deprecated Paddings

* Address review comments
2023-04-04 14:21:18 +02:00
Honza Rychnovsky 5296dc5ea9
[#791] Add Scan To Send
* [#791] Add Scan Button To Send Screen

- Switched Send.Form screen input fields ordering to match the MFP design
- Added Scan button to Send.Form
- Changed navigation to pass the scanned result to the Send.Form screen
- Added leading and trailing icons to FormTextField component
- Created SendArgumentsWrapper to pass any future Zcash URL parsed parameters

* Report invalid address scanned

- Merged composes to provide snackbar after invalid address scanned

* Add SendView tests

- Added one for scanner click and one for initial send arguments inserted
- This led to input and check amount and memo as part of the SendArgumentsWrapper too to have it prepare for future Zcash URI parsing

* Static analysis warnings fixes

* Don't make camera feature required

- And hide the scanner button on Send.Form when any camera is not supported by the device

* Let SendArgumentsWrapperFixture use SDK fixtures

* Tweak hint text

We need better text, but this is at least more correct than the previous iteration.

* Replace assertTextContains with assertTextEquals

- To compare inputs texts to an exact match to avoid potentially missing bugs if there is extra text in the field that we're not expecting

* Fix ktlint warning

---------

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2023-03-30 09:58:20 +02:00
Honza Rychnovsky 0c0bf8cb34
[#785] Remove press-and-hold from Send
* [#785] Remove press-and-hold for send confirmation

- Timed button replaced by standard behaviour button
- Related SendView test updated

* Remove unused API

If we need this back, we can restore it from the Git history.

* Remove unused imports

---------

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2023-03-20 10:17:22 +01:00
Honza Rychnovsky d37310a935
[#789] Fix Send Screen Layout
* [#804][Design system] Paddings - Dimens

- Initial commit to ensure it meets our requirements
- This solution is now in parallel with a simpler existing Paddings solution
- Four spacing groups defined
- Provides a way to define default and custom spacing values
- Distinguished by screen size, but other metrics also available (e.g. orientation, aspect ratio, layout direction or screen shape)

* Fix spacing value

* Move spacings change logic to comment

- We've decided to have only one regular spacing group for now, which is suitable for most of current phone devices

* Move Dimens out of internal package

* Link TODO for later Paddings remove

* Link issue of Use Dimens across the app to TODO

* Add vertical scrolling feature to SendForm screen

* Add vertical scrolling feature to Settings screen

+ Switched from Paddings to Dimens spacing system

* Add paddings, vertical scrolling, move modifiers

- As part of this is also move modifiers to the caller side where it makes sense

* Improve Send screen layout

- Added header view to the screen
- Added spacers between some UI parts of the screen
- Fixed background colors
- And improved textfields sizes

* Link Fix ZEC balance number formatting issue

* Link Disable Memo UI field in case of Transparent address issue

* Replace all .dp with predefined Dimens spacing in SendView

* Create custom FormTextField UI component

* Re-write paddings to spacers in list
2023-03-16 15:36:06 +01:00
Honza Rychnovsky 5cfa3a99e3
[#804][Design system] Paddings - Dimens
* [#804][Design system] Paddings - Dimens

- Initial commit to ensure it meets our requirements
- This solution is now in parallel with a simpler existing Paddings solution
- Provides a way to define default and custom spacing values
- Could be distinguished by a screen size, but other metrics also available (e.g. orientation, aspect ratio, layout direction or screen shape)

* Move spacings change logic to comment

- We've decided to have only one regular spacing group for now, which is suitable for most of current phone devices

* Move Dimens out of internal package

* Link TODO for later Paddings remove

* Link issue of Use Dimens across the app to TODO
2023-03-16 13:23:55 +01:00
Honza Rychnovsky 78180ee4e8
[#790] Fix Settings screen layout
* [#790] Fix Settings screen layout

- SwitchWithLabel moved to ui-design-lib
- Internally switched from Row to ConstraintLayout
- Used paddings, which after creating and applying of Design system #611 will be refactored
- Moved Modifier definitions to the caller side, when possible
2023-03-14 08:00:36 +01:00
Carter Jernigan 4acd5d3593
[#584 ]Adopt Twitter's Compose Detekt rules
Twitter had a set of Compose rules, which have been forked into Detekt, Ktlint, and Android Lint implementations.

I see ktlint as mostly being formatting, Detekt being more for multiplatform static analysis, and Android Lint for Android-specific issues.  Android lint is slow, so I didn’t want to use it as the first choice.

I went with the Detekt implementation which can be useful if we leverage multiplatform for our Composables in the future.
2023-03-01 07:58:47 -05:00
Alex 7523619afa
[#673] process .ec files from emulator.wtf
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-02-13 08:10:32 -05:00
Carter Jernigan a7d7de0451
[#745] Set min API to 27
* Add Android min SDK API level check test

---------

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-02-09 06:47:04 -05:00
Honza Rychnovsky a9787ebeac
[#694] Ktlint 0.48.2
* [#694] Ktlint 0.48.2
2023-02-01 13:50:24 +01:00
Carter Jernigan 6e85764f74
[#346][#304] Configure Crashlytics and analytics opt-out 2023-01-26 14:12:44 -05:00
Alex b84df3d9dc
[#592] Instrumentation coverage
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2023-01-17 14:54:40 -05:00
Honza Rychnovsky a8308bd492
[#693] Ktlint 0.48.0
* Bump version 0.48.0

* Move config file to /tools

+ global suppress

* Local suppress of no-semi

* Minor indentation fix
2022-12-19 18:58:43 +01:00
Alex 9150f80b9d
implementation of push and hold to send zec (#641)
* [#249] Implement Press-And-Hold To Confirm Sending ZEC

* Remove default value for interaction source

* Rename interaction source argument

* removed dependency of ui-design-lib on sdkExtLib

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-12-02 10:54:06 +01:00
Alex 6c6339fb41
[#600]Improve UX of wallet restore screen (#671)
* [#600]Improve UX of wallet restore screen

* implemented suggestions from Geffen

* fixed test
2022-12-01 12:31:02 +01:00
Honza Rychnovsky e71c7854a9
[#642] Adopt SDK 1.10.0 API changes
* Adopt SDK 1.10.0 API changes

* Rename ShieldedSapling -> LegacySapling

* Viewing key re-derived for fix fixture value

* Changes used API for retrieving Transparent address

- Switched API DerivationTool.deriveTransparentAddress() -> Synchronizer.getLegacyTransparentAddress()
- Renamed Transparent -> LegacyTransparent

* Adds new common transaction model class

- Synchronizer.toTransactions() now works only with clearedTransactions and pendingTransactions
-Added CommonTransaction wrapper for all attributes of PendingTransaction and TransactionOverview to cover as much as possible. It's prepared for discussion about which attributes we really need and which we can omit.

* Regeneration of addresses in fixture

- Applies for both Transparent and Sapling addresses
- Fixed related test
- Added a new test for checking Transparent address abbreviation, as it also serves as a little check of the fixture address and can prevent an incorrect address change in the future

* Remove Viewing key usage from entire app

- As we agreed that the app should not access to it now
- Removed from all related places

* Change CommonTransaction to sealed class

* Comments update

* Switch SDK to 1.10.0-beta01-SNAPSHOT version

* Revert back legacy naming on Transparent and Sapling addresses

* Increased timeout limit to satisfy SDK initialization

* Remove unused import
2022-11-25 09:30:27 +01:00
Alex 33cee61601
[#593] - added illustrations for onboarding (#601)
* [#593] - added illustrations for onboarding

* fixed ScreenshotTest

* replaced welcome illustration

* fixed OnboardingViewTest

* Smart quotes

* added curly braces to if statement

* added skip button to welcome screen

* fixed onboarding test

* Delete unnecessary button click

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-10-11 11:41:05 +02:00
Alex 386b400e22
[#174]added warning screen + StorageChecker.kt (#594)
* [#174]added warning screen + StorageChecker.kt

* [#174]added warning screen + StorageChecker.kt

* added manual test

* added manual test

* resolved merge conflicts

* code review fixes

* added vector drawable

* Add units

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-10-03 15:59:09 +02:00
Carter Jernigan 45d90b7706 [#586] AGP 7.3 2022-09-22 16:06:09 -04:00
Honza Rychnovsky 32c20953f7
[#310] [Scaffold] Progress Status Circular Bar
* [#310] [Scaffold] Progress Status Circular Bar

- Added Z to Home ZECs balance
- Added USD balance text to Home
- Prepared Text extension functions for both
- Provided Zatoshi to USD conversion methods + filed related SDK conversion issue

* Update Home screen UI with progress bars

- Implemented scaffolding UI of progress bars
- Added related texts to strings

* Update Home screen UI with progress bars

- Connected some of the implemented UI elements to SDK values
- Added app update information to Home screen
- Update WalletSnapshot with progress field

* Update Home screen UI with progress bars

- Capturing and handling errors from SDK Synchronizer.
- Added related error strings.
-  Simplified Home screen UI.

* Zboto font added. Load it in runtime. Import to Typography.

* Updated ZEC sign icon.

* Draw ZEC balance with Zboto font

* Simplify Home screen balances assigning

* Switch to PercentDecimal progress representatiton

* Support different locales while working with fiat currency

* Fix bug in checking of fiat currency value

* Generalize strings to provide possibility of other fiat currencies

* Add fiat currency conversion states mechanism

* Add TODO comment with reference to follow up SynchronizerError issue

* Add WalletDisplayValues to simplify HomeView composable

* Add CurrencyConversion class for connection to Price API (and convert Zatoshi to fiat currency)

* Add basic HomeView tests

* Add basic HomeViewIntegration test

* Review changes

- Used Duration API for times
 - Allow injecting clock into currency conversion
 - Moved FiatCurrencyConversionRateState to sdk-ext-ui because I suspect that we’ll consider this to be a UI object.  I based this on the fact that current/stale cutoff values are arbitrary and probably should be the domain of the UI rather than the SDK.
 - Added some tests, although additional coverage is needed
 - Added fixtures for model objects

* Minor code refactoring

- Move UpdateInfoFixture class to fixture dir
- Remove unnecessary annotation
- Add common application context method to test suite
- Fix Test class import
- Move several WalletSnapshotFixture parameters to const fields

* Add WalletDisplayValuesTest to cover the model class.

* Fix import after changes merged

* Use the new MonetarySeparatorsFixture in related tests

* Add a few basic Zatoshi -> USD conversion tests

* Turn on core lib desugaring for sdk-ext-ui-lib module

* Make WalletDisplayValues a data class

I think there may be some instances where this can help with recomposition

* Add preference key for fiat currency

This allows us to configure reading the value with observers correctly, even if we don’t allow the user to change it right now.

* Delegate symbol and formatting to JVM

* Add tests for Locale

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-07-13 09:16:05 +02:00
Carter Jernigan 45aff80e76
[#511] Ktlint 0.46.1 2022-06-22 05:48:19 -04:00
Carter Jernigan 6540cd6bd3 [#482] Rename build-convention to build-conventions-secant
This prevents naming conflicts with included builds across multiple projects with build conventions.
2022-06-14 18:20:51 -04:00
Honza Rychnovsky 90c2fcb255
[#209] Compose dependency update
* [#209] Update Compose dependency to latest version 1.2.0-beta03

- Update dependency
- Align our integration tests with the new Compose requirements
- Add integration folder to tests, if missing
- Split integration tests, which require activity to separate classes
- Remove unnecessary custom activity for each integration app part and create one custom common activity
- Implement Downloadable fonts from Compose 1.2
- Update Third party licenses documentation
2022-06-14 08:50:55 +02:00
Carter Jernigan 020192b01e
[#439] Take light/dark screenshots
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2022-06-08 10:22:09 -04:00
Carter Jernigan 9267e75cb8
[#303] Write crash logs on external storage (#429)
- Added automatic exception logging, registered in the Application object
 - The design sends the exception to a second process, as the main process could be in a bad state when crashing. If we ever encounter problems with this design, it is easily toggleable to turn off with a boolean resource
 - Reading the process name is a bit complex on older Android versions, so we leverage a ContentProvider (which runs prior to Application.onCreate()) to get the process name
 - Added a simple logging mechanism for multiprocess and multithread log messages
 - Refactored spackle-lib into spackle-lib (multiplatform) and spackle-android-lib

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2022-05-31 12:38:02 -04:00
Carter Jernigan 4f960d5bf8
[#6] Refactor kotlinOptions to build-conventions 2022-05-17 06:06:44 -04:00
Honza Rychnovsky 665042e6d9
[#211] check for app updates
- Basic screen UI scaffolding.
- Set up communication with Google Play in-app update API.
- Mocking communication with Google Play API.
- Added unit, UI and integration tests for the in-app update screen model, util, view and viewmodel classes.
- Added mock implementation of helper AppUpdateChecker class.
- Introduced ViewModel integration test.
- Filed issue for future manual testing of implemented in-app update mechanisms after the wallet app is released on Google Play.
-  Implement FakeAppUpdateManager in AppUpdateCheckerMock instead of the ugly AppUpdateInfo instantiation - this affected the tests too.
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-05-16 13:40:50 +02:00
Carter Jernigan 3e67fda537
[#394] Kotlin 1.6.20
Also updated the Compose compiler to be compatible
2022-04-22 10:57:56 -04:00
Carter Jernigan f22586eacf [#330] Compose Material3 1.0.0-alpha08
Removed the proxy to the Material2 TextField in favor of the Material3 TextField
2022-04-06 07:56:17 -04:00
Carter Jernigan 2e42e132a2
[#231] Repackage classes to `co.electriccoin.zcash`
The sdk-ext module is not repackaged, because the SDK itself uses the cash.z.ecc.sdk package name
2022-03-08 14:05:03 -05:00
Carter Jernigan f01c855ead [#225] Refactor design to separate module
This moves the theme and common UI elements to a separate Gradle module.

This is a first step towards creating our own custom design system, as it would eventually allow hiding of Material Design from the rest of the app UI.

As part of this change, a new common utility module was created so that both the ui and ui-design modules can depend on it.
2022-02-23 15:49:03 -05:00