-
Notifications
You must be signed in to change notification settings - Fork 0
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
Bottom Tab with initial screens #2
Conversation
src/config/theme.ts
Outdated
@@ -0,0 +1,19 @@ | |||
export const COLORS = { |
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.
Do you think it would make sense to try to get close to the conventions in the SDS?
Like making primary/secondary/etc identifiers at a global level and having primitives for font size/weight, etc.
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.
great idea, I'll port over this theme file to the project
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.
// Use throughout your app instead of plain `useDispatch` and `useSelector` | ||
export const useDispatch = () => useReduxDispatch<Dispatch>(); | ||
export const useSelector: TypedUseSelectorHook<RootState> = useReduxSelector; | ||
export const useStore = () => useReduxStore<Store>(); |
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.
Cassio and I talked about this briefly over DM, but we may want to consider sharing reducers between extension and mobile. It would be nice to be dealing with the the same actions and similarly shaped data when retrieving account info, for example
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.
Thanks for bringing this up. I think having similarly shaped data would be nice and could be helpful with code/logic understanding between the 2 products. But I'm also a bit worried that it could get in the way sometimes, since web and mobile have their differences as well. I'd say we could try mimicking each other whenever possible as a suggested approach but also have the flexibility to diverge from each other. Wdyt?
when retrieving account info, for example
@piyalbasu would you mind linking here the extension actions for retrieving account info that you have in mind so we could take a look as an example?
Thanks!
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 we can keep discussing it offline and also during the next PRs, I'll merge this one now so we can keep moving! :)
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.
yeah I'd lean to not do this so we don't inherit the store patterns we have in Freighter today, we've had trouble getting the desired UX out of the usage of our store in the past and are currently refactoring some big parts of the store away from it and into hooks(history/balances).
9da0cf7
to
85ebe9d
Compare
This PR creates a
folder structure
along with a initial rough version for theBottom Tab
with 4 tabs:Home
,Swap
,History
andSettings
. It also includesLogin
andSign out
buttons along with a network detector which displays aNo internet connection
banner.This PR also ports the
Button
component fromSDS
toreact-native
along with its correspondingButton/theme.ts
file also ported fromSDS
.Also included in this PR:
FreighterMobile
tofreighter-mobile
for naming consistency across other stellar projectsstyled-components
for UI stylingredux store
andreducer
navigators
androutes
BaseLayout
component that should be used to wrap all screensdimensions
helper to automatically resize components, fonts and spacing based on device screen sizedebug
helper for better dev experiencetheme
values from SDSScreen.Recording.2025-02-12.at.17.02.16.mov