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

fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show #2738

Merged
merged 6 commits into from
Jan 28, 2021

Conversation

DavideValdo
Copy link
Contributor

Short description

This was tricky, apparently we need to use JSX to make hooks work.

How to test

  1. Wallet -> Enable Cashback
  2. Wallet -> Cashback -> Your transactions
  3. Tap the CTA
Registrazione.schermo.2021-01-19.alle.19.20.59.mov

@pagopa-github-bot pagopa-github-bot changed the title [#176477833] Fixed mistake that inhibited BPD CTA to properly show fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show Jan 19, 2021
@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Jan 19, 2021

Affected stories

  • 🐞 #176477833: [trivial] mostrare il link scopri di più nel momento in cui il markdown si è caricato

Generated by 🚫 dangerJS against a1157ec

@pagopa-github-bot pagopa-github-bot changed the title fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show Jan 19, 2021
@codecov
Copy link

codecov bot commented Jan 19, 2021

Codecov Report

Merging #2738 (a1157ec) into master (4c2654f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2738   +/-   ##
=======================================
  Coverage   53.68%   53.68%           
=======================================
  Files         780      780           
  Lines       21530    21530           
  Branches     4078     4078           
=======================================
  Hits        11558    11558           
  Misses       9917     9917           
  Partials       55       55           
Impacted Files Coverage Δ
.../bpd/components/BpdTransactionSummaryComponent.tsx 75.00% <100.00%> (ø)
...s/details/transaction/BpdEmptyTransactionsList.tsx 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

@pagopa-github-bot pagopa-github-bot changed the title fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show Jan 20, 2021
@debiff debiff self-requested a review as a code owner January 27, 2021 07:48
@pagopa-github-bot pagopa-github-bot changed the title fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show Jan 27, 2021
@pagopa-github-bot pagopa-github-bot changed the title fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show Jan 28, 2021
const [CTAVisibility, setCTAVisibility] = React.useState(false);

const setCTAVisible = () => setCTAVisibility(true);
const setCTAVisible = () =>
setTimeout(() => setCTAVisibility(true), SHOW_CTA_DELAY);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
setTimeout(() => setCTAVisibility(true), SHOW_CTA_DELAY);
setCTAVisibility(true);

We can avoid the usage of a setTimeout here, I tested the solution with the direct call of a setState and it actually works

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thisisjp If we remove setTimeout the CTA will actually be visible a fraction of a second before the content appears, but we get better code readibility, is this ok with you?

Copy link
Contributor

Choose a reason for hiding this comment

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

no problem at all, thanks ;)

@pagopa-github-bot pagopa-github-bot changed the title fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show fix(Bonus Pagamenti Digitali): [#176477833] Fixed mistake that inhibited BPD CTA to properly show Jan 28, 2021
@CrisTofani CrisTofani merged commit 86f3404 into master Jan 28, 2021
@CrisTofani CrisTofani deleted the 176477833-fixed-bpd-CTA-not-showing branch January 28, 2021 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants