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

Redesign reports #2461

Open
wants to merge 8 commits into
base: pool_overview_redesign
Choose a base branch
from
Open

Redesign reports #2461

wants to merge 8 commits into from

Conversation

kattylucy
Copy link
Contributor

@kattylucy kattylucy commented Sep 26, 2024

  • Redesign reports for balance sheet, profit and loss & cash flow filters
  • Add new graph to the reports
  • Update styling on table

#2459

Approvals

  • Dev

@kattylucy kattylucy changed the base branch from main to pool_overview_redesign September 26, 2024 08:42
Copy link

github-actions bot commented Sep 26, 2024

PR deployed in Google Cloud
URL: https://pr2461-app-ff-production.k-f.dev
Commit #: 370c4e1
To access the functions directly check the corresponding deploy Action

Copy link

github-actions bot commented Sep 26, 2024

PR deployed in Google Cloud
URL: https://app-pr2461.k-f.dev
Commit #: 370c4e1
To access the functions directly check the corresponding deploy Action

@kattylucy kattylucy force-pushed the redesign_reports branch 3 times, most recently from 5f57f06 to 49a8307 Compare September 27, 2024 13:14
@kattylucy kattylucy marked this pull request as ready for review October 1, 2024 09:38
@kattylucy kattylucy force-pushed the redesign_reports branch 2 times, most recently from eff41c1 to 472f289 Compare October 1, 2024 12:13
Copy link
Collaborator

@sophialittlejohn sophialittlejohn left a comment

Choose a reason for hiding this comment

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

Looking good! Let's clean up the any types though!

Let's update the url path for reports to match the tab label (reporting --> reports)

Somehow the boarder around these inputs has been lost, can we bring it back so it looks the same as all of the other inputs?
Screenshot 2024-10-01 at 12 41 00

import { formatPoolFeeTransactionType } from './utils'

type ReportFilterProps = {
pool: Pool
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would recommend passing just the poolId as a prop and fetch the pool based on the id

@@ -49,6 +49,9 @@ export type ReportContextType = {

loan: string
setLoan: (type: string) => void

reportData: any
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we do better than any?

const transformDataChart = React.useMemo(() => {
if (!reportData.length) return
if (report === 'balance-sheet') {
return reportData.map((data: any) => ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

more any 😬 if reportData is typed you don't have to cast data

yAxis: new CurrencyBalance(data.netAssetValue, pool.currency.decimals).toNumber(),
}))
} else if (report === 'profit-and-loss') {
return reportData.map((data: any) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

😬

- Formatting now accepts and converts negative numbers
- Icon changes color accordingly
- Graph is rendering bars accordingly
- Fix layout bug not allowing clicking on mobile
- Fix layout reporting filter to be visible on mobile
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