io-app icon indicating copy to clipboard operation
io-app copied to clipboard

chore(Cross): [IOAPPX-206] Add dynamic card effect based on device rotation

Open dmnplb opened this issue 1 year ago • 2 comments

[!important] This PR depends on:

  • ~https://github.com/pagopa/io-app/pull/5954~ (merged and reverted)
  • https://github.com/pagopa/io-app/pull/6123

Short description

This PR adds a new card with dynamic light whose movement is based on the rotation of the device. The goal is to make light appear to reflect on the card just as it appears in the real world. The current implementation is based on the value exposed by the useAnimatedSensor method provided by the reanimated library.

List of changes proposed in this pull request

  • Add the new DSDynamicCardRotation screen
  • Add relative assets

Preview

https://github.com/user-attachments/assets/943ee38a-023f-4d77-9f00-06a298cc7de0

How to test

  1. Launch the app in a physical device (not simulator)
  2. Go to the Dynamic card based on device rotation page and try to rotate the device

dmnplb avatar Apr 23 '24 15:04 dmnplb

Affected stories

  • ⚙️ IOAPPX-206: Effetto della card basato sui valori dei sensori del dispositivo subtask of

Generated by :no_entry_sign: dangerJS against b764c4ebae45eafbb37bfc5c3f790d43889c6f67

pagopa-github-bot avatar Apr 23 '24 15:04 pagopa-github-bot

Codecov Report

Attention: Patch coverage is 17.85714% with 69 lines in your changes missing coverage. Please review.

Project coverage is 47.06%. Comparing base (4f204b4) to head (b764c4e). Report is 524 commits behind head on master.

Files with missing lines Patch % Lines
...tures/design-system/core/DSDynamicCardRotation.tsx 17.85% 69 Missing :warning:
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5715      +/-   ##
==========================================
- Coverage   48.42%   47.06%   -1.36%     
==========================================
  Files        1488     1770     +282     
  Lines       31617    35853    +4236     
  Branches     7669     8542     +873     
==========================================
+ Hits        15311    16875    +1564     
- Misses      16238    18912    +2674     
+ Partials       68       66       -2     
Files with missing lines Coverage Δ
ts/features/design-system/navigation/navigator.tsx 17.64% <ø> (-5.22%) :arrow_down:
ts/features/design-system/navigation/routes.ts 100.00% <ø> (ø)
...tures/design-system/core/DSDynamicCardRotation.tsx 17.85% <17.85%> (ø)

... and 1341 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 992c4c7...b764c4e. Read the comment docs.

codecov[bot] avatar May 02 '24 09:05 codecov[bot]