-
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
Airtable refactor, bug fixes, Auth overhaul #48
Conversation
…h VSCode format on save
- Deprecated: removed pull-to-refresh implementation to declutter the file. We can add it back from a different trigger if necessary. Removed deprecated props which were not being used in `RewardsHome` and `PointsHistory` components. - Cleanup: Made `Overline` components normally-cased (since the styled component uses `text-transform`) - Cleanup: Added `isLoading` to `DrawerContent` and `RewardsScreen`. This is probably the most crucial place to add a loading screen (@ace) imo; it's noticeably laggy here.
…te and stores loading
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.
👏 👏 Wow very cool stuff!
I just noted a couple details and bugs. Also, this might have nothing to do with this, but overall I've noticed that it's loading substantially slower, particularly upon logging in and loading the Rewards screen/points history. It definitely feels like a lot more time spent staring at a white screen...is that something we can do anything about, or maybe we just need to prioritize adding loading screens?
screens/auth/LoginScreen.js
Outdated
// In case of database malformation, may return more than one record | ||
// TODO this message is a design edge case | ||
error = | ||
'Database error: more than one customer found with this login information. Please report an issue so we can fix it for you!'; |
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.
Well the 'report issue' link only shows in the hamburger menu which requires you to be logged in 😅 @12aschen
5afadac
to
55a5608
Compare
Realized that we shouldn't have been keeping permissions in state at all, and the unnecessary async/await pattern was making things messy/slow, so updated that ;; eliminated some code 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.
This is crazy bruh ur a goat
…chen into annie/update-airtable
…nt/dccentralkitchen into annie/update-airtable
What's new in this PR
Refactoring our Airtable code in this repo to use
airtable-schema-generator
(now that it's been updated to 1.3.3 with some nice features!).REQUIRES
.env.development
/production
to be changed fromAIRTABLE_API_KEY
toREACT_APP_AIRTABLE_API_KEY
...for compatibility for v1.3.3
Has the same Airtable schema updates as calblueprint/dccentralkitchen-clerks#29; Points History screen will not load without transaction columns being changed to
Total Sale
.common.js
sinceBASE
will no longer be usedMap
productIds
will not exist on thestore
object, so special handling is requiredNavigation
AppNavigator
by extractingDrawerContent
as a class, and movingAuthStack
toStackNavigators
News
NewsScreen
displayedCreated
date, notPost Date
Rewards
RewardsHome
andPointsHistory
components.Overline
components normally-cased (since the styled component usestext-transform
)isLoading
toDrawerContent
andRewardsScreen
. This is probably the most crucial place to add a loading screen (@ace) imo; it's noticeably laggy here.Rewards.js
toconstants
so things aren't hardcoded.Auth
Integrated @tommypoa 's changes from
material-ui
branchSignUp
name, nameError
etc inthis.state
to use an object similar toindicators
.handleErrorState
to update error messages fromvalidate.js
instead of being hardcoded intoAuthField
name
onTextChange
hooks async so that error handling would happen after values updated in state; and handled permissionsonBlur
is still required for the edge case of user tapping in then tapping outLogin
Login
toLogIn
/Log In
where necessary (andLogout
in the drawer)Login
andLogout
toLog In
andLog Out
#69TextFieldContainer
(losing transition animations to error states) to do so.Relevant Links
Related PRs
Waiting on @tommypoa for some last updates to auth
How to review
Nothing should really change appearance-wise or functionality-wise for anything except the Signup/Login flow! But everything should still work (^:
Next steps
Would be nice to change
userId
tocustomerId
for consistency between the repos.Tests Performed, Edge Cases
Signup: https://www.loom.com/share/896a8bb1e5ba442281908122fc35e298
Login: https://www.loom.com/share/947060a3784242bc8e79f91b24c8c386
Screenshots
CC: @wangannie