trezor / trezor-suite

Trezor Suite Monorepo
https://trezor.io/trezor-suite
Other
720 stars 250 forks source link

Discreet mode #6937

Closed Nodonisko closed 1 year ago

Nodonisko commented 1 year ago

Discreet mode what will blur exact values - like in desktop.

Requirements:

  1. Should use jotai (preffered) or context API

  2. Usage must be super easy:

    <DiscreetValue><CryptoAmountFormatter value={something} /></DiscreetValue>

    It must simple like this, no hardcoding width/height/position for every usage etc. Just wrap any component in it and it will blur it when turned on.

  3. Skia usage is preferred https://shopify.github.io/react-native-skia/docs/mask-filters#blurmask (not sure if it will work but you can wrap whole Skia canvas in standart view and set it's opacity to something like 0.7. Then you should position it to overlay it any component wrapped in )

  4. Can be placed in @suite-native/atoms

juriczech commented 1 year ago

@Nodonisko I think jotai might not be the best choice for this in the end as it seems to struggle a little bit with multiple packages and since this will have to be passed down nearly everywhere, I think it might be better solution to add this to settingsReducer in the mobile app.

Nodonisko commented 1 year ago

What do you mean by "struggle with multiple packages"?

juriczech commented 1 year ago

When I tried it with account graph points, it wasn't updating the value in useAtom / useAtomValue. I can try it and see and then we can always opt out to use redux.

Nodonisko commented 1 year ago

That sounds strange it must work without any issues no matter if it's different package or not. Otherwise whole library will useless because you won't be able to use in any 3rd party library.

bosomt commented 1 year ago

QA OK

tested in Samsung Tablet. Version 7e43b20 - [develop] - feat(fastlane): Small improvements for local build (#7193)