pagopa / io-app

IO, l'app dei servizi pubblici
https://io.italia.it
European Union Public License 1.2
617 stars 105 forks source link

chore(Cross): [IOAPPX-422] Replace the legacy markdown renderer with `IOMarkdown` #6445

Open dmnplb opened 4 days ago

dmnplb commented 4 days ago

Short description

This PR removes any legacy markdown renderer in favour of IOMarkdown

List of changes proposed in this pull request

Preview

CiePinScreen

|Old|New| |-|-| |![Old](https://github.com/user-attachments/assets/1b0a9e5e-855a-43aa-b118-31b44591701f)|![New](https://github.com/user-attachments/assets/7b565de4-29ac-42e6-b5be-3808b719dc32)|

FciDocumentsScreen

|Old|New| |-|-| |![FciDocumentsScreen_old](https://github.com/user-attachments/assets/132fc6aa-03ee-4735-b60b-4eb066561b24)|![FciDocumentsScreen_new](https://github.com/user-attachments/assets/bd3433db-4e80-436f-83d0-d758c7b32b98)|

EycaInformationComponent

|Old|New| |-|-| |![EycaInformationComponent_old](https://github.com/user-attachments/assets/8ff1c974-4619-4a99-96ee-5e60ae761793)|![EycaInformationComponent_new](https://github.com/user-attachments/assets/abbb1221-4c9d-4413-8cdd-8a0a79eca702)|

InitiativeDetailsScreen

|Old|New|New| |-|-|-| |![InitiativeDetailsScreen_old](https://github.com/user-attachments/assets/a2739339-c64d-4c72-bbb6-99ed13d2b7ac)|![InitiativeDetailsScreen_new_0](https://github.com/user-attachments/assets/ff90f8a9-bb65-43ba-9516-234072cc8467)|![InitiativeDetailsScreen_new_1](https://github.com/user-attachments/assets/a35806fb-2371-4c31-a80e-629ce7279ffd)|

RootedDeviceModal

|Old|New| |-|-| |![RootedDeviceModal_old](https://github.com/user-attachments/assets/903c6296-3f93-4bd7-87b2-215c7570ea2b)|![RootedDeviceModal_new](https://github.com/user-attachments/assets/cbab64e7-46ff-423c-bd9b-9e84fa3efe82)|

ShareDataFeatureInfos

|Old|New| |-|-| |![Simulator Screenshot - iPhone 16 Pro - 2024-11-26 at 13 44 06](https://github.com/user-attachments/assets/eb374795-4096-420c-8636-9c28bebaa0aa) | ![Simulator Screenshot - iPhone 16 Pro - 2024-11-26 at 13 48 00](https://github.com/user-attachments/assets/04624c68-f16e-4e5a-ab6b-f2c0ec09d9b9) |

ManualConfigBottomSheet

|Old|New| |-|-| | ![Simulator Screenshot - iPhone 16 Pro - 2024-11-26 at 13 44 53](https://github.com/user-attachments/assets/3bb687a5-d440-46e3-8b80-947de4181e86) | ![Simulator Screenshot - iPhone 16 Pro - 2024-11-26 at 13 48 13](https://github.com/user-attachments/assets/6a08f1f0-76e7-4a33-b6dd-7a9330513d1c) |

InitiativeRulesInfoBox

|Old|New| |-|-| | ![InitiativeRulesInfoBox_old](https://github.com/user-attachments/assets/8d12068c-971e-464f-a12d-b41fd1a20264)|![InitiativeRulesInfoBox_new](https://github.com/user-attachments/assets/73c88640-31ea-4394-becd-f7a6bc79a5ad)|

PDNDPrerequisitesScreen

|Old|New| |-|-| |![PDNDPrerequisitesScreen_old](https://github.com/user-attachments/assets/4d11211d-486b-42ba-bcba-e73f5abd1c82)|![PDNDPrerequisitesScreen_new](https://github.com/user-attachments/assets/6b1af002-ecf9-4cc0-b4ac-2e89ed1baf8d)|

Authors

@Vangaorth @adelloste @dmnplb

How to test

All affected sections have been tested and related screenshots are linked in this PR. Assuming that IOMarkdown is a fully working component, either statically check that the edited code makes sense or, using the io-dev-api-server, verify that every impacted screen/component/bottom-sheet renders properly

pagopa-github-bot commented 4 days ago

Affected stories

Generated by :no_entry_sign: dangerJS against 862a62bfe01d7df3ddc8bc5c847b596305fb85b1

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 33.33333% with 24 lines in your changes missing coverage. Please review.

Project coverage is 48.04%. Comparing base (4f204b4) to head (862a62b). Report is 795 commits behind head on master.

Files with missing lines Patch % Lines
ts/components/IOMarkdown/customRules.tsx 21.42% 11 Missing :warning:
...le/components/services/ManualConfigBottomSheet.tsx 16.66% 5 Missing :warning:
...ces/details/components/CardWithMarkdownContent.tsx 0.00% 3 Missing :warning:
...omponents/detail/eyca/EycaInformationComponent.tsx 50.00% 2 Missing :warning:
...screens/valid/EuCovidCertMarkdownDetailsScreen.tsx 0.00% 1 Missing :warning:
...pay/onboarding/screens/InitiativeDetailsScreen.tsx 0.00% 1 Missing :warning:
...eatures/messages/saga/handleMessagePrecondition.ts 0.00% 1 Missing :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/pagopa/io-app/pull/6445/graphs/tree.svg?width=650&height=150&src=pr&token=zsurlZdPFW&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa)](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) ```diff @@ Coverage Diff @@ ## master #6445 +/- ## ========================================== - Coverage 48.42% 48.04% -0.39% ========================================== Files 1488 1624 +136 Lines 31617 32487 +870 Branches 7669 7392 -277 ========================================== + Hits 15311 15608 +297 - Misses 16238 16834 +596 + Partials 68 45 -23 ``` | [Files with missing lines](https://app.codecov.io/gh/pagopa/io-app/pull/6445?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) | Coverage Δ | | |---|---|---| | [...s/euCovidCert/screens/EuCovidCertExpiredScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2FeuCovidCert%2Fscreens%2FEuCovidCertExpiredScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvZXVDb3ZpZENlcnQvc2NyZWVucy9FdUNvdmlkQ2VydEV4cGlyZWRTY3JlZW4udHN4) | `100.00% <100.00%> (+12.50%)` | :arrow_up: | | [...s/euCovidCert/screens/EuCovidCertRevokedScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2FeuCovidCert%2Fscreens%2FEuCovidCertRevokedScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvZXVDb3ZpZENlcnQvc2NyZWVucy9FdUNvdmlkQ2VydFJldm9rZWRTY3JlZW4udHN4) | `92.30% <100.00%> (-7.70%)` | :arrow_down: | | [...CovidCert/screens/valid/EuCovidCertValidScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2FeuCovidCert%2Fscreens%2Fvalid%2FEuCovidCertValidScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvZXVDb3ZpZENlcnQvc2NyZWVucy92YWxpZC9FdUNvdmlkQ2VydFZhbGlkU2NyZWVuLnRzeA==) | `60.34% <ø> (-2.56%)` | :arrow_down: | | [ts/features/fci/hooks/useFciAbortSignatureFlow.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2Ffci%2Fhooks%2FuseFciAbortSignatureFlow.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvZmNpL2hvb2tzL3VzZUZjaUFib3J0U2lnbmF0dXJlRmxvdy50c3g=) | `65.00% <ø> (ø)` | | | [...dpay/details/components/InitiativeRulesInfoBox.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2Fidpay%2Fdetails%2Fcomponents%2FInitiativeRulesInfoBox.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvaWRwYXkvZGV0YWlscy9jb21wb25lbnRzL0luaXRpYXRpdmVSdWxlc0luZm9Cb3gudHN4) | `30.00% <ø> (ø)` | | | [...rding/components/OnboardingDescriptionMarkdown.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2Fidpay%2Fonboarding%2Fcomponents%2FOnboardingDescriptionMarkdown.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvaWRwYXkvb25ib2FyZGluZy9jb21wb25lbnRzL09uYm9hcmRpbmdEZXNjcmlwdGlvbk1hcmtkb3duLnRzeA==) | `33.33% <ø> (+19.04%)` | :arrow_up: | | [...pay/onboarding/screens/PDNDPrerequisitesScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2Fidpay%2Fonboarding%2Fscreens%2FPDNDPrerequisitesScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvaWRwYXkvb25ib2FyZGluZy9zY3JlZW5zL1BETkRQcmVyZXF1aXNpdGVzU2NyZWVuLnRzeA==) | `9.52% <ø> (-7.15%)` | :arrow_down: | | [...let/identification/screens/cie/ItwCiePinScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2Fitwallet%2Fidentification%2Fscreens%2Fcie%2FItwCiePinScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvaXR3YWxsZXQvaWRlbnRpZmljYXRpb24vc2NyZWVucy9jaWUvSXR3Q2llUGluU2NyZWVuLnRzeA==) | `12.82% <ø> (ø)` | | | [.../messages/components/Home/PreconditionsContent.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2Fmessages%2Fcomponents%2FHome%2FPreconditionsContent.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvbWVzc2FnZXMvY29tcG9uZW50cy9Ib21lL1ByZWNvbmRpdGlvbnNDb250ZW50LnRzeA==) | `100.00% <100.00%> (ø)` | | | [...features/messages/screens/MessageDetailsScreen.tsx](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree&filepath=ts%2Ffeatures%2Fmessages%2Fscreens%2FMessageDetailsScreen.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa#diff-dHMvZmVhdHVyZXMvbWVzc2FnZXMvc2NyZWVucy9NZXNzYWdlRGV0YWlsc1NjcmVlbi50c3g=) | `82.00% <100.00%> (+2.45%)` | :arrow_up: | | ... and [17 more](https://app.codecov.io/gh/pagopa/io-app/pull/6445?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) | | ... and [1671 files with indirect coverage changes](https://app.codecov.io/gh/pagopa/io-app/pull/6445/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/pagopa/io-app/pull/6445?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/pagopa/io-app/pull/6445?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa). Last update [c1373e2...862a62b](https://app.codecov.io/gh/pagopa/io-app/pull/6445?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pagopa).