Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MBL-970] Report Project Info View (#1852)
* add new "Report This Project" row to Project overviewSubpages tableview section * navigate to ReportThisProjectInfoView * formatting * create ReportProjectInfoView * displays different reporting categories in a nested dropdown style list * some text needs to contain hyperlinks so I added helpers to make this easier. * create ReportProjectInfoView * displays different reporting categories in a nested dropdown style list * some text needs to contain hyperlinks so I added helpers to make this easier. * formatting and cleanup * make Text extension more generic * tests * formatting * add goToReportProject output test * format * only pass project url to ReportProjectInfoView * revert .pbxproj change * move model into KsApi target and replace hardcoded strings * refactor List view * List view has a bug in iOS 16 that causes expandable rows to have poor animations. My solution uses a ScrollView and a manual Expanded property instead * Also addresses the double navigation bar issues * formatting
- Loading branch information
1 parent
e0657bf
commit ae5ef71
Showing
190 changed files
with
417 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+5.66 KB
(110%)
...ect_USUser_NonUSLocation.projectLocation_UK_userCurrency_US_userLocation_AU.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.68 KB
(110%)
...roject_USUser_USLocation.projectLocation_UK_userCurrency_US_userLocation_US.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.66 KB
(110%)
...finedUser_NonUSLocation.projectLocation_UK_userCurrency_nil_userLocation_SE.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.68 KB
(110%)
...ndefinedUser_USLocation.projectLocation_UK_userCurrency_nil_userLocation_US.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.66 KB
(110%)
...dUser_UndefinedLocation.projectLocation_UK_userCurrency_nil_userLocation_SE.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.68 KB
(110%)
...NonUSUser_NonUSLocation.projectLocation_US_userCurrency_SEK_userLocation_SE.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.33 KB
(110%)
...ect_USUser_NonUSLocation.projectLocation_US_userCurrency_US_userLocation_CA.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.7 KB
(110%)
...ser_NonUSLocation_Backer.projectLocation_US_userCurrency_US_userLocation_CA.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.29 KB
(110%)
...roject_USUser_USLocation.projectLocation_US_userCurrency_US_userLocation_US.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.53 KB
(100%)
.../ProjectPageViewControllerTests/testErrorFetchingProject.lang_de_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-76 Bytes
(100%)
...tPageViewControllerTests/testErrorFetchingProject.lang_de_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.63 KB
(100%)
.../ProjectPageViewControllerTests/testErrorFetchingProject.lang_en_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+443 Bytes
(100%)
...tPageViewControllerTests/testErrorFetchingProject.lang_en_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+8 KB
(100%)
.../ProjectPageViewControllerTests/testErrorFetchingProject.lang_es_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+455 Bytes
(100%)
...tPageViewControllerTests/testErrorFetchingProject.lang_es_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.63 KB
(100%)
.../ProjectPageViewControllerTests/testErrorFetchingProject.lang_fr_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-144 Bytes
(100%)
...tPageViewControllerTests/testErrorFetchingProject.lang_fr_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+10 KB
(100%)
.../ProjectPageViewControllerTests/testErrorFetchingProject.lang_ja_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-115 Bytes
(100%)
...tPageViewControllerTests/testErrorFetchingProject.lang_ja_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.71 KB
(100%)
...iewControllerTests/testLoggedIn_Backer_LiveProject_Error.lang_de_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-109 Bytes
(100%)
...rollerTests/testLoggedIn_Backer_LiveProject_Error.lang_de_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.82 KB
(100%)
...iewControllerTests/testLoggedIn_Backer_LiveProject_Error.lang_en_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+436 Bytes
(100%)
...rollerTests/testLoggedIn_Backer_LiveProject_Error.lang_en_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.95 KB
(100%)
...iewControllerTests/testLoggedIn_Backer_LiveProject_Error.lang_es_device_pad.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+427 Bytes
(100%)
...rollerTests/testLoggedIn_Backer_LiveProject_Error.lang_es_device_phone4inch.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.84 KB
(100%)
...iewControllerTests/testLoggedIn_Backer_LiveProject_Error.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-106 Bytes
(100%)
...rollerTests/testLoggedIn_Backer_LiveProject_Error.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.3 KB
(110%)
...iewControllerTests/testLoggedIn_Backer_LiveProject_Error.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-115 Bytes
(100%)
...rollerTests/testLoggedIn_Backer_LiveProject_Error.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.35 KB
(100%)
...NonUS_UserChosenCurrency_NotOmittingCurrencyCode_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+4.86 KB
(100%)
...rChosenCurrency_NotOmittingCurrencyCode_Success.lang_de_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.62 KB
(100%)
...NonUS_UserChosenCurrency_NotOmittingCurrencyCode_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+5.58 KB
(110%)
...rChosenCurrency_NotOmittingCurrencyCode_Success.lang_en_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.74 KB
(100%)
...NonUS_UserChosenCurrency_NotOmittingCurrencyCode_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+5.65 KB
(110%)
...rChosenCurrency_NotOmittingCurrencyCode_Success.lang_es_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.43 KB
(100%)
...NonUS_UserChosenCurrency_NotOmittingCurrencyCode_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+5.72 KB
(110%)
...rChosenCurrency_NotOmittingCurrencyCode_Success.lang_fr_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+9.96 KB
(110%)
...NonUS_UserChosenCurrency_NotOmittingCurrencyCode_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+7.87 KB
(110%)
...rChosenCurrency_NotOmittingCurrencyCode_Success.lang_ja_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.84 KB
(100%)
...Currency_US_ProjectCountry_US_UserChosenCurrency_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-48 Bytes
(100%)
...US_ProjectCountry_US_UserChosenCurrency_Success.lang_de_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.92 KB
(100%)
...Currency_US_ProjectCountry_US_UserChosenCurrency_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+4.52 KB
(100%)
...US_ProjectCountry_US_UserChosenCurrency_Success.lang_en_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+8.08 KB
(100%)
...Currency_US_ProjectCountry_US_UserChosenCurrency_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+4.49 KB
(100%)
...US_ProjectCountry_US_UserChosenCurrency_Success.lang_es_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.99 KB
(100%)
...Currency_US_ProjectCountry_US_UserChosenCurrency_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+610 Bytes
(100%)
...US_ProjectCountry_US_UserChosenCurrency_Success.lang_fr_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.5 KB
(110%)
...Currency_US_ProjectCountry_US_UserChosenCurrency_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+6.33 KB
(110%)
...US_ProjectCountry_US_UserChosenCurrency_Success.lang_ja_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.83 KB
(100%)
.../testLoggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(100%)
...ggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.92 KB
(100%)
.../testLoggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+437 Bytes
(100%)
...ggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+8.05 KB
(100%)
.../testLoggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+427 Bytes
(100%)
...ggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.99 KB
(100%)
.../testLoggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-104 Bytes
(100%)
...ggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.5 KB
(110%)
.../testLoggedIn_Backer_LiveProject_ShowCampaignTab_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+7.83 KB
(100%)
..._Backer_LiveProject_ShowEnvironmentalCommitments_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.92 KB
(100%)
..._Backer_LiveProject_ShowEnvironmentalCommitments_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+437 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+8.05 KB
(100%)
..._Backer_LiveProject_ShowEnvironmentalCommitments_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+427 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.99 KB
(100%)
..._Backer_LiveProject_ShowEnvironmentalCommitments_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-104 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.5 KB
(110%)
..._Backer_LiveProject_ShowEnvironmentalCommitments_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-112 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.79 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.84 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+437 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.86 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+427 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.86 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-104 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.5 KB
(110%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-112 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.75 KB
(100%)
...rency_US_ProjectCountry_NonUS_UserChosenCurrency_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-55 Bytes
(100%)
...ProjectCountry_NonUS_UserChosenCurrency_Success.lang_de_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.85 KB
(100%)
...rency_US_ProjectCountry_NonUS_UserChosenCurrency_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+4.54 KB
(100%)
...ProjectCountry_NonUS_UserChosenCurrency_Success.lang_en_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+8.03 KB
(100%)
...rency_US_ProjectCountry_NonUS_UserChosenCurrency_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+4.46 KB
(100%)
...ProjectCountry_NonUS_UserChosenCurrency_Success.lang_es_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.9 KB
(100%)
...rency_US_ProjectCountry_NonUS_UserChosenCurrency_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+611 Bytes
(100%)
...ProjectCountry_NonUS_UserChosenCurrency_Success.lang_fr_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.5 KB
(110%)
...rency_US_ProjectCountry_NonUS_UserChosenCurrency_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+6.41 KB
(110%)
...ProjectCountry_NonUS_UserChosenCurrency_Success.lang_ja_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.37 KB
(100%)
...untry_US_UserChosenCurrency_OmittingCurrencyCode_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+4.86 KB
(100%)
...UserChosenCurrency_OmittingCurrencyCode_Success.lang_de_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.57 KB
(100%)
...untry_US_UserChosenCurrency_OmittingCurrencyCode_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+5.63 KB
(110%)
...UserChosenCurrency_OmittingCurrencyCode_Success.lang_en_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.64 KB
(100%)
...untry_US_UserChosenCurrency_OmittingCurrencyCode_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+5.66 KB
(110%)
...UserChosenCurrency_OmittingCurrencyCode_Success.lang_es_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.4 KB
(100%)
...untry_US_UserChosenCurrency_OmittingCurrencyCode_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+5.73 KB
(110%)
...UserChosenCurrency_OmittingCurrencyCode_Success.lang_fr_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+9.84 KB
(110%)
...untry_US_UserChosenCurrency_OmittingCurrencyCode_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+7.87 KB
(110%)
...UserChosenCurrency_OmittingCurrencyCode_Success.lang_ja_device_phone5_8inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.49 KB
(100%)
...geViewControllerTests/testLoggedIn_Backer_NonLiveProject.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-104 Bytes
(100%)
...ontrollerTests/testLoggedIn_Backer_NonLiveProject.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.69 KB
(100%)
...geViewControllerTests/testLoggedIn_Backer_NonLiveProject.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+439 Bytes
(100%)
...ontrollerTests/testLoggedIn_Backer_NonLiveProject.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.79 KB
(100%)
...geViewControllerTests/testLoggedIn_Backer_NonLiveProject.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+432 Bytes
(100%)
...ontrollerTests/testLoggedIn_Backer_NonLiveProject.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.73 KB
(100%)
...geViewControllerTests/testLoggedIn_Backer_NonLiveProject.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-105 Bytes
(100%)
...ontrollerTests/testLoggedIn_Backer_NonLiveProject.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.3 KB
(110%)
...geViewControllerTests/testLoggedIn_Backer_NonLiveProject.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-109 Bytes
(100%)
...ontrollerTests/testLoggedIn_Backer_NonLiveProject.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.65 KB
(100%)
...ControllerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-105 Bytes
(100%)
...lerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.7 KB
(100%)
...ControllerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+436 Bytes
(100%)
...lerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.87 KB
(100%)
...ControllerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+413 Bytes
(100%)
...lerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.82 KB
(100%)
...ControllerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-104 Bytes
(100%)
...lerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.9 KB
(110%)
...ControllerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-128 Bytes
(100%)
...lerTests/testLoggedIn_Backer_NonLiveProject_Error.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.42 KB
(100%)
...geViewControllerTests/testLoggedIn_NonBacker_LiveProject.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-121 Bytes
(100%)
...ontrollerTests/testLoggedIn_NonBacker_LiveProject.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.5 KB
(100%)
...geViewControllerTests/testLoggedIn_NonBacker_LiveProject.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+421 Bytes
(100%)
...ontrollerTests/testLoggedIn_NonBacker_LiveProject.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.66 KB
(100%)
...geViewControllerTests/testLoggedIn_NonBacker_LiveProject.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+420 Bytes
(100%)
...ontrollerTests/testLoggedIn_NonBacker_LiveProject.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.51 KB
(100%)
...geViewControllerTests/testLoggedIn_NonBacker_LiveProject.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(100%)
...ontrollerTests/testLoggedIn_NonBacker_LiveProject.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.1 KB
(110%)
...geViewControllerTests/testLoggedIn_NonBacker_LiveProject.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-130 Bytes
(100%)
...ontrollerTests/testLoggedIn_NonBacker_LiveProject.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.45 KB
(100%)
...iewControllerTests/testLoggedIn_NonBacker_NonLiveProject.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-97 Bytes
(100%)
...rollerTests/testLoggedIn_NonBacker_NonLiveProject.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.55 KB
(100%)
...iewControllerTests/testLoggedIn_NonBacker_NonLiveProject.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+431 Bytes
(100%)
...rollerTests/testLoggedIn_NonBacker_NonLiveProject.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.68 KB
(100%)
...iewControllerTests/testLoggedIn_NonBacker_NonLiveProject.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+429 Bytes
(100%)
...rollerTests/testLoggedIn_NonBacker_NonLiveProject.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.63 KB
(100%)
...iewControllerTests/testLoggedIn_NonBacker_NonLiveProject.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-110 Bytes
(100%)
...rollerTests/testLoggedIn_NonBacker_NonLiveProject.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.1 KB
(110%)
...iewControllerTests/testLoggedIn_NonBacker_NonLiveProject.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-119 Bytes
(100%)
...rollerTests/testLoggedIn_NonBacker_NonLiveProject.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
-57 Bytes
(100%)
...edOut_NonBacker_LiveProjectSwitchedToCampaignTab_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+7.79 KB
(120%)
...onBacker_LiveProjectSwitchedToCampaignTab_Success.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
-54 Bytes
(100%)
...edOut_NonBacker_LiveProjectSwitchedToCampaignTab_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-125 Bytes
(100%)
...onBacker_LiveProjectSwitchedToCampaignTab_Success.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
-57 Bytes
(100%)
...edOut_NonBacker_LiveProjectSwitchedToCampaignTab_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-131 Bytes
(100%)
...onBacker_LiveProjectSwitchedToCampaignTab_Success.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
-46 Bytes
(100%)
...edOut_NonBacker_LiveProjectSwitchedToCampaignTab_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-127 Bytes
(100%)
...onBacker_LiveProjectSwitchedToCampaignTab_Success.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
-64 Bytes
(100%)
...edOut_NonBacker_LiveProjectSwitchedToCampaignTab_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-125 Bytes
(100%)
...onBacker_LiveProjectSwitchedToCampaignTab_Success.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.5 KB
(100%)
...nBacker_LiveProject_ShowEnvironmentalCommitments_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-121 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.56 KB
(100%)
...nBacker_LiveProject_ShowEnvironmentalCommitments_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+421 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.73 KB
(100%)
...nBacker_LiveProject_ShowEnvironmentalCommitments_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+420 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.59 KB
(100%)
...nBacker_LiveProject_ShowEnvironmentalCommitments_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.2 KB
(110%)
...nBacker_LiveProject_ShowEnvironmentalCommitments_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-130 Bytes
(100%)
..._LiveProject_ShowEnvironmentalCommitments_Success.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.44 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-121 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.55 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+421 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.59 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+420 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.46 KB
(100%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-113 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.3 KB
(110%)
...acker_LiveProject_ShowNoEnvironmentalCommitments_Success.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-130 Bytes
(100%)
...iveProject_ShowNoEnvironmentalCommitments_Success.lang_ja_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.45 KB
(100%)
...ewControllerTests/testLoggedOut_NonBacker_NonLiveProject.lang_de_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-97 Bytes
(100%)
...ollerTests/testLoggedOut_NonBacker_NonLiveProject.lang_de_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.55 KB
(100%)
...ewControllerTests/testLoggedOut_NonBacker_NonLiveProject.lang_en_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+431 Bytes
(100%)
...ollerTests/testLoggedOut_NonBacker_NonLiveProject.lang_en_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.68 KB
(100%)
...ewControllerTests/testLoggedOut_NonBacker_NonLiveProject.lang_es_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
+429 Bytes
(100%)
...ollerTests/testLoggedOut_NonBacker_NonLiveProject.lang_es_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+7.63 KB
(100%)
...ewControllerTests/testLoggedOut_NonBacker_NonLiveProject.lang_fr_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-110 Bytes
(100%)
...ollerTests/testLoggedOut_NonBacker_NonLiveProject.lang_fr_device_phone4inch.png
Oops, something went wrong.
Binary file modified
BIN
+10.1 KB
(110%)
...ewControllerTests/testLoggedOut_NonBacker_NonLiveProject.lang_ja_device_pad.png
Oops, something went wrong.
Binary file modified
BIN
-119 Bytes
(100%)
...ollerTests/testLoggedOut_NonBacker_NonLiveProject.lang_ja_device_phone4inch.png
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
152 changes: 152 additions & 0 deletions
152
Kickstarter-iOS/Features/ReportProject/ReportProjectInfoView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,152 @@ | ||
import KsApi | ||
import Library | ||
import SwiftUI | ||
|
||
enum ReportProjectHyperLinkType: String, CaseIterable { | ||
case prohibitedItems | ||
case communityGuidelines | ||
|
||
func stringLiteral() -> String { | ||
switch self { | ||
case .prohibitedItems: | ||
return Strings.Prohibited_items() | ||
case .communityGuidelines: | ||
return "community guidelines" | ||
} | ||
} | ||
} | ||
|
||
@available(iOS 15, *) | ||
struct ReportProjectInfoView: View { | ||
let projectUrl: String | ||
|
||
@State private var selection: Set<ReportProjectInfoListItem> = [] | ||
|
||
var body: some View { | ||
ScrollView { | ||
ForEach(listItems) { item in | ||
RowView(item: item, isExpanded: self.selection.contains(item)) | ||
.modifier(ListRowModifier()) | ||
.onTapGesture { | ||
withAnimation { | ||
self.selectDeselect(item) | ||
} | ||
} | ||
.padding(5) | ||
.animation(.linear(duration: 0.3)) | ||
} | ||
} | ||
.navigationTitle(Strings.Report_this_project()) | ||
.navigationBarTitleDisplayMode(.inline) | ||
} | ||
|
||
private func selectDeselect(_ item: ReportProjectInfoListItem) { | ||
if self.selection.contains(item) { | ||
self.selection.remove(item) | ||
} else { | ||
self.selection.insert(item) | ||
} | ||
} | ||
} | ||
|
||
// MARK: - Views | ||
|
||
@available(iOS 15, *) | ||
private struct BaseRowView: View { | ||
var item: ReportProjectInfoListItem | ||
var isExpanded: Bool = false | ||
|
||
var body: some View { | ||
HStack { | ||
VStack(spacing: 5) { | ||
Text(item.title) | ||
.font(item.type == .parent ? Font(UIFont.ksr_body()) : Font(UIFont.ksr_callout())) | ||
.bold() | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
|
||
if let hyperLink = hyperLink(in: item.subtitle) { | ||
Text(html: item.subtitle, with: hyperLink.stringLiteral()) | ||
.font(item.type == .parent ? Font(UIFont.ksr_subhead()) : Font(UIFont.ksr_footnote())) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
.multilineTextAlignment(.leading) | ||
} else { | ||
Text(item.subtitle) | ||
.font(item.type == .parent ? Font(UIFont.ksr_subhead()) : Font(UIFont.ksr_footnote())) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
.multilineTextAlignment(.leading) | ||
} | ||
} | ||
|
||
Spacer() | ||
|
||
Image(isExpanded ? "arrow-down" : "chevron-right") | ||
.resizable() | ||
.scaledToFit() | ||
.frame(width: 15, height: 15) | ||
.foregroundColor(item.type == .parent ? Color(.ksr_create_700) : Color(.ksr_support_400)) | ||
} | ||
} | ||
} | ||
|
||
@available(iOS 15, *) | ||
struct RowView: View { | ||
var item: ReportProjectInfoListItem | ||
let isExpanded: Bool | ||
|
||
private let contentSpacing = 10.0 | ||
private let contentPadding = 12.0 | ||
|
||
var body: some View { | ||
HStack { | ||
VStack(alignment: .leading) { | ||
BaseRowView(item: item, isExpanded: isExpanded) | ||
|
||
if isExpanded { | ||
ForEach(item.subItems ?? []) { item in | ||
VStack(alignment: .leading, spacing: contentSpacing) { | ||
// TODO: Push Submission Form View In MBL-971(https://kickstarter.atlassian.net/browse/MBL-971) | ||
NavigationLink(destination: { Text("submit report view") }, label: { BaseRowView(item: item) }) | ||
.buttonStyle(PlainButtonStyle()) | ||
} | ||
.padding(.vertical, 5) | ||
.padding(.leading, self.contentPadding) | ||
} | ||
} | ||
} | ||
} | ||
.padding(.trailing, 30) | ||
} | ||
} | ||
|
||
// MARK: - Private Methods | ||
|
||
/// Returns a ReportProjectHyperLinkType if the given string contains a type's string literal | ||
private func hyperLink(in string: String) -> ReportProjectHyperLinkType? { | ||
for linkType in ReportProjectHyperLinkType.allCases { | ||
if string.lowercased().contains(linkType.stringLiteral().lowercased()) { | ||
return linkType | ||
} | ||
} | ||
|
||
return nil | ||
} | ||
|
||
// MARK: - Modifiers | ||
|
||
struct ListRowModifier: ViewModifier { | ||
func body(content: Content) -> some View { | ||
Group { | ||
content | ||
Divider() | ||
}.offset(x: 20) | ||
} | ||
} | ||
|
||
// MARK: - Preview | ||
|
||
@available(iOS 15, *) | ||
struct ReportProjectInfoView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
ReportProjectInfoView(projectUrl: "") | ||
} | ||
} |
Oops, something went wrong.