Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [IOBP-488] Refactor bonus features to remove cross feature dependencies #5397

Merged
merged 14 commits into from
Jan 15, 2024

Conversation

mastro993
Copy link
Contributor

@mastro993 mastro993 commented Jan 12, 2024

Short description

This PR is preparatory to the removal of the legacy code associated with SiciliaVola, Cashback and Bonus Vacanze features.
It consists of a major refactoring of the bonus feature, removing cross dependency between features, and a relocation of some of the components used in the IO app.

List of changes proposed in this pull request

  • Refactored bonusReducer, moved it outside bonusVacanze feature folder
  • Moved features/bonus/bonusVacanze/models/RemoteValue to common/models/RemoteValue
  • Moved features/bonus/bonusVacanze/components/buttons/* components to components/buttons/*
  • Moved features/bonus/bonusVacanze/components/loadingScreenComponent/LoadingErrorComponent to components/LoadingErrorComponent
  • Moved features/bonus/bonusVacanze/components/markdown/* to components/markdown/*
  • Moved features/bonus/bonusVacanze/components/FooterTopShadow to components/FooterTopShadow

How to test

All tests should solve correctly, app should build correctly on all platforms

@pagopa-github-bot pagopa-github-bot changed the title [IOBP-488] Refactor bonus features to remove cross feature dependencies chore: [IOBP-488] Refactor bonus features to remove cross feature dependencies Jan 12, 2024
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jan 12, 2024

Affected stories

  • ⚙️ IOBP-488: Refactoring: rimozione dipendenze da flussi Cashback, Bonus Vacanze e SiciliaVola
    subtask of
    • IOBP-276: [B&P] Manutenzione codice

Generated by 🚫 dangerJS against eb284d3

@mastro993 mastro993 added IO-Bonus e pagamenti IO - Bonus e pagamenti 💀 Dead matter Graphic assets or chunks of code that are no longer referenced or needed labels Jan 12, 2024
@mastro993 mastro993 marked this pull request as ready for review January 12, 2024 13:19
@mastro993 mastro993 requested a review from a team as a code owner January 12, 2024 13:19
Copy link

codecov bot commented Jan 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6b76845) 47.30% compared to head (eb284d3) 47.30%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5397   +/-   ##
=======================================
  Coverage   47.30%   47.30%           
=======================================
  Files        1641     1645    +4     
  Lines       34330    34330           
  Branches     8388     8388           
=======================================
  Hits        16241    16241           
  Misses      18031    18031           
  Partials       58       58           
Files Coverage Δ
ts/common/model/RemoteValue.ts 88.88% <ø> (ø)
ts/components/FooterTopShadow.tsx 100.00% <ø> (ø)
ts/components/LoadingErrorComponent.tsx 100.00% <ø> (ø)
ts/components/PinCreationForm.tsx 86.79% <ø> (ø)
ts/components/buttons/ButtonConfigurations.ts 100.00% <ø> (ø)
ts/components/buttons/FooterStackButtons.tsx 84.61% <ø> (ø)
ts/components/error/WorkunitGenericFailure.tsx 83.33% <ø> (ø)
ts/components/markdown/FooterTwoButtons.tsx 83.33% <ø> (ø)
ts/components/screens/LogoutScreen.tsx 28.57% <ø> (ø)
.../components/wallet/OutcomeCodeMessageComponent.tsx 95.45% <ø> (ø)
... and 208 more

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 6b76845...eb284d3. Read the comment docs.

import variables from "../../../../theme/variables";
import { StyleSheet, View } from "react-native";
import variables from "../theme/variables";
import { IOStyles } from "./core/variables/IOStyles";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the one exported from @pagopa/io-app-design-system instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! See 76dab28

Copy link
Contributor

@forrest57 forrest57 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested on both IOS and Android, with full CGN flow and all seems well, I say LGTM!
after the changes suggested by @CrisTofani, sorry 😓

@mastro993 mastro993 force-pushed the IOBP-488-remove-cross-dependency-for-bonus-features branch from ae5d337 to 76dab28 Compare January 12, 2024 15:03
Copy link
Contributor

@hevelius hevelius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Tested on

  • FCI
  • Payment
  • Add new Payment Method CC

@mastro993 mastro993 merged commit dfc75ab into master Jan 15, 2024
7 checks passed
@mastro993 mastro993 deleted the IOBP-488-remove-cross-dependency-for-bonus-features branch January 15, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💀 Dead matter Graphic assets or chunks of code that are no longer referenced or needed IO-Bonus e pagamenti IO - Bonus e pagamenti
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants