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

Add participating stores to Rewards screen #129

Merged
merged 14 commits into from
Apr 30, 2020
Merged

Conversation

annieyro
Copy link
Collaborator

@annieyro annieyro commented Apr 23, 2020

What's new in this PR

  • Added the list of stores which accept rewards to the 'Healthy Rewards' tab.
  • Clicking the store name redirects to the map (just as clicking the store card in StoreListScreen does)

Unrelated fixes

  • Pulled rewardPointValue and rewardDollarValue from /constants for the cards from Additional reward cards for point history #93
  • Added key for those lists (would happen rarely in PROD assuming customers have small total purchase amounts in $)
  • Added testing bypass button back in dev mode (necessary to test this feature since you need to be able to see rewards)
  • Renamed a function because it was no longer transitioning to StoreDetails LOL

Relevant Links

Online sources

We should fix this error probably? "never" is a scary word 🤷‍♀️ (lol)
https://www.lahteenlahti.com/fixing-virtualizedlists-should-never-be-nested-inside-plain-scrollviews/

Related PRs

branches off #128
update #93

How to review

Styling

Not sure if spacing still needs to be adjusted, especially the indent.

Functionality

Log in, make sure nothing breaks, and that stores redirect correctly.

Try updating the rewards accepted value in the [DEV] Airtable (but remember to switch it back after, please)

If erroneous lint/prop-types errors show up, please review #128

Next steps

N/A

Tests Performed, Edge Cases

  • This won't scale well (i.e when > 5 stores are accepting rewards the design should probably be updated, or this feature removed entirely).
  • Noticed some very edge-case bugs (should never happen in PROD, though) unrelated to the current PR
  • If transaction does not have a rewardsUnlocked or rewardsApplied value (or whichever) the Array(rewardsUnlocked)... throws an error like 'Array size too big', probably because the value is undefined

Screenshots

image

https://www.loom.com/share/8f9166e49f9544edae54188634e6bd53

CC: @wangannie

@annieyro annieyro self-assigned this Apr 23, 2020
Copy link
Member

@wangannie wangannie left a comment

Choose a reason for hiding this comment

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

Looks great! I just noted a small change to improve accessibility with the buttons.
This led me to ask a few Quacetions so these designs may be subject to change (sorry), but either I or Ace will let you know if anything does need to be changed once those are addressed.

cc @12aschen

style={{ marginLeft: 8 }}
key={store.id}
onPress={() =>
navigation.navigate('Stores', {
Copy link
Member

Choose a reason for hiding this comment

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

Hmm this is really really slow to load for some reason. Could we do first do a navigation.goBack then do changeCurrentStore from MapScreen to set the store if that's not too clunky?

Copy link
Member

Choose a reason for hiding this comment

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

Just so it doesn't leave the user staring at the screen wondering what's happening/what's supposed to happen.

Also, can you wrap these in touchable opacities so there's some response when these are clicked? Even that might help indicate that some action is supposed to happen bc rn it's quite ambiguous.

Copy link
Collaborator Author

@annieyro annieyro Apr 24, 2020

Choose a reason for hiding this comment

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

Could we do first do a navigation.goBack then do changeCurrentStore from MapScreen to set the store if that's not too clunky?

AFAIK this isn't possible? The method that gets invoked is componentWillReceiveProps, which is setting the store in MapScreen. Also it wasn't slow for me on simulator :o

can you wrap these in touchable opacities so there's some response when these are clicked

👍

@wangannie wangannie requested a review from kennethlien April 23, 2020 23:44
Copy link
Contributor

@kennethlien kennethlien left a comment

Choose a reason for hiding this comment

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

Didn't see anything funky other than what wannie pointed out, lgtm

@annieyro
Copy link
Collaborator Author

Updated styling + added to guest mode
image
image

@annieyro annieyro changed the base branch from annie/lint-customer to master April 30, 2020 05:42
@annieyro annieyro requested a review from wangannie April 30, 2020 05:44
Copy link
Member

@wangannie wangannie left a comment

Choose a reason for hiding this comment

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

Noted a very small quick change but otherwise looks good.

<TouchableOpacity key={store.id}>
<Subhead
style={{ marginLeft: 12 }}
onPress={() =>
Copy link
Member

Choose a reason for hiding this comment

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

When I click this, it doesn't show the map marker as selected.

@wangannie wangannie merged commit fac5b52 into master Apr 30, 2020
@wangannie wangannie deleted the annie/participating branch April 30, 2020 07:19
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.

3 participants