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: [PE-732] CGN header snap point on scroll #6357

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

LeleDallas
Copy link
Contributor

@LeleDallas LeleDallas commented Oct 31, 2024

Short description

This pull request updates to the CgnMerchantsListByCategory component optimizing the layout for better user experience

List of changes proposed in this pull request

  • Adaptive padding calculation determined by the count of elements in a FlatList
  • Replace deprecated component GenericErrorComponent with OperationResultScreenContent

How to test

  • Go to Portafoglio
  • Tap on CGN
  • Tap on Scopri le opportunità
  • In ts/features/bonus/cgn/screens/merchants/CgnMerchantsListByCategory.tsx replace merchantsAll with this mock data function:
const mockData = (count: number) =>
    Array.from({ length: count }, (_, i) => i.toString()).map(item => ({
      id: item,
      name: "Merchant " + item,
      imageUrl: "https://via.placeholder.com/150",
      discounts: [
        {
          id: "1",
          title: "Discount 1",
          description: "Description 1",
          discount: 10,
          discountType: "PERCENTAGE",
          discountValue: 10,
          startDate: "2021-06-01",
          endDate: "2021-06-30",
          termsAndConditions: "Terms and conditions 1",
          imageUrl: "https://via.placeholder.com/150"
        }
      ]
    }));
  • After implementing the above changes, check the header behavior within the app to ensure it is functioning correctly. Make sure that it displays properly without any layout issues on scroll.

Preview

Screen.Recording.2024-10-31.at.16.18.45.mov

@pagopa-github-bot
Copy link
Collaborator

pagopa-github-bot commented Oct 31, 2024

Affected stories

  • 🐞 PE-732: [App IO] Barra di navigazione rimane trasparente allo scroll (Android)
    subtask of
    • PE-672: CGN - Bug fixing

Generated by 🚫 dangerJS against 6a50b96

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 46.99%. Comparing base (4f204b4) to head (6a50b96).
Report is 663 commits behind head on master.

Files with missing lines Patch % Lines
...n/screens/merchants/CgnMerchantsListByCategory.tsx 0.00% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6357      +/-   ##
==========================================
- Coverage   48.42%   46.99%   -1.43%     
==========================================
  Files        1488     1815     +327     
  Lines       31617    36908    +5291     
  Branches     7669     8777    +1108     
==========================================
+ Hits        15311    17346    +2035     
- Misses      16238    19505    +3267     
+ Partials       68       57      -11     
Files with missing lines Coverage Δ
...n/screens/merchants/CgnMerchantsListByCategory.tsx 1.58% <0.00%> (-5.08%) ⬇️

... and 1441 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 c43bc0b...6a50b96. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants