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

Create initial portfolio screen #15

Merged
merged 11 commits into from
Jan 6, 2025

Conversation

jessepinho
Copy link
Collaborator

@jessepinho jessepinho commented Jan 1, 2025

Screen.Recording.2024-12-31.at.7.42.31.PM.mov

In this PR

  • Create basic portfolio screen UI
  • Extract <BalanceAndActions /> component, for the shared UI between the Home and Portfolio screens
  • Build out more factories
  • Create an action sheet for a given asset (to show its transactions, and eventually buttons to take actions with that asset)

@jessepinho jessepinho marked this pull request as ready for review January 1, 2025 03:41
@jessepinho jessepinho requested a review from TalDerei January 1, 2025 03:41
<Story />
</DripsyProvider>
</PraxI18nProvider>
<ReduxProvider>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Needed because <Balance />, which has a Storybook story, dispatches Redux actions

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Extracted from <HomeScreen />

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image
The action sheet here ^

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

image

Copy link
Collaborator

@TalDerei TalDerei left a comment

Choose a reason for hiding this comment

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

Great work! cross-referencing the portfolio page with the figma designs, can we add comments in the relevant places for the corresponding missing design elements?


export default function PortfolioScreen() {
return <Text>PortfolioScreen</Text>;
const balances = useAppSelector(state => state.balances.balances);
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: general thoughts on identifying areas that could take advantage of memoized selectors, using reselect, to avoid unnecessary re-renders?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good call — I've actually started doing that in #19

@jessepinho
Copy link
Collaborator Author

will add comments re: missing Figma elements in an upcoming PR!

@jessepinho jessepinho merged commit 3f1bc64 into jessepinho/more-screens Jan 6, 2025
@jessepinho jessepinho deleted the jessepinho/portfolio-screen branch January 6, 2025 20:30
jessepinho added a commit that referenced this pull request Jan 6, 2025
* Create <List /> component

* Extract PraxDripsyProvider

* Set up Storybook to work with i18n; Install testing libs

* Add XS icon size

* Truncate text in ListItem

* Create factories

* Create TransactionList

* Fix text overflow

* Add screenHorizontalMargin

* Create transactions state

* Add transactions list to home screen

* Add a primaryAction prop to List

* Remove unused props

* Remove unused var

* Rework header components

* Build out TransactionsScreen

* Tweak comments

* Add comments

* Fix suffix

* Add comment

* Add RN Jest matchers

* Update tests

* Update args

* Add comment

* Reorganize and add comments

* Early return

* Create initial portfolio screen (#15)

* Rename header

* Extract BalanceAndActions component; use it in PortfolioScreen

* Create store/type/factory for balances

* Create balance UI in portfolio screen

* Use more precise naming

* Tweak factories

* Wrap Storybook stories in <ReduxProvider />

* Fix ATOM mock data

* Delete BalanceList stories for now

* Build a simple AssetActionSheet

* Add comment
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