-
Notifications
You must be signed in to change notification settings - Fork 4
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 History and Rewards tab bar styling + Rewards navigation animations #46
Conversation
export const CircleIconContainer = styled.View` | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
height: 40px; | ||
width: 40px; | ||
padding: 8px; | ||
border-radius: 20px; | ||
background-color: ${props => props.color || Colors.lighterGreen}; | ||
`; | ||
|
||
export const ButtonContainer = styled.TouchableOpacity``; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style thing? i think a lot of our other stuff has the icon vertically centered so maybe we should change this to match that, but @12aschen should chime in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what you mean—vertically centered to what? Lines 29 & 30 should make it centered.
<CircleIcon | ||
icon="star" | ||
iconColor={Colors.primaryGreen} | ||
circleColor={Colors.lightest} | ||
/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ty for the fix here, it was so jank before LOL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added a couple comments, looks very cool! B)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did not try on simulator because I've been working on refactor for awhile 😅 Small nits but code looks good!
@@ -31,18 +28,21 @@ StoresStack.navigationOptions = { | |||
drawerLabel: 'Stores' | |||
}; | |||
|
|||
export const RewardsStack = createStackNavigator( | |||
export const RootStack = createStackNavigator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very cool !!
@@ -141,18 +144,17 @@ export default class RewardsScreen extends React.Component { | |||
return ( | |||
<Container> | |||
<TopTab> | |||
<BackButton onPress={() => this.props.navigation.navigate('Stores')}> | |||
<BackButton onPress={() => this.props.navigation.goBack()}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work even if you access the Rewards
screen by navigating there from the drawer?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! I changed it to goBack because it would reload the entire map when I closed it from the drawer and that got really slow.
<Overline style={{ marginTop: 24, marginBottom: 12 }}> | ||
Reward Progress | ||
</Overline> | ||
<Title style={{ marginBottom: 2 }}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Figma has the first number in BigTitle
😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Kenneth and I agreed on abandoning that when the alignment of 2 different line heights was getting really annoying 😶
What's new in this PR
Overall, made Rewards and Point History look and feel smoother + various other cleanup.
CircleIcon
component to standardize all the repeated circle icons throughout the appRelevant Links
Online sources
The reasoning for adding RootStack with Rewards as a modal came from this.
https://stackoverflow.com/questions/44248403/passing-props-with-screen-option-in-drawernavigator
Sample modal interaction Expo Snack
Related PRs
Continuing to finalize and clean up details from #42 and #30
How to review
CircleIconContainer
inBaseComponents
, but I didnt' want to have to make a another styled just for that... thoughts?Next steps
CircleIcon
withNavButton
from Navigation Button restyling + Misc. style fixes #42Tests Performed, Edge Cases
Screenshots
Points History screen
Rewards heading with tab bar
Transaction cards
Full interaction:
https://www.loom.com/share/945e0d03cab24fcf817938a088cd6069
🥳Rewards finally slides upward!
CC: @anniero98 @wangannie