Skip to content

Commit

Permalink
Cherry fixes (#3219)
Browse files Browse the repository at this point in the history
* v2.4.1 (#3162)

* Admin member names (#3159)

* Update tsconfig (#3038)

* update tsconfig

* update type import

* dont include type automatically

* Program donation dropdown (#3037)

* add program attribute

* update programId

* add program selector on stripe

* add program selector in crypt oform

* daf program selector

* stocks program selector

* absolute dropdown

* add programId in intent creation

* incrementers wrap

* add program flag

* UI flagged

* update tsconfig

* update type import

* dont include type automatically

* prepend general

* use programAllowed flag

* rename constant

* BG-1336: Donate to ap wallet directly (#2978)

* Update Polygon and Ethereum testnets to Amoy and Sepolia (#2937)

* Update Polygon and Ethereum testnets to Amoy and Sepolia

* Format

* BG-1253: Pending Payment donation pickup button (#2940)

* Add 'Finish Paying' to intent table

* Remove redundant endowment fields from Donate page

* Add logic to load intent data into Donate page

* Update intent type to include token + currency + frequency

* Use Currency instead of DetailedCurrency

* Update frequency to 'one-time'+'subscription'

* Show tip as pct

* Remove tx hash column on awaiting payment table

* Reset state.transactionId on component unmount

* Pass transactionId when creating intents

* Pass old intent id in PayPal

* Update endpoint

* Rename intentTransactionId->oldTransactionId

* Add comment

* Rename intentTransactionId->oldTransactionId

* link / col header fixes

---------

Co-authored-by: Andrey <SovereignAndrey>

* fix twitter acct handle used

* V3 endowment (#2941)

* BG-1225: Donation success page: Show the name of the nonprofit donor chose (#2869)

* Pass recipientName to DonateFiatThanks from PayPal checkout

* Pass recipientName in StripePaymentStatus

* Donate page: Create PayPal order (donation intent) only on button click (#2873)

* Add new 'intent' don. status

* Create PayPal order (donation intent) only on button click

* Remove redundant isSubmitting state

* Refactor createOrder

* Revert "Add new 'intent' don. status"

This reverts commit 54af8638beaf15ba61ad212a305c9fbd91b24734.

* UI Error handling (#2870)

Closes BG-1263
Closes BG-1172

This PR aims to separate UI error (UI is unusable, display fallback UI) from user-initiated error (e.g. failed submission, prompt with Modal). Kindly see comments for changes explanation

NOTE: renamings, moving of files are not applied yet so that essential changes would stand out.
- [ ] rename `useErrorContext` to `useErrorHandler`
- [ ] move `useErrorHandler` to `/hooks`
- [ ] delete `contexts/ErrorContext` 


## Explanation of the solution
Sample handled UI errors:

App encountered error
<img width="1470" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/19ed5295-e3a5-4c2d-a1df-ed5533af9011">

Page encountered error
<img width="1469" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/b5203b45-d09a-47e4-9332-e5eda57a40b5">

Stripe checkout failed
<img width="794" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/9104f821-71d3-4910-96e0-0732a63af301">


## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Slug preview (#2872)

## Explanation of the solution
* add slug preview
![image](https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/7e0a5dd8-62b5-4389-90fb-bb0bd57cc422)

## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Incorrect card sizes (#2874)

## Explanation of the solution
* for smaller card sizes (multiple cards per row, where card  title alignment matters ) just fill the standard (uniform height) card image area
<img width="491" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/0a4d01b9-84d4-444d-bb73-72385ce76c1d">

<img width="603" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/858f21ba-1111-499a-b72b-20005aa6602f">


* for wide card sizes (single card per rwo), just let the browser pick from srcset and sizes provided and use the rendered size
<img width="386" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/5e440c60-acdc-491e-992a-70363f9aa61a">



## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Remove `usdRate` from fiat donation payload and update PayPal proxy endpoint (#2875)

* Removed 'usdRate' from 'FiatDonation' payload

* Updated PayPal endpoints

* BG-1289 Widget word replaced (#2876)

## Explanation of the solution
Still uising "widget" in site copy. Replaces with "Donation Form". 

## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review
N/A

* BG-1281: master fixes (#2877)

## Explanation of the solution

## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Default currency (#2879)

* change type

* additional loading

* include cookie in request

* remove additional error ui

* BG-1239: Improve / Expand pending donation information (#2880)

* Add fiatramp field to DonationRecord type

* Fix network sortkey chainName->viaName

* Update to always use viaName even for fiat

* Fix NetworkDropdown to use Fiat: fiat option type

* Add third tab in the Donor's "My Donations" page that would allow them to see all payment intents explicitly (#2868)

* Include 'intent' in DonationsQueryParams['status']

* Add new 'Awaiting Payment' tab

* fix overlay for tabs

* Increase tab width to w-52

* Make more mobile-friendly

* BG-1295: Donation increment buttons (#2891)

* Add incrementers for USD

* Update src/components/donation/Steps/DonateMethods/Stripe/Incrementers.tsx

Co-authored-by: ap-justin <[email protected]>

* Use getValues instead of watch

---------

Co-authored-by: ap-justin <[email protected]>

* Set selected currency in cookie (#2893)

* custom host

* set cookie

* switch to onchange

* Update src/constants/urls.ts

added mapping in gateway

Co-authored-by: SovereignAndrey <[email protected]>

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Get/set cookie in client (#2896)

* cookie helpers

* set default code

* modify cookie on change

* set on endpoint instead

* side effect first

* comment out (#2898)

* BG-1286: compound SF opt-in (#2892)

* types and UI

* default value

* match server

* include in fetched

* BG-1298: fix img editor issues (#2897)

* remove pre-crop

* fix bug isDismissible not working

* simplify interface

* derive values

* validate cropped

* simplify handlers

* validate immediately

* remove outdated comment

* faq copy changes

* Added HomePage (#2894)

* Added HomePage

Signed-off-by: Navansh <[email protected]>

* Code Restructuring and Refactoring for Homepage

Signed-off-by: Navansh <[email protected]>

---------

Signed-off-by: Navansh <[email protected]>

* Landing page fixes (#2899)

* misnamed image file

* dup wildcard route removed

* formatting and other cleanup fixes

* spelling fixes

* fixes for styles renaming

* fix DOM property naming typo

* blog posts use dapp URL and remove trailing slash

* fix links to marketplace & register page

* fix DAPP link to drop app if on prod

* remove commented out code

* revert svg changes from DOM prop fix

* revert svg changes from DOM prop fix

* lint fixes pt1

* footer updates

* fix hooks

* use for...of

* Follow up fixes (#2901)

* yarn gormat

* done lint

* fix failing test

* revert rename

* revert react namespace

* react namespace

* react namespace

---------

Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: ap-justin <[email protected]>

* Convert common arbitrary values to built in tailwind classes (#2902)

* misnamed image file

* dup wildcard route removed

* formatting and other cleanup fixes

* spelling fixes

* fixes for styles renaming

* fix DOM property naming typo

* blog posts use dapp URL and remove trailing slash

* fix links to marketplace & register page

* fix DAPP link to drop app if on prod

* remove commented out code

* revert svg changes from DOM prop fix

* revert svg changes from DOM prop fix

* yarn gormat

* lint fixes pt1

* done lint

* footer updates

* fix failing test

* fix hooks

* use for...of

* revert rename

* revert react namespace

* react namespace

* react namespace

* blog card classes

* delete unused

* done blog card bene carousel

* more fixes

* remove unused controls

* remove unused controls

* remove one time

* unused utils

* to tailwind

* to navy

* to tw util

* to tailwind

* to tailwind

* to tailwind

---------

Co-authored-by: Andrey <SovereignAndrey>

* `DAPP_URL` to `BASE_URL` fix (#2903)

* DAPP_URL >> BASE_URL

* format/lint fixes

---------

Co-authored-by: Andrey <SovereignAndrey>

* To tsx (#2904)

* to tsx

* dryner

* common media

* remove template

* remove custom classes

* remove brand classes

* redirect signins to marketplace, not to root (#2905)

Co-authored-by: Andrey <SovereignAndrey>

* temp hide landing page btns (#2915)

Co-authored-by: Andrey <SovereignAndrey>

* Static pages for legal (#2917)

* routes for new legal pages

* 3 legal pages copied from prod

* fix landing page footerlinks

---------

Co-authored-by: Andrey <SovereignAndrey>

* Home groupings (#2916)

* remove nested

* animations

* blog card

* move hero bottom

* hero bottom

* benefits

* testimonials

* move footer

* nav bar footer

* move button

* fix lint

* Scope custom classes, remove unused (#2919)

* move carousel styles

* remove svg animation

* to module

* remove benefits landing

* remove util

* remove app.css

* common css import

* Reuse layout (#2918)

* reuse layout

* remove unused import

* move v2 footer to app/footer along with depreciated landing header file; refactor newsletter to use new styles w/ v2 footer; fix footer links & copyright;

* remove unused import

* footer social links from constants file

* fix test

* watch sticky instead of scroll

* remove no effect

* links clean up: dropdown menu & nav logo

---------

Co-authored-by: Andrey <SovereignAndrey>

* BG-1243: create crypto intents on Checkout page load + confirm crypto intents on success (#2895)

* Create crypto intent on checkout load + confirm on tx success

* Use template string in TxSubmit

* Extract useCreateCryptoIntent

* Show 'Simulating tx...' when no transactionId is present

* Remove transactionId state

* Refactor

* Turn useCryptoIntentCreatorMutation into a query

* Revert change to ErrorContext

* Remove transformResponse from useConfirmCryptoIntentMutation

* Include tip in crypto tx estimation

* Rename totalAmount->grossAmount

* Legal pages updates (#2922)

* updates to legal pages

* change Link to anchor tag

* link component added to terms page

---------

Co-authored-by: Andrey <SovereignAndrey>

* Landing page fixes (#2921)

* reuse layout

* remove unused import

* move v2 footer to app/footer along with depreciated landing header file; refactor newsletter to use new styles w/ v2 footer; fix footer links & copyright;

* remove unused import

* footer social links from constants file

* fix test

* watch sticky instead of scroll

* remove no effect

* links clean up: dropdown menu & nav logo

* hero

* done section 2

* overflow

* move asset

* position chars move assets

* remove custom css

* embed color

* exact

* done benefits

* done brands

* video desktop

* animation

* alt

* spaces

* roundness

* file name

* move assets

* done testimonials

* done blogs

* done blog

* external screen classes

* testimonials overflow fix

* hero hero bottom transition

* done hero

* carousel blemish

* benefits blemish

* done animation

* page spacing

* increate bot padding

* blurs

* skeleton

* add padding

* grid footer

* responsive styles

* intercom hide

* remove unused images

* icon

* slider buttons

* blemish transition

* spacing

* footer spacing

* increase blur

* Update src/App/Header/index.tsx

Co-authored-by: SovereignAndrey <[email protected]>

---------

Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: SovereignAndrey <[email protected]>

* overflow-x-hidden (#2923)

* hidden -> clip (#2924)

* BG tip - copy changed

* donation split copy changed

* split - patch for non-widgetConfig scenario

* temp removal of paypal btns from checkout (#2926)

* temp removal of paypal btns from checkout

* fix build

---------

Co-authored-by: Andrey <SovereignAndrey>

* copy fixes: Widget >> Donation Form

* swap in Laira mascot img

* adjust schema

* move program creator

* milestone

* remoev initial

* new program form

* new program update type

* fxi type error

* update delete

* done program editor

* add deafult value

* milestone buttons

* test change

* usesubmit only

* git reset

* remove mb-2

* create program

* add milestone

* delete method

* revert to program editor

* form before clean

* revert name

* back to defaultVals

* use values

* switch to v8 endowment

* update endpoint algolia

* registration-update

* bump endpoint versions

* crypto intent ver

* bump version

* wise error display

---------

Signed-off-by: Navansh <[email protected]>
Co-authored-by: Nenad Misic <[email protected]>
Co-authored-by: Juan Paolo Mariano <[email protected]>
Co-authored-by: SovereignAndrey <[email protected]>
Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: Navansh <[email protected]>

* Rolled back stripe donation endpoint (#2944)

* up version (#2945)

* Update deps (#2948)

* update biome and amplify

* update stripe and other minor

* rest minor

* update package manager

* revert test

* BG-1307 GDPR Banner (#2946)

* GDPR banner for non-essential cookies/trackers

* transfer to module

---------

Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: ap-justin <[email protected]>

* Rolled back crypto-donation endpoint (#2950)

* BG-1312: Nonprofits page (#2951)

* done hero

* increase padding

* nonprofit info

* done why bg

* brands content

* extract benefits content

* done benefits

* new braands

* done fiscal sponsorship

* move testimonial content

* done testimonials

* bottom cta done

* correct copy

* donor info link

* update vitest

* BG-1320 Homepage fixes (#2943)

* loader color

* brand img explicit height

* tally explicit height

* endow card explicit height

* testimonial card epxlict height

* base layout

* path bg

* Testimonials fixes to copy for punctuation and other typos/errors (#2947)

Co-authored-by: Andrey <SovereignAndrey>

* Carousel cards mixed up (#2949)

Co-authored-by: Andrey <SovereignAndrey>

* format

* fix cherrypick

* cherry fix

* detail fixes

---------

Co-authored-by: SovereignAndrey <[email protected]>

* BG-1326 Fallback Image updated (#2952)

* flying character used as fallback for logo/card img everywhere

* new img

* BG-1311: Donor info page (#2953)

* done hero

* increase padding

* nonprofit info

* done why bg

* brands content

* extract benefits content

* done benefits

* new braands

* done fiscal sponsorship

* move testimonial content

* done testimonials

* bottom cta done

* correct copy

* donor info link

* update vitest

* BG-1320 Homepage fixes (#2943)

* loader color

* brand img explicit height

* tally explicit height

* endow card explicit height

* testimonial card epxlict height

* base layout

* path bg

* Testimonials fixes to copy for punctuation and other typos/errors (#2947)

Co-authored-by: Andrey <SovereignAndrey>

* Carousel cards mixed up (#2949)

Co-authored-by: Andrey <SovereignAndrey>

* format

* fix cherrypick

* cherry fix

* detail fixes

* done hero

* move hero bottom

* benefits abstract

* benefits section

* done cta

* cta text

* add donors link

* delete

* move img

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Added JWT to registration update endpoint (#2954)

* update endpoints (#2955)

* BG-1327 Banner fallback (#2966)

* fallback banner added for profile

* admin logo fallback to character

* Get user attributes from DB instead of cognito (#2967)

* session loader

* update types

* formatted

* remove unused

* remove duplicate check

* env

* User dashboard (#2968)

* common layout

* rename sidebar header

* move sidebar header

* factor out header

* fix layout

* user dashboard

* capitalize

* copy settings page

* edit profile page

* dashborad link

* create update action

* BG-1331: Move donate page inside user dashboard (#2970)

* convert to container query

* move donations to user dashboard

* dont show icon on dashbaord

* revert hide icon

* Implement share in stripe success page (#2972)

* add recipientId

* extract share

* use extracted

* BG-1333 T&C for Widgets (#2973)

* Basic T&C added to bottom of Widget + Config preview

* simplify widget terms to remove name

* move T&C to Content component to access queried profile object

* add intent as old (#2977)

* add unsupported chainId

* skip estimation

* token option

* crypto qr submit

* update copier api

* add direct mode

* direct option

* receiver addr

* change copy (#2990)

* BG-1341 Widget adaptations (#2976)

* hide lines in summary screen when related amounts are 0 (or tipping is disabled)

* Stock & DAF donations can set BG tip & split %

* Add SF fund explainer and Laira character to Summary view

* Address PR feedback

* tweak summary info shown w/ Tip/SF logic

* BG-1346 Donation Builder: style fixes and design improvement (#2989)

* design/style changes to donation form builder

* span >> div

* tweak styles for padding & alignment on smaller screen layout

* Address PR feedback

* Nonprofits page improvs (#2991)

* change hero img

* remove old hero img

* add laira imgges

* remove waiving char

* use latest waiving char

* replace waiving laira

* replace icon with laira

* why bg icons

* sf benefits content

* formatting

* replace waving (#2992)

* Donor page changes (#2993)

* replace waving

* repalce hero image

* use sf assets

* delete unused

* laira icons

* benefits order

* fixes for testimonals

* remove unused file (missed in orig merge)

* Home fixes (#2995)

* remove unused

* replace wavenly with core

* change brands heading

* add spacing

* remove unused module

* Donate form screen short carousel (#2997)

* remove unused

* new screen shots

* create carousel

* use new carousel

* fix size

* remove unusd

* Remove Leaderboard (#2996)

* remove unused leaderboard code & tests

* remove additional Leaderboard items

* add small padding to bottom of SF msg so doesn't run into payment form (#2998)

* Bg 1343 - move tip opt out to settings (#2999)

* update types

* move component

* fix type error

* Incrementors adapted to work with all currencies (#3004)

* BG-1350 ComplyDog sans Quill (#3005)

* complydog JS sans Quill

* use local script instead of hitting complydog's server

* BG-1344: Program donate checkbox (#3003)

* add prog type

* prog disable checkbox

* retrive attribute

* correct endpoints (#3000)

* rename variable

* Donation state handling (#3002)

* local state

* improve shape

* apply new types

* save

* widget content

* doante state to be constructed inside

* use intent instead

* remove reducer

* state shape

* crypto sender

* hello

* tip format

* clearer state

* merge or replace

* working fiat intent

* remove redundant

* remove unwanted

* add mode

* to switch

* fixes

* daf and stocks doesnt skip

* add loader

* remoev unused comment

* convert widget slice to plain state

* set init state instead

* skip split

* remove comment

* remove unsed

* resume no longer need intermediary donation loader page

* info comment

* add recipientId

* apply skips on back

* revert crypto checkout

* revert stripe checkout

* revert stripe checkout

* tx submit loading

* reset tip on token change

* change comment loctin

* tip back to donate form if skipped

* revert rename

* remove unsed comment

* remove unused omit

* verbose comment

* revert optional

* remove intent after loading

* fetch hide tip config

* info

* split desc

* testimonial copy fixes (#3007)

* BG-1357: DB Split settings (#3008)

* render slider

* split fix flag

* fix check field

* change type and adjust (#3006)

* add in donation state

* mix db value to widget value

* add label

* revert mixup

* standalone source attr

* format

* revert for endow option

* take inverse

* fee corrected & copy updates in Admin Settings (#3016)

* Payout min edit UI (#3015)

* update type and add field

* add placeholder

* add spacing

* Methods widget config (#3017)

* add method types

* donate methods widget config

* remove unused

* order configurer component

* format

* error message

* error msg

* fix bug

* no need for whole mthod

* revert smaple

* error msg

* Donate methods admin setting (#3018)

* move comp and helper

* sort

* reuse in settings page

* doante page use setting

* update link (#3009)

* swap tab name (#3019)

* distinguish supported/unsupported

* qr token type

* format

* switch to chainId map

* reverts

* generic donate thanks

* add spacing

* create intent on direct donation

* add space

* rename

* remove as const

* format

* Add lefthook git hooks (#3020)

* lefthook install and config

* hello world

* hello world

* add glob

* ehello world

* x

* x

* test

* test

* test

* testunused

* testunused

* Endow videos UI (#3021)

* media endpoints

* use v1

* media page and route

* container and header

* featured video container

* video adder modal

* show modal

* add video wiring

* paginated videos

* edit pros

* video preview

* videos nested

* adder to edidtor

* update payload

* init params

* responsive video

* toggle featured

* increase card per row

* add disabled

* pagination limit

* render videos in profile

* edit albel

* BG-1374: admin settings tweaks (#3033)

* 5 rows

* separator heading

* move payout minimum

* remove unused

* switch from Algolia >> CloudSearch (#3034)

* Widget custom title and description (#3035)

* udpate checkfield style

* parse description in widget page

* add onChange check field

* title and description fields

* show fallback if empty

* get recipient addr

* revert additional wallets

* direct button primary accent

---------

Signed-off-by: Navansh <[email protected]>
Co-authored-by: Nenad Misic <[email protected]>
Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: Juan Paolo Mariano <[email protected]>
Co-authored-by: SovereignAndrey <[email protected]>
Co-authored-by: Navansh <[email protected]>

* Program metrics (#3041)

* add new attributes

* target raise edit field

* program tally

* targetRaise is nullable

* unset targetRaise

* Update src/pages/Admin/Charity/ProgramEditor/ProgramInfo/ProgramInfo.tsx

Co-authored-by: SovereignAndrey <[email protected]>

---------

Co-authored-by: SovereignAndrey <[email protected]>

* nav dropdown label fixes

* BG-1381: Program selector in widget (#3049)

* export program selector

* load everythig

* add in snippet program id

* add prog field

* parse program id

* program initial state widget

* add on loaded

* update stocks schema

* update stocks schema

* remove unused

* ignore lint

* preview selected program

* BG-1383 BG-1384 minor fixes (#3051)

* User bookmarks (#3052)

* remove old type

* bookmarks update

* bookmarks btn

* bookmarks list

* bookmarks lists

* userId from jwt

* favorite -> profile

* update endpoints

* Header search V1 (#3054)

* convert to input

* show on focus

* update styles

* remain open when hovered

* marketplace context

* convert to context

* remoev log

* marketplace flag

* endowments search

* unitialized as loading

* separate search component

* search dropdown component

* propagate search to marketplace

* link home and marketplace query

* debounce happens in useCards

* BG-1385 WP Plugin doc page (#3053)

* WP Plugin Documentation page

* remove import

* clean up table

* address PR feedback

* fix typo

* add top countries (#3065)

* HOTFIX: switch to AWS WP server

* HOTFIX: WP server - HTTPS

* WP API updated

* Revert "WP API updated"

This reverts commit 402c3d5b7161c68616482fc5a5e63839f1ba58ff.

* Update deps (#3066)

* batch one updates

* update deps

* replace iwth write

* BG-1393: UK aid UI (#3068)

* batch one updates

* update deps

* replace iwth write

* uk fields

* shown checkbox not crypto

* form donor and server format

* change format

* donor address apes

* add annotation

* Update src/components/donation/Steps/Summary/DonorForm.tsx

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Display top countries (#3070)

* endpoint

* top countries data-access

* new chains integrated (#3080)

* new chains updated

* add chains to other types

* update rest of token/chain items; add stargaze/kujira testnets;

* add new chains to keplr wallet

* BG-1390: Cards v2 (#3081)

* remove implicit fields

* card content

* bookmark btn improvement

* link and button within card

* bookmark btn optimistic update

* comments

* fix arg

* remove decimal

* Custom tokens UI (#3069)

* coin gecko query

* token search component

* add name and logo

* add coingecko platformId

* add static list

* temp remove queyr

* warning

* use fuse for search

* remove coins

* max size

* init token not required

* add example

* file size

* proceed button

* dont format json

* set as token

* ignore json

* no need for amount

* remoev custom solana xrp

* platformId

* udpate coins

* usd rate

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Chain selector (#3082)

* add logos

* chain combobox

* use new chain selector

* option chainId to chainId

* value chainId

* Osmosis support added (#3084)

* add osmosis chains

* post-fix 'Testnet' to unsupported chain name (when applicable)

* Headless UI v2 (#3085)

* headless ui

* done batch one

* done coutnries

* done batch two

* done batch 3

* done batch 4

* chain selector scroller click

* token options scroll click fix

* max height

* remove extra border

* downgrade yarn

* fix program hidden

* combobox null value

* 2.1.0 transition built in dialog

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Add coinbase extension wallet (#3087)

* update icons

* use 6963 and add coinbase

* update icon imports

* unload after switching error

---------

Co-authored-by: SovereignAndrey <[email protected]>

* QR copy (#3088)

* add QR warning

* more readable

* In honor of field (#3089)

* honor field

* set from intent

* closer to label

* close to lable

* rename form

* wiring

* Fix token selector search and updates (#3091)

* combobox inside popover

* search icon on right

* rename interface

* BG-1417: Cheque FAQ (#3105)

* add content

* faq content

* BG-1423: chain selector updates (#3104)

* change type and adjust for chainId ''

* shorter

* sort chains

* display and focus on error

* Network dropdown bug fixes (#3106)

* add immediate to open on focus

* remove hidden input

* WP url updated

* BG-1424: Improve token search (#3102)

* add not listed

* mixed

* virtualized

* per chain json file

* biome ignore

* add missing

* add token placeholder

* spacing

* Revert "WP url updated"

This reverts commit ffb68148308d6078a762e0741cc779814c854ff2.

* upgrade to signclient (#3103)

* Network select should focus first when all is error (#3109)

* more flexible api

* use new api

* selector value is chainId

* remove hookform context

* Donate crash + cherry pick from master (#3108)

* make default values required

* remove undefined

* remove placeholder (#3039)

* BG-1380: share fixes (#3040)

* remove excess

* lines and punctuations

* handles and notes

* BG-1382: Users unable to create programs occasionally (#3050)

* fetch new token

* comment

* refresh token every 5 minutes

* add ms multiplier (#3067)

* HOTFIX: switch to AWS WP server

* HOTFIX: WP server - HTTPS

* WP API updated

* Revert "WP API updated"

This reverts commit 3ecb5d0958a5645a1ddda2d2d6284883362c13d9.

* fix source (#3083)

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Crypto form integration test (#3110)

* init test and mocks

* persisted state

* empty form validation msgs

* prior to selecting token

* error correcting

* remove test id

* BG-1399: Stripe status handling for manual bank verification (#3107)

* Update stripe payment status API to use latest version

* Added verify bank account button to 'pending' tab in My Donations

* Add 'arrivalDate' in Donations Thanks page

* Donation Thanks Page for 'requires_action' status and logged in donor

* Show bank verification link for guest donors on thank you page

* Removed redundant comment

* Renamed 'Verify Bank Account' to 'Action'

* Removed unused import

* Add type def for specific bank verification fields

* Add wordpress assets to post page (#3090)

* add in public assets and load via react helmet

* remove extra space

* dry input

* preserve header and footer style

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Stripe form integration test (#3111)

* update currency selector with accessible headless components

* extract rhf from field

* no rhf stripe form

* add missing error

* rhf hook

* rhf

* should focus

* init setup

* prefilled state

* validation test and increments

* stripe form loading and error

* Node proxies (#3113)

* optimism proxy

* revert mistake

* base proxy

* terra proxies

* stargaze and juno, compress lcd,rpc to nodeUrl

* osmosis

* kujira

* update terra

* Add 'ukGiftAid' field in fiat donation payload (#3121)

* WP URL updated

* Cover processing fee UI (#3112)

* processing fees

* fee allowance on intent

* fix type errors

* fee allowance checkbox

* flatten

* save as fee allowance instead of bool

* processing fee row

* fee allowance row

* remove console log

* add fee allowance to estimate gross amount

* add to deps list

* tip doesnt disable processign fee

* total include processing fee

* parent set border child set individual padding

* no need for custom bottom margin

* psersistend state doesnt drive UI show

* fix ts error

* Copy tweak

---------

Co-authored-by: SovereignAndrey <[email protected]>

* BG-1437: Tribute notif UI (#3122)

* fix: pass type

* form elements

* schema and field sizing

* remove unused import

* init tribute

* stripe checkout tribute wiring

* wiring crypto

* fix spacing

* fix initial size of

* msg char counter

* FIX: header footer styles (#3124)

* only apply wp override in /blog

* only apply wp override on /blog

* only to blog/:slug

* stocks form test (#3126)

* Async chain (#3123)

* update definition and adjust consumers

* cached get chain options

* use token definition

* only pick subset

* actual url

* New donations table fields (#3125)

* Update '/ap/donations.ts' types with new fields

* Fix 'Action' column for fiat bank verification url in mobile table

* Fix 'Action' column for fiat bank verification url in donations table

* Added 'Recurring' column for donor My Donations tables

* Added 'Direct Donation' and 'SF Donation' columns for donor My Donations tables

* Added 'appUsed' in nonprofit My Donations table

* Added 'paymentMethod' in nonprofit My Donations table

* Added 'isRecurring' in nonprofit My Donations table

* Single csv report

* Add other fields into nonprofit Donations table

* Fix 'Load More' button to span full width of table

* DAF form test + MSW mocking (#3127)

* add msw

* done crypto using msw

* done incrementers

* stocks test use msw

* fix fetch error

* fix build

* DAF form test

* Add staging endpoint for S3 file uploading (#3139)

* Donate steps - test skips and resets (#3128)

* add msw

* done crypto using msw

* done incrementers

* stocks test use msw

* fix fetch error

* fix build

* DAF form test

* test skips

* tip reset

* fix steps test

* fix copier warning

* remove mock

* change donation method

* remove unused

---------

Co-authored-by: SovereignAndrey <[email protected]>

* compress images and use webp format (#3140)

* Stripe checkout test - error paths (#3141)

* add msw

* done crypto using msw

* done incrementers

* stocks test use msw

* fix fetch error

* fix build

* DAF form test

* test skips

* tip reset

* fix steps test

* fix copier warning

* remove mock

* change donation method

* remove unused

* client secret loading

* by test id

* separate file

* error

* error modals

* donate btn

* remove debug

* UI updates (#3142)

* rounded widget form

* common donor terms

* reuse in preview

* update words

* revert order

* BG-1452: CC always goes along with DAF (#3145)

* tooltip detail

* cc locking

* append stripe if applicable

* add cc if daf && no cc

* Summary form integration test (#3146)

* factor out selector

* no form context field and selector

* native checkfield

* keep description

* add accessible error message

* uk gift aid test

* done tribute fields

* top level

* Payment tab label: card >> card/bank

* init lock (#3147)

* Update donations tables (#3144)

* Renamed 'SF Donation' to 'Donation to Sustainability Fund' for donor donations table

* Renamed 'SF Donation' to 'Donation to Sustainability Fund' for NPO donations table

* Renamed 'SF Donation' to 'Donation to Sustainability Fund' for NPO csv file

* Set fill function as new 'replaceWithEmptyString' helper function

* Updated csv file fields for donor donations

* Updated payment method values for NPO donations table and csv file

* Changed csv value for 'Donation Origin' to be the same with corresponding NPO donation table column

* Set 'Finish Paying' column name to 'Action' for donor intent table

* Removed excess '- - -' which consumes 1 column for intent and finalized donor tabs

* Set bank verification url action as a button

* Update 'Network' column to 'Donation Type' column for donor donations table

* Display date in csv file as it appears in respective donation tables for donor and NPO

* Display amounts in csv files to 2 decimal places - both NPO and donor tables

* Deleted unused 'paymentMethod' helper function and rolled back changes to NPO donations table for donation type

* Update column name 'Network' to 'Donation Type' for donor donations table csv

* Set 'Finish Paying' column name to 'Action' for donor intent mobile table

* Summary step integration test (#3148)

* coin gecko mock handlers

* test rows

* auth cases

* descripbe name

* use waitFor instead

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Alerts opt out (#3149)

* settings route

* detailed endows endpoint

* userId

* alert row

* submit handler

* query

* reuse in endowment link

* default checked

* update wiring

* bump to v3

* add success prompt

* preserve bookmark link

* correct route

* Update src/pages/UserDashboard/Settings/Settings.tsx

Co-authored-by: SovereignAndrey <[email protected]>

* Update src/pages/UserDashboard/Settings/Settings.tsx

Co-authored-by: SovereignAndrey <[email protected]>

* Update src/pages/UserDashboard/Settings/EndowAlertForm.tsx

Co-authored-by: SovereignAndrey <[email protected]>

* lint fix

* spacing

---------

Co-authored-by: SovereignAndrey <[email protected]>

* endow admin object

* handle overflow

* bump v2

---------

Signed-off-by: Navansh <[email protected]>
Co-authored-by: Nenad Misic <[email protected]>
Co-authored-by: Juan Paolo Mariano <[email protected]>
Co-authored-by: SovereignAndrey <[email protected]>
Co-authored-by: Navansh <[email protected]>

* Terms move from page to checkout  (#3160)

* t&c in each checkout screen

* remove in /donate page

* donate widget page remove

* widget preview remove

* remove unused

* remove unused import

* donation terms move closer

* temp hide UK GiftAid checkbox (#3161)

* temp hide UK GiftAid checkbox

* temp disable UK GiftAid Tests

---------

Signed-off-by: Navansh <[email protected]>
Co-authored-by: Nenad Misic <[email protected]>
Co-authored-by: Juan Paolo Mariano <[email protected]>
Co-authored-by: SovereignAndrey <[email protected]>
Co-authored-by: Navansh <[email protected]>

* v2.4.2 (#3181)

* Disable tracking in `/donate-widget`  (#3163)

* move script to Seo component

* override seo in widget page

* remove duplicate route

* override when inside widget route

* donate widget override

* `Login` consistency (#3164)

* login consistency

* vitest upgrade

* Auth redirect (#3165)

* move hub to app

* use hub state instead of local storage

* convert to uncontrolled

* add isNpo flag

* password input autocomplete requirement

* autocomplete requirement

* state -> fromState

* state -> fromState

* trigger vaidation when clicking google signin

* move user type to top

* auth redirect

* add comment

* protected redirects to signup (#3178)

* No edit name (#3177)

* disable and add tooltip

* bump version

* use prompts instead (#3179)

* Program info in summary (#3180)

* accept program

* render program

* provide program value

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Bg1489 faqs (#3183)

* Email bugs (#3184)

* switch to no cors: verified to be still running

* move override further down

---------

Co-authored-by: SovereignAndrey <[email protected]>

* don't load static tokens on unsupported (no infra) chain (#3193)

* fix: admin pages reloading on navigation (#3195)

* update linkedin tracker (#3199)

* v2.4.3 (#3205)

* DAF Checkout with chariot  (#3143)

* Update tsconfig (#3038)

* update tsconfig

* update type import

* dont include type automatically

* Program donation dropdown (#3037)

* add program attribute

* update programId

* add program selector on stripe

* add program selector in crypt oform

* daf program selector

* stocks program selector

* absolute dropdown

* add programId in intent creation

* incrementers wrap

* add program flag

* UI flagged

* update tsconfig

* update type import

* dont include type automatically

* prepend general

* use programAllowed flag

* rename constant

* BG-1336: Donate to ap wallet directly (#2978)

* Update Polygon and Ethereum testnets to Amoy and Sepolia (#2937)

* Update Polygon and Ethereum testnets to Amoy and Sepolia

* Format

* BG-1253: Pending Payment donation pickup button (#2940)

* Add 'Finish Paying' to intent table

* Remove redundant endowment fields from Donate page

* Add logic to load intent data into Donate page

* Update intent type to include token + currency + frequency

* Use Currency instead of DetailedCurrency

* Update frequency to 'one-time'+'subscription'

* Show tip as pct

* Remove tx hash column on awaiting payment table

* Reset state.transactionId on component unmount

* Pass transactionId when creating intents

* Pass old intent id in PayPal

* Update endpoint

* Rename intentTransactionId->oldTransactionId

* Add comment

* Rename intentTransactionId->oldTransactionId

* link / col header fixes

---------

Co-authored-by: Andrey <SovereignAndrey>

* fix twitter acct handle used

* V3 endowment (#2941)

* BG-1225: Donation success page: Show the name of the nonprofit donor chose (#2869)

* Pass recipientName to DonateFiatThanks from PayPal checkout

* Pass recipientName in StripePaymentStatus

* Donate page: Create PayPal order (donation intent) only on button click (#2873)

* Add new 'intent' don. status

* Create PayPal order (donation intent) only on button click

* Remove redundant isSubmitting state

* Refactor createOrder

* Revert "Add new 'intent' don. status"

This reverts commit 54af8638beaf15ba61ad212a305c9fbd91b24734.

* UI Error handling (#2870)

Closes BG-1263
Closes BG-1172

This PR aims to separate UI error (UI is unusable, display fallback UI) from user-initiated error (e.g. failed submission, prompt with Modal). Kindly see comments for changes explanation

NOTE: renamings, moving of files are not applied yet so that essential changes would stand out.
- [ ] rename `useErrorContext` to `useErrorHandler`
- [ ] move `useErrorHandler` to `/hooks`
- [ ] delete `contexts/ErrorContext` 


## Explanation of the solution
Sample handled UI errors:

App encountered error
<img width="1470" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/19ed5295-e3a5-4c2d-a1df-ed5533af9011">

Page encountered error
<img width="1469" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/b5203b45-d09a-47e4-9332-e5eda57a40b5">

Stripe checkout failed
<img width="794" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/9104f821-71d3-4910-96e0-0732a63af301">


## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Slug preview (#2872)

## Explanation of the solution
* add slug preview
![image](https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/7e0a5dd8-62b5-4389-90fb-bb0bd57cc422)

## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Incorrect card sizes (#2874)

## Explanation of the solution
* for smaller card sizes (multiple cards per row, where card  title alignment matters ) just fill the standard (uniform height) card image area
<img width="491" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/0a4d01b9-84d4-444d-bb73-72385ce76c1d">

<img width="603" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/858f21ba-1111-499a-b72b-20005aa6602f">


* for wide card sizes (single card per rwo), just let the browser pick from srcset and sizes provided and use the rendered size
<img width="386" alt="image" src="https://github.com/AngelProtocolFinance/angelprotocol-web-app/assets/89639563/5e440c60-acdc-491e-992a-70363f9aa61a">



## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Remove `usdRate` from fiat donation payload and update PayPal proxy endpoint (#2875)

* Removed 'usdRate' from 'FiatDonation' payload

* Updated PayPal endpoints

* BG-1289 Widget word replaced (#2876)

## Explanation of the solution
Still uising "widget" in site copy. Replaces with "Donation Form". 

## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review
N/A

* BG-1281: master fixes (#2877)

## Explanation of the solution

## Instructions on making this work

- run `yarn` or `yarn install` to install npm dependencies
- run `yarn run test --watchAll` to verify all tests still pass
- (optional) run `yarn run build` to verify the build passes
- run `yarn start` to start the webapp
-

## UI changes for review

When major UI changes are introduced with a PR, please include links to URLS to compare or screenshots demonstrating the difference and notify on design changes

* Default currency (#2879)

* change type

* additional loading

* include cookie in request

* remove additional error ui

* BG-1239: Improve / Expand pending donation information (#2880)

* Add fiatramp field to DonationRecord type

* Fix network sortkey chainName->viaName

* Update to always use viaName even for fiat

* Fix NetworkDropdown to use Fiat: fiat option type

* Add third tab in the Donor's "My Donations" page that would allow them to see all payment intents explicitly (#2868)

* Include 'intent' in DonationsQueryParams['status']

* Add new 'Awaiting Payment' tab

* fix overlay for tabs

* Increase tab width to w-52

* Make more mobile-friendly

* BG-1295: Donation increment buttons (#2891)

* Add incrementers for USD

* Update src/components/donation/Steps/DonateMethods/Stripe/Incrementers.tsx

Co-authored-by: ap-justin <[email protected]>

* Use getValues instead of watch

---------

Co-authored-by: ap-justin <[email protected]>

* Set selected currency in cookie (#2893)

* custom host

* set cookie

* switch to onchange

* Update src/constants/urls.ts

added mapping in gateway

Co-authored-by: SovereignAndrey <[email protected]>

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Get/set cookie in client (#2896)

* cookie helpers

* set default code

* modify cookie on change

* set on endpoint instead

* side effect first

* comment out (#2898)

* BG-1286: compound SF opt-in (#2892)

* types and UI

* default value

* match server

* include in fetched

* BG-1298: fix img editor issues (#2897)

* remove pre-crop

* fix bug isDismissible not working

* simplify interface

* derive values

* validate cropped

* simplify handlers

* validate immediately

* remove outdated comment

* faq copy changes

* Added HomePage (#2894)

* Added HomePage

Signed-off-by: Navansh <[email protected]>

* Code Restructuring and Refactoring for Homepage

Signed-off-by: Navansh <[email protected]>

---------

Signed-off-by: Navansh <[email protected]>

* Landing page fixes (#2899)

* misnamed image file

* dup wildcard route removed

* formatting and other cleanup fixes

* spelling fixes

* fixes for styles renaming

* fix DOM property naming typo

* blog posts use dapp URL and remove trailing slash

* fix links to marketplace & register page

* fix DAPP link to drop app if on prod

* remove commented out code

* revert svg changes from DOM prop fix

* revert svg changes from DOM prop fix

* lint fixes pt1

* footer updates

* fix hooks

* use for...of

* Follow up fixes (#2901)

* yarn gormat

* done lint

* fix failing test

* revert rename

* revert react namespace

* react namespace

* react namespace

---------

Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: ap-justin <[email protected]>

* Convert common arbitrary values to built in tailwind classes (#2902)

* misnamed image file

* dup wildcard route removed

* formatting and other cleanup fixes

* spelling fixes

* fixes for styles renaming

* fix DOM property naming typo

* blog posts use dapp URL and remove trailing slash

* fix links to marketplace & register page

* fix DAPP link to drop app if on prod

* remove commented out code

* revert svg changes from DOM prop fix

* revert svg changes from DOM prop fix

* yarn gormat

* lint fixes pt1

* done lint

* footer updates

* fix failing test

* fix hooks

* use for...of

* revert rename

* revert react namespace

* react namespace

* react namespace

* blog card classes

* delete unused

* done blog card bene carousel

* more fixes

* remove unused controls

* remove unused controls

* remove one time

* unused utils

* to tailwind

* to navy

* to tw util

* to tailwind

* to tailwind

* to tailwind

---------

Co-authored-by: Andrey <SovereignAndrey>

* `DAPP_URL` to `BASE_URL` fix (#2903)

* DAPP_URL >> BASE_URL

* format/lint fixes

---------

Co-authored-by: Andrey <SovereignAndrey>

* To tsx (#2904)

* to tsx

* dryner

* common media

* remove template

* remove custom classes

* remove brand classes

* redirect signins to marketplace, not to root (#2905)

Co-authored-by: Andrey <SovereignAndrey>

* temp hide landing page btns (#2915)

Co-authored-by: Andrey <SovereignAndrey>

* Static pages for legal (#2917)

* routes for new legal pages

* 3 legal pages copied from prod

* fix landing page footerlinks

---------

Co-authored-by: Andrey <SovereignAndrey>

* Home groupings (#2916)

* remove nested

* animations

* blog card

* move hero bottom

* hero bottom

* benefits

* testimonials

* move footer

* nav bar footer

* move button

* fix lint

* Scope custom classes, remove unused (#2919)

* move carousel styles

* remove svg animation

* to module

* remove benefits landing

* remove util

* remove app.css

* common css import

* Reuse layout (#2918)

* reuse layout

* remove unused import

* move v2 footer to app/footer along with depreciated landing header file; refactor newsletter to use new styles w/ v2 footer; fix footer links & copyright;

* remove unused import

* footer social links from constants file

* fix test

* watch sticky instead of scroll

* remove no effect

* links clean up: dropdown menu & nav logo

---------

Co-authored-by: Andrey <SovereignAndrey>

* BG-1243: create crypto intents on Checkout page load + confirm crypto intents on success (#2895)

* Create crypto intent on checkout load + confirm on tx success

* Use template string in TxSubmit

* Extract useCreateCryptoIntent

* Show 'Simulating tx...' when no transactionId is present

* Remove transactionId state

* Refactor

* Turn useCryptoIntentCreatorMutation into a query

* Revert change to ErrorContext

* Remove transformResponse from useConfirmCryptoIntentMutation

* Include tip in crypto tx estimation

* Rename totalAmount->grossAmount

* Legal pages updates (#2922)

* updates to legal pages

* change Link to anchor tag

* link component added to terms page

---------

Co-authored-by: Andrey <SovereignAndrey>

* Landing page fixes (#2921)

* reuse layout

* remove unused import

* move v2 footer to app/footer along with depreciated landing header file; refactor newsletter to use new styles w/ v2 footer; fix footer links & copyright;

* remove unused import

* footer social links from constants file

* fix test

* watch sticky instead of scroll

* remove no effect

* links clean up: dropdown menu & nav logo

* hero

* done section 2

* overflow

* move asset

* position chars move assets

* remove custom css

* embed color

* exact

* done benefits

* done brands

* video desktop

* animation

* alt

* spaces

* roundness

* file name

* move assets

* done testimonials

* done blogs

* done blog

* external screen classes

* testimonials overflow fix

* hero hero bottom transition

* done hero

* carousel blemish

* benefits blemish

* done animation

* page spacing

* increate bot padding

* blurs

* skeleton

* add padding

* grid footer

* responsive styles

* intercom hide

* remove unused images

* icon

* slider buttons

* blemish transition

* spacing

* footer spacing

* increase blur

* Update src/App/Header/index.tsx

Co-authored-by: SovereignAndrey <[email protected]>

---------

Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: SovereignAndrey <[email protected]>

* overflow-x-hidden (#2923)

* hidden -> clip (#2924)

* BG tip - copy changed

* donation split copy changed

* split - patch for non-widgetConfig scenario

* temp removal of paypal btns from checkout (#2926)

* temp removal of paypal btns from checkout

* fix build

---------

Co-authored-by: Andrey <SovereignAndrey>

* copy fixes: Widget >> Donation Form

* swap in Laira mascot img

* adjust schema

* move program creator

* milestone

* remoev initial

* new program form

* new program update type

* fxi type error

* update delete

* done program editor

* add deafult value

* milestone buttons

* test change

* usesubmit only

* git reset

* remove mb-2

* create program

* add milestone

* delete method

* revert to program editor

* form before clean

* revert name

* back to defaultVals

* use values

* switch to v8 endowment

* update endpoint algolia

* registration-update

* bump endpoint versions

* crypto intent ver

* bump version

* wise error display

---------

Signed-off-by: Navansh <[email protected]>
Co-authored-by: Nenad Misic <[email protected]>
Co-authored-by: Juan Paolo Mariano <[email protected]>
Co-authored-by: SovereignAndrey <[email protected]>
Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: Navansh <[email protected]>

* Rolled back stripe donation endpoint (#2944)

* up version (#2945)

* Update deps (#2948)

* update biome and amplify

* update stripe and other minor

* rest minor

* update package manager

* revert test

* BG-1307 GDPR Banner (#2946)

* GDPR banner for non-essential cookies/trackers

* transfer to module

---------

Co-authored-by: Andrey <SovereignAndrey>
Co-authored-by: ap-justin <[email protected]>

* Rolled back crypto-donation endpoint (#2950)

* BG-1312: Nonprofits page (#2951)

* done hero

* increase padding

* nonprofit info

* done why bg

* brands content

* extract benefits content

* done benefits

* new braands

* done fiscal sponsorship

* move testimonial content

* done testimonials

* bottom cta done

* correct copy

* donor info link

* update vitest

* BG-1320 Homepage fixes (#2943)

* loader color

* brand img explicit height

* tally explicit height

* endow card explicit height

* testimonial card epxlict height

* base layout

* path bg

* Testimonials fixes to copy for punctuation and other typos/errors (#2947)

Co-authored-by: Andrey <SovereignAndrey>

* Carousel cards mixed up (#2949)

Co-authored-by: Andrey <SovereignAndrey>

* format

* fix cherrypick

* cherry fix

* detail fixes

---------

Co-authored-by: SovereignAndrey <[email protected]>

* BG-1326 Fallback Image updated (#2952)

* flying character used as fallback for logo/card img everywhere

* new img

* BG-1311: Donor info page (#2953)

* done hero

* increase padding

* nonprofit info

* done why bg

* brands content

* extract benefits content

* done benefits

* new braands

* done fiscal sponsorship

* move testimonial content

* done testimonials

* bottom cta done

* correct copy

* donor info link

* update vitest

* BG-1320 Homepage fixes (#2943)

* loader color

* brand img explicit height

* tally explicit height

* endow card explicit height

* testimonial card epxlict height

* base layout

* path bg

* Testimonials fixes to copy for punctuation and other typos/errors (#2947)

Co-authored-by: Andrey <SovereignAndrey>

* Carousel cards mixed up (#2949)

Co-authored-by: Andrey <SovereignAndrey>

* format

* fix cherrypick

* cherry fix

* detail fixes

* done hero

* move hero bottom

* benefits abstract

* benefits section

* done cta

* cta text

* add donors link

* delete

* move img

---------

Co-authored-by: SovereignAndrey <[email protected]>

* Added JWT to registration update endpoint (#2954)

* update endpoints (#2955)

* BG-1327 Banner fallback (#2966)

* fallback banner added for profile

* admin logo fallback to character

* Get user attributes from DB instead of cognito (#2967)

* session loader

* update types

* formatted

* remove unused

* remove duplicate check

* env

* User dashboard (#2968)

* common layout

* rename sidebar header

* move sidebar header

* factor out header

* fix layout

* user dashboard

* capitalize

* copy settings page

* edit profile page

* dashborad link

* create update action

* BG-1331: Move donate page inside user dashboard (#2970)

* convert to container query

* move donations to user dashboard

* dont show icon on dashbaord

* revert hide icon

* Implement share in stripe success page (#2972)

* add recipientId

* extract share

* use extracted

* BG-1333 T&C for Widgets (#2973)

* Basic T&C added to bottom of Widget + Config preview

* simplify widget terms to remove name

* move T&C to Content component to access queried profile object

* add intent as old (#2977)

* add unsupported chainId

* skip estimation

* token option

* crypto qr submit

* update copier api

* add direct mode

* direct option

* receiver addr

* change copy (#2990)

* BG-1341 Widget adaptations (#2976)

* hide lines in summary screen when related amounts are 0 (or tipping is disabled)

* Stock & DAF donations can set BG tip & split %

* Add SF fund explainer and Laira character to Summary view

* Address PR feedback

* tweak summary info shown w/ Tip/SF logic

* BG-1346 Donation Builder: style fixes and design improvement (#2989)

* design/style changes to donation form builder

* span >> div

* tweak styles for padding & alignment on smaller screen layout

* Address PR feedback

* Nonprofits page improvs (#2991)

* change hero img

* remove old hero img

* add laira imgges

* remove waiving char

* use latest waiving char

* replace waiving laira

* replace icon with laira

* why bg icons

* sf benefits content

* formatting

* replace waving (#2992)

* Donor page changes (#2993)

* replace waving

* repalce hero image

* use sf assets

* delete unused

* laira icons

* benefits order

* fixes for testimonals

* remove unused file (missed in orig merge)

* Home fixes (#2995)

* remove unused

* replace wavenly with core

* change brands heading

* add spacing

* remove unused module

* Donate form screen short carousel (#2997)

* remove unused

* new screen shots

* create carousel

* use new carousel

* fix size

* remove unusd

* Remove Leaderboard (#2996)

* remove unused leaderboard code & tests

* remove additional Leaderboard items

* add small padding to bottom of SF msg so doesn't run into payment form (#2998)

* Bg 1343 - move tip opt out to settings (#2999)

* update types

* move component

* fix type error

* Incrementors adapted to work with all currencies (#3004)

* BG-1350 ComplyDog sans Quill (#3005)

* complydog JS sans Quill

* use local script instead of hitting complydog's server

* BG-1344: Program donate checkbox (#3003)

* add prog type

* prog disable checkbox

* retrive attribute

* correct endpoints (#3000)

* rename variable

* Donation state handling (#3002)

* local state

* improve shape

* apply new types

* save

* widge…
  • Loading branch information
5 people committed Aug 8, 2024
1 parent 5e80ab5 commit 3c97a88
Show file tree
Hide file tree
Showing 16 changed files with 98 additions and 35 deletions.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"gsap": "3.12.5",
"is-mobile": "4.0.0",
"mipd": "0.0.7",
"nprogress": "0.2.0",
"qrcode.react": "3.1.0",
"quill": "2.0.2",
"react": "18.2.0",
Expand Down Expand Up @@ -88,6 +89,7 @@
"@testing-library/react": "16.0.0",
"@testing-library/user-event": "14.5.2",
"@types/node": "18.18.13",
"@types/nprogress": "^0",
"@types/react": "18.2.62",
"@types/react-csv": "1.1.10",
"@types/react-dom": "18.2.19",
Expand Down
2 changes: 1 addition & 1 deletion public/scripts/linkedin-tracking.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
_linkedin_partner_id = "4969890";
_linkedin_partner_id = "6373172";
window._linkedin_data_partner_ids = window._linkedin_data_partner_ids || [];
window._linkedin_data_partner_ids.push(_linkedin_partner_id);

Expand Down
23 changes: 22 additions & 1 deletion src/App/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { appRoutes, donateWidgetRoutes } from "constants/routes";
import ModalContext from "contexts/ModalContext";
import { RouterErrorBoundary } from "errors/ErrorBoundary";
import useScrollTop from "hooks/useScrollTop";
import NProgress from "nprogress";
import { adminRoute } from "pages/Admin";
import { routes as blogRoutes } from "pages/Blog";
import { giftRoute } from "pages/Gift";
Expand All @@ -10,11 +12,13 @@ import { profileRoute } from "pages/Profile";
import { route as regRoute } from "pages/Registration";
import { userDashboardRoute } from "pages/UserDashboard";
import { infoRoutes } from "pages/informational";
import { useEffect } from "react";
import {
Navigate,
Outlet,
type RouteObject as RO,
useLocation,
useNavigation,
} from "react-router-dom";
import { usePingQuery } from "services/aws/aws";
import Layout from "./Layout";
Expand Down Expand Up @@ -101,11 +105,28 @@ const rootRoutes: RO[] = [
];

export const routes: RO[] = [
{ element: <RootLayout />, children: rootRoutes },
{
element: <RootLayout />,
children: rootRoutes,
ErrorBoundary: RouterErrorBoundary,
},
{ path: "*", element: <Navigate to="/" /> },
];

NProgress.configure({
showSpinner: false,
});

function RootLayout() {
const transition = useNavigation();
useEffect(() => {
// when the state is idle then we can to complete the progress bar
if (transition.state === "idle") NProgress.done();
// and when it's something else it means it's either submitting a form or
// waiting for the loaders of the next location so we start it
else NProgress.start();
}, [transition.state]);

/**
* ping AWS api every 5 minutes,
* this invokes token refresh and fires refresh events: tokenRefresh | tokenRefresh_failure.
Expand Down
1 change: 0 additions & 1 deletion src/components/donation/Steps/DonateMethods/Daf/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type { FormValues as FV, Props } from "./types";
/**
* Only USD donations are permissible for DAF donations.
* The minimum amount differs depending on which provider is selected.
* $50 min is common
*/
const USD_CURRENCY: DetailedCurrency = { code: "usd", rate: 1, min: 50 };

Expand Down
6 changes: 5 additions & 1 deletion src/components/donation/Steps/Submit/Crypto/DirectMode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,14 @@ export default function DirectMode({ donation, classes = "" }: Props) {
...(details.program.value && { programId: details.program.value }),
});

const totalDisplayAmount =
+details.token.amount + (tip?.value ?? 0) + feeAllowance;

return (
<div className={`${classes} grid justify-items-center`}>
<p className="text-navy-l1 text-balance text-center mb-3.5 max-w-sm">
To complete your donation, send {details.token.amount}&nbsp;
To complete your donation, send {totalDisplayAmount}
&nbsp;
{details.token.symbol} from your crypto wallet to the address below
</p>
<QueryLoader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { appRoutes } from "constants/routes";
import { useErrorContext } from "contexts/ErrorContext";
import { useModalContext } from "contexts/ModalContext";
import ErrorBoundary from "errors/ErrorBoundary";
import { useState } from "react";
import { type ChangeEvent, useState } from "react";
import ChariotConnect from "react-chariot-connect";
import { useForm } from "react-hook-form";
import { useNavigate } from "react-router-dom";
Expand Down Expand Up @@ -57,6 +57,7 @@ export default function ChariotCheckout(props: DafCheckoutStep) {
register,
trigger,
getValues,
resetField,
} = useForm<FV>({
defaultValues: {
...(props.honorary || {
Expand Down Expand Up @@ -150,7 +151,14 @@ export default function ChariotCheckout(props: DafCheckoutStep) {
*/}

<CheckField
{...register("withHonorary")}
{...register("withHonorary", {
onChange: (e: ChangeEvent<HTMLInputElement>) => {
if (!e.target.checked) {
resetField("withTributeNotif");
resetField("tributeNotif");
}
},
})}
classes="col-span-full mt-4"
>
Dedicate my donation
Expand Down
10 changes: 1 addition & 9 deletions src/components/donation/Steps/Summary/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,6 @@ export default function Summary(props: SummaryStep) {
tributeNotif,
...donor
}) => {
const feeAllowance =
fvCoverFee &&
(details.method === "crypto" || details.method === "stripe")
? processingFee(
amount,
details.method === "stripe" ? "stripe" : details.chainId
)
: 0;
setState({
...props,
step: "submit",
Expand All @@ -108,7 +100,7 @@ export default function Summary(props: SummaryStep) {
withTributeNotif,
tributeNotif,
},
feeAllowance,
feeAllowance: processingFee(details),
});
}}
classes="mt-6"
Expand Down
22 changes: 12 additions & 10 deletions src/components/donation/Steps/Summary/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
import { chains } from "constants/chains";
import { PROCESSING_RATES } from "constants/common";
import type { ChainID } from "types/chain";
import type { DonateMethodId } from "types/lists";
import type { DonationDetails } from "../types";

export const processingFee = (
amount: number,
platform: Extract<DonateMethodId, "stripe"> | ChainID
) =>
amount *
(platform === "stripe"
? PROCESSING_RATES.stripe
: chains[platform].processingRate);
export const processingFee = (details: DonationDetails): number => {
if (details.method === "crypto") {
return +details.token.amount * chains[details.chainId].processingRate;
}

if (details.method !== "stripe") return 0;

/** @see https://stripe.com/pricing */
const fixedFeeUnits = 0.3 /** 30cents */ * details.currency.rate;
return PROCESSING_RATES.stripe * +details.amount + fixedFeeUnits;
};
3 changes: 1 addition & 2 deletions src/components/donation/Steps/common/Summary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export default function Summary({
const locked = props.amount - liq;

const tipValue = props.tip?.value ?? 0;
const oneTimeTip = frequency === "subscription" ? 0 : tipValue;

return (
<div className={container}>
Expand Down Expand Up @@ -114,7 +113,7 @@ export default function Summary({
Total {frequency === "subscription" ? "monthly " : ""}charge
</dt>
<Amount
amount={props.amount + oneTimeTip + (props.feeAllowance ?? 0)}
amount={props.amount + tipValue + (props.feeAllowance ?? 0)}
/>
</div>
</dl>
Expand Down
7 changes: 7 additions & 0 deletions src/errors/ErrorBoundary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
type PropsWithChildren,
type ReactNode,
} from "react";
import { useRouteError } from "react-router-dom";
import DefaultFallback from "./DefaultFallback";

type Props = PropsWithChildren<{ fallback?: ReactNode }>;
Expand Down Expand Up @@ -33,3 +34,9 @@ export default class ErrorBoundary extends Component<Props, State> {
: this.props.children;
}
}

export function RouterErrorBoundary() {
const error = useRouteError();
logger.error(error);
return <DefaultFallback />;
}
1 change: 1 addition & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
@import "../node_modules/swiper/swiper.min.css";
@import "../node_modules/swiper/modules/pagination.min.css";
@import "../node_modules/swiper/modules/navigation.min.css";
@import "../node_modules/nprogress/nprogress.css";

@import "tailwindcss/components";
@import "./styles/components.css";
Expand Down
2 changes: 1 addition & 1 deletion src/pages/@sections/HeroBottom/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const Card = (props: EndowmentCard) => {
</div>

<Link
to={`${appRoutes.marketplace}/${props.id}`}
to={`${appRoutes.donate}/${props.id}`}
className="my-4 justify-self-center self-end rounded-[40px] py-2 px-7 border-2 border-solid border-blue-d1 text-blue-d1 font-semibold font-heading"
>
Donate
Expand Down
7 changes: 2 additions & 5 deletions src/pages/Admin/Charity/EditProfile/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { ImgLink } from "components/ImgEditor";
import { MAX_SDGS } from "constants/unsdgs";
import { genFileSchema } from "schemas/file";
import { optionType, richTextContent } from "schemas/shape";
import { url, alphanumeric, requiredString } from "schemas/string";
import { url, alphanumeric, requiredString, segment } from "schemas/string";
import type { SchemaShape } from "schemas/types";
import type { ImageMIMEType } from "types/lists";
import { type ObjectSchema, array, object, string } from "yup";
Expand Down Expand Up @@ -49,8 +49,5 @@ export const schema = object<any, SchemaShape<FV>>({
tiktok: url,
}),
overview: richTextContent({ maxChars: MAX_CHARS }),
slug: string()
.trim()
.max(30, "max 30 characters")
.matches(/\D|^$/, "can't use id as slug"),
slug: segment.max(30, "max 30 characters"),
}) as ObjectSchema<FV>;
4 changes: 2 additions & 2 deletions src/pages/Profile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import {
useOutletContext,
useParams,
} from "react-router-dom";
import { segment } from "schemas/string";
import { useEndowment } from "services/aws/useEndowment";
import { bodyRoute } from "./Body";
import PageError from "./PageError";
import ProfileContext, { useProfileContext } from "./ProfileContext";
import Skeleton from "./Skeleton";

const slug = /\D/;
function Profile() {
const legacy = useOutletContext<true | undefined>();
const { id = "" } = useParams<{ id: string }>();

const { isLoading, isError, data } = useEndowment(
slug.test(id) ? { slug: id } : { id: Number(id) }
segment.isValidSync(id) ? { slug: id } : { id: Number(id) }
);

if (isLoading) return <Skeleton />;
Expand Down
15 changes: 15 additions & 0 deletions src/schemas/string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ export const url = Yup.string()
return "invalid url";
});

export const segment = Yup.string()
.trim()
.test("not-id", "should not be an id", (v) =>
v ? /^(?!^\d+$)/.test(v) : true
)
.test("valid-char", "invalid segment", (v) =>
v ? /^[a-zA-Z0-9-._~]+$/.test(v) : true
)
.test("no double period", "invalid segment", (v) => !v?.includes(".."))
.test(
"no-starting-ending-period",
"invalid segment",
(v) => !v?.startsWith(".") && !v?.endsWith(".")
);

export function walletAddrPatten(chainId: SupportedChainId) {
switch (chainId) {
case "1":
Expand Down
16 changes: 16 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3837,6 +3837,13 @@ __metadata:
languageName: node
linkType: hard

"@types/nprogress@npm:^0":
version: 0.2.3
resolution: "@types/nprogress@npm:0.2.3"
checksum: 10/2bd96ba1167f548e8f898ae8a790b6501a5422217621c9b8ea75962f3e8473f0e371058b79d83e04e80a6bfee2d66fc6612cdb28296648007b35d3c2a6d64e5c
languageName: node
linkType: hard

"@types/prop-types@npm:*":
version: 15.7.11
resolution: "@types/prop-types@npm:15.7.11"
Expand Down Expand Up @@ -4476,6 +4483,7 @@ __metadata:
"@testing-library/react": "npm:16.0.0"
"@testing-library/user-event": "npm:14.5.2"
"@types/node": "npm:18.18.13"
"@types/nprogress": "npm:^0"
"@types/react": "npm:18.2.62"
"@types/react-csv": "npm:1.1.10"
"@types/react-dom": "npm:18.2.19"
Expand All @@ -4495,6 +4503,7 @@ __metadata:
lefthook: "npm:1.6.15"
mipd: "npm:0.0.7"
msw: "npm:2.3.1"
nprogress: "npm:0.2.0"
postcss-import: "npm:16.1.0"
qrcode.react: "npm:3.1.0"
quill: "npm:2.0.2"
Expand Down Expand Up @@ -7718,6 +7727,13 @@ __metadata:
languageName: node
linkType: hard

"nprogress@npm:0.2.0":
version: 0.2.0
resolution: "nprogress@npm:0.2.0"
checksum: 10/1870a74c054c01899f89e85122d7548832d083b5fa5d3cc6aafc2d4f92901e15face402ef557be5b103aed7b6e1406c656b842dec32b553b4b052031ea1b0935
languageName: node
linkType: hard

"nwsapi@npm:^2.2.10":
version: 2.2.10
resolution: "nwsapi@npm:2.2.10"
Expand Down

0 comments on commit 3c97a88

Please sign in to comment.