Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Points: introductory flow #5201

Merged
merged 17 commits into from
Dec 1, 2023

Conversation

benisgold
Copy link
Contributor

@benisgold benisgold commented Nov 25, 2023

Fixes APP-####

What changed (plus any additional context for devs)

Built out the following UI for points onboarding and hooked up the backend logic for referral code verification

Screenshot 2023-11-30 at 4 34 46 PM

Screen recordings / screenshots

What to test

@benisgold benisgold changed the base branch from develop to @benisgold/points-tab-data November 25, 2023 02:16
@benisgold benisgold changed the title @benisgold/points signing Points: claim flow (not including signing) Nov 30, 2023
@benisgold benisgold marked this pull request as ready for review November 30, 2023 00:51
@@ -46,7 +46,7 @@
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
Copy link
Contributor Author

Choose a reason for hiding this comment

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

so keyboard doesn't push up tab bar on android

Copy link
Contributor

Choose a reason for hiding this comment

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

should take a look at how this impacts the send flow

@@ -126,7 +126,13 @@ export function TabBarIcon({
const backgroundColor = interpolateColor(
reanimatedPosition.value,
[index - 0.7, index - 0.3, index, index + 0.3, index + 0.7],
[accentColor, accentColor, accentColor, accentColor, accentColor]
[
accentColor ?? colors.appleBlue,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

was causing some crashes in the case that accentColor did not exist

@@ -122,197 +122,205 @@ const TabBar = ({
// ],
// };
// });

const ShadowWrapper = ({ children }) => {
Copy link
Contributor Author

@benisgold benisgold Nov 30, 2023

Choose a reason for hiding this comment

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

not sure why this file's formatting changed so much, but this ShadowWrapper is the only change. prevents tab bar from being unresponsive in points tab.

@benisgold benisgold changed the title Points: claim flow (not including signing) Points: introductory flow Dec 1, 2023
@@ -46,7 +46,7 @@
android:exported="true"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
Copy link
Contributor

Choose a reason for hiding this comment

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

should take a look at how this impacts the send flow

@@ -10,7 +10,7 @@ exports.config = {
metadata: {
__name: 'metadata',
document: './queries/metadata.graphql',
schema: { method: 'GET', url: 'https://metadata.p.rainbow.me/v1/graph' },
schema: { method: 'POST', url: 'https://metadata.p.rainbow.me/v1/graph' },
Copy link
Contributor

Choose a reason for hiding this comment

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

afaik we should be using POST for all metadata calls, if you need to use POST feel free to rename the simulation config to something more generic and use that for points

iirc POST messes with cloudflare caching so we should only use where necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok cool thanks for the info. renamed simulation/simulationClient to metadataPOST/metadataPOSTClient

{avatarURL ? (
<Box
as={Image}
source={{ uri: maybeSignUri(avatarURL) }}
Copy link
Contributor

Choose a reason for hiding this comment

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

should pop a width on this so its resized just in case

􀙬
</Text>
<Text color="labelQuaternary" size="13pt" weight="semibold">
{`40 ${i18n.t(i18n.l.points.points.days)}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

prob will want to change this hardcoded value if were using a remote flag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this in follow up pr that i'm working on

addressCopiedToastAtom
);

useFocusEffect(
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont think we need this here

Copy link
Contributor

Choose a reason for hiding this comment

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

logic doenst make sense maybe from previous testing?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah no longer needed

}, 2000);
}
onNewEmoji();
setClipboard(accountAddress);
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't this be referral code? also curious id this maybe should copy the full link vs just the code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed this in follow up pr that i'm working on

weight="semibold"
numberOfLines={1}
>
rainbow.me/points?ref=0x2e6786983232jkl
Copy link
Contributor

Choose a reason for hiding this comment

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

hardcoded

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed this in follow up pr that i'm working on

* Add SF Mono, SF Pro Rounded Black

* Add AnimatePresence

* Update green/red colors

* Add ConsoleSheet

* Hook up iOS fonts

* Hook up to PointsScreen

* Style fixes

* hook up some logic to claim signing

* no retroactive points ui

* fix points content layout

* fix

* i18n

* fix error logging

---------

Co-authored-by: Christian Baroni <[email protected]>
@benisgold benisgold force-pushed the @benisgold/points-signing branch from 9e0a358 to 3fbbf9b Compare December 1, 2023 23:09
@benisgold benisgold merged commit 6fb56b6 into @benisgold/points-tab-data Dec 1, 2023
3 of 4 checks passed
@benisgold benisgold deleted the @benisgold/points-signing branch December 1, 2023 23:22
benisgold added a commit that referenced this pull request Dec 1, 2023
* points hook

* some error state + pull to refresh

* fix copy haptic + pull to refresh

* fix

* Points: introductory flow (#5201)

* refactor

* claim logic

* mutation

* claim content

* referral screen

* referral ui

* temp

* fix android input and tabs

* fix animation + back button android

* layout fixes

* final fixes + i18n

* Points: signing up (#5210)

* Add SF Mono, SF Pro Rounded Black

* Add AnimatePresence

* Update green/red colors

* Add ConsoleSheet

* Hook up iOS fonts

* Hook up to PointsScreen

* Style fixes

* hook up some logic to claim signing

* no retroactive points ui

* fix points content layout

* fix

* i18n

* fix error logging

---------

Co-authored-by: Christian Baroni <[email protected]>

* remove obsolete useFocusEffect

* ImgixImage

* simulationClient -> metadataPOSTClient

---------

Co-authored-by: Christian Baroni <[email protected]>

---------

Co-authored-by: Christian Baroni <[email protected]>
skylarbarrera added a commit that referenced this pull request Dec 11, 2023
* points tab ui

* i18n

* fix

* fix android

* android fix

* Points: hook up points tab ui to metadata api (#5176)

* points hook

* some error state + pull to refresh

* fix copy haptic + pull to refresh

* fix

* Points: introductory flow (#5201)

* refactor

* claim logic

* mutation

* claim content

* referral screen

* referral ui

* temp

* fix android input and tabs

* fix animation + back button android

* layout fixes

* final fixes + i18n

* Points: signing up (#5210)

* Add SF Mono, SF Pro Rounded Black

* Add AnimatePresence

* Update green/red colors

* Add ConsoleSheet

* Hook up iOS fonts

* Hook up to PointsScreen

* Style fixes

* hook up some logic to claim signing

* no retroactive points ui

* fix points content layout

* fix

* i18n

* fix error logging

---------

Co-authored-by: Christian Baroni <[email protected]>

* remove obsolete useFocusEffect

* ImgixImage

* simulationClient -> metadataPOSTClient

---------

Co-authored-by: Christian Baroni <[email protected]>

---------

Co-authored-by: Christian Baroni <[email protected]>

* merge fix

* Points fixes (#5219)

* points hook

* some error state + pull to refresh

* fix copy haptic + pull to refresh

* refactor

* claim logic

* fix

* mutation

* Add SF Mono, SF Pro Rounded Black

* Add AnimatePresence

* Update green/red colors

* Add ConsoleSheet

* Hook up iOS fonts

* Hook up to PointsScreen

* Style fixes

* claim content

* referral screen

* referral ui

* temp

* fix android input and tabs

* fix animation + back button android

* layout fixes

* final fixes + i18n

* hook up some logic to claim signing

* no retroactive points ui

* fix points content layout

* fix

* animiation fix

* referral code ui

* fix invalid referral error

* remove leaderboard row nav to profile

* remove obsolete card + add rank card

* black font weight for total points

* refetch if past next distribution date

* change rank icon to support higher ranks

* leaderboard up to rank 100

* fix black font android

* tweak sf mono font

* dont render ens nft avatars in leaderboard

* ActionButton

* points icon animation

* fix points gradient

* format total # points users

* restrict read only wallets

* copy

* referral code query update

* fixing referral validation

* fix merge error

* fix referral code input

* change metadata api fetch method from post to get

* routes

* i18n

* console sheet nav

---------

Co-authored-by: Christian Baroni <[email protected]>

* add contentful points tweet intent schema and queries (#5228)

* i18n

* real referral url

* rm TAB_BAR_HEIGHT

* Add referral share step (#5229)

* add contentful points tweet intent schema and queries

* progress on points share screen

* finish flow

* clean up code and break it into smaller files

* refactor progress

* final changes

* finished up

* lint

* revert graphql endpoint test

* share bonus points

---------

Co-authored-by: Ben Goldberg <[email protected]>

* fix referral skeleton ui

* fix android NeonButton

* cleanup

* types

* add 3 dots back to calculating points

* fix share link

* fix android shadow clipping

* fix continue button not showing

* [APP-972]: Fix back button being under the bottom tab bar (#5231)

* fix continue button not showing

* fix back button being under the bottom tabbar

* 1000 -> 100 bonus pts

* add a hardcoded version of tweet intent to build copy (#5235)

* fix placeholder on android (#5234)

* add proper twitter intents

* change intent slightly

* fix: rainbow text spacing and font issues

* fix fonts

* Bug bash fixes (#5237)

* additional onboard error handling

* fix skip

* copy

* bump referral keyboard delay

* fix double referral link when sharing

* fix next drop card date conversion

* tweak refetch interval slightly

* twitter intent tweak

* fix console animation + hide mm row if 0

* console button animation delay

* tweak twitter intent

* bonus points -> welcome bonus || true believer

* block hardware wallet

* leaderboard row onpress + refactor

* next drop card tweak

* deeplink

* referral bug fix

* fix android referral code text color

* attempt to fix ledger sign on console sheet

* analytics events

* fix android points mask

* add ledger (#5233)

* add ledger

* logs

* logs

* logs

* analytics events

* tweaks

* logs

* moar logs

---------

Co-authored-by: Ben Goldberg <[email protected]>

* remove url encoded (#5240)

* added analytics events

* next drop rounding fix

* rm console logs

---------

Co-authored-by: Christian Baroni <[email protected]>
Co-authored-by: Matthew Wall <[email protected]>
Co-authored-by: Derek <[email protected]>
Co-authored-by: Skylar Barrera <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants