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

release: 28th Sep 2024 pt 2 #4472

Merged
merged 45 commits into from
Sep 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
bd533f0
feat: V4 create behind feature flag [1/n] (#4444)
johnnyd-eth Aug 30, 2024
20e7c00
fix: treasury balance when 0
aeolianeth Sep 5, 2024
2c4b40c
fix: issuance rates in ruleset config table
aeolianeth Sep 5, 2024
bd6700b
fix: activity list when no token
aeolianeth Sep 5, 2024
d63d1f8
fix: payment when no token
aeolianeth Sep 5, 2024
6a6e9dc
fix: set pay memo properly
aeolianeth Sep 5, 2024
d9a8b89
fix: refactor v4 create flow to not rely on project provider
aeolianeth Sep 5, 2024
e655d8e
feat: v4 edit cycle tx (#4448)
johnnyd-eth Sep 9, 2024
a83608c
feat: v4 set metadata tx (#4449)
johnnyd-eth Sep 9, 2024
f8960d4
V4 Download holders modal (#4451)
johnnyd-eth Sep 9, 2024
34032bf
V4 project page: volume charts (#4452)
johnnyd-eth Sep 9, 2024
779b765
feat: v4 deploy erc20 (#4453)
johnnyd-eth Sep 9, 2024
9a0409c
fix v4 create (#4454)
johnnyd-eth Sep 10, 2024
c2ad930
feat: v4 create erc20 button and add token to metamask button (#4455)
johnnyd-eth Sep 10, 2024
0a44f61
Allow v4 create to launch (#4456)
johnnyd-eth Sep 11, 2024
cf26228
feat: v4 archive projects (#4457)
johnnyd-eth Sep 11, 2024
2be05b6
feat: add v4 projects to db (#4458)
aeolianeth Sep 13, 2024
be5f0b6
fix: update projects_pv_check
aeolianeth Sep 13, 2024
f809ddf
feat: add chain_id col to projects
aeolianeth Sep 14, 2024
8cbd43e
drop pv check
aeolianeth Sep 17, 2024
5cf4610
feat: v4 projects on proejcts page
aeolianeth Sep 18, 2024
d0acde4
support chain_id in db
aeolianeth Sep 18, 2024
82f144f
Support chain_id property on all sg/db projects
aeolianeth Sep 18, 2024
8b197a5
possibly improve darkmode fuoc
aeolianeth Sep 19, 2024
725de08
fix types
aeolianeth Sep 19, 2024
484c83c
Bump next from 14.2.5 to 14.2.10 (#4460)
dependabot[bot] Sep 19, 2024
5f9902c
Bump dompurify from 3.0.5 to 3.1.3 (#4461)
dependabot[bot] Sep 19, 2024
b6ce48b
Bump dset from 3.1.2 to 3.1.4 (#4462)
dependabot[bot] Sep 19, 2024
9ee0712
nuke @types/ethereum-block-by-date
aeolianeth Sep 19, 2024
9971c59
nuke bad import
aeolianeth Sep 19, 2024
4307118
fix ci
aeolianeth Sep 19, 2024
5112824
Merge branch 'main' into dev
aeolianeth Sep 19, 2024
c23b15b
Contracts sept (#4463)
aeolianeth Sep 23, 2024
64897e3
fix: catch errors when ens lookup fails on address input
aeolianeth Sep 23, 2024
e699a6d
fix: update v4 launch contracts
aeolianeth Sep 23, 2024
d7b93dc
fix: launch projects with payouts and reserved tokens
aeolianeth Sep 23, 2024
7a23aa8
fix v4 proj sepolia payouts, add footer to proj page (#4466)
johnnyd-eth Sep 26, 2024
4209bbc
fix: v4 edit ruleset tx (#4467)
johnnyd-eth Sep 27, 2024
d5e6d8c
fix: v4 launch erc20 tx (#4468)
johnnyd-eth Sep 27, 2024
839b5a3
fix: more v4 settings bugs (#4469)
johnnyd-eth Sep 27, 2024
1c473e2
fix subgraph
aeolianeth Sep 27, 2024
9ee3bd8
Add v4 trending projs
aeolianeth Sep 27, 2024
889fdbf
Imporve homepage card loading logic
aeolianeth Sep 27, 2024
d765de1
temporarily disable v2v3 project launches
johnnyd-eth Sep 27, 2024
7faeb22
fix: v2v3 create (wrong terminal) (#4471)
johnnyd-eth Sep 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ env:
SUBGRAPH_URL: ${{ secrets.SUBGRAPH_URL }}
NEXT_PUBLIC_SUBGRAPH_URL: ${{ secrets.NEXT_PUBLIC_SUBGRAPH_URL }}
NEXT_PUBLIC_V4_SUBGRAPH_URL: ${{ secrets.NEXT_PUBLIC_V4_SUBGRAPH_URL }}
NEXT_PUBLIC_V4_SEPOLIA_SUBGRAPH_URL: ${{ secrets.NEXT_PUBLIC_V4_SEPOLIA_SUBGRAPH_URL }}

jobs:
jest:
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
"graphql": "^16.8.1",
"he": "^1.2.0",
"jsonwebtoken": "^9.0.0",
"juice-sdk-core": "^10.0.3-alpha",
"juice-sdk-react": "^10.0.1-alpha",
"juice-sdk-core": "^11.0.0-alpha",
"juice-sdk-react": "^11.0.0-alpha",
"juicebox-metadata-helper": "0.1.7",
"less": "4.1.2",
"lodash": "^4.17.21",
Expand Down
26 changes: 17 additions & 9 deletions src/components/Home/HomepageProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ import { Skeleton } from 'antd'
import { HomepageCard } from 'components/Home/HomepageCard'
import ProjectLogo from 'components/ProjectLogo'
import ETHAmount from 'components/currency/ETHAmount'
import { PV_V2 } from 'constants/pv'
import { PV_V2, PV_V4 } from 'constants/pv'
import { useProjectMetadata } from 'hooks/useProjectMetadata'
import { SubgraphQueryProject } from 'models/subgraphProjects'
import { v2v3ProjectRoute } from 'packages/v2v3/utils/routes'
import { v4ProjectRoute } from 'packages/v4/utils/routes'

function Statistic({
name,
Expand Down Expand Up @@ -44,20 +45,25 @@ export function HomepageProjectCard({
project: Pick<
SubgraphQueryProject,
'metadataUri' | 'volume' | 'paymentsCount' | 'handle' | 'pv' | 'projectId'
>
> & { chainId?: number }
lazyLoad?: boolean
}) {
const { data: metadata, isLoading } = useProjectMetadata(project.metadataUri)

return (
<HomepageCard
href={
project.pv === PV_V2
project.pv === PV_V4 && project.chainId
? v4ProjectRoute({
projectId: project.projectId,
chainId: project.chainId,
})
: project.pv === PV_V2
? v2v3ProjectRoute(project)
: `/p/${project.handle}`
}
img={
metadata && !isLoading ? (
!isLoading ? (
<ProjectLogo
className="h-[192px] w-full rounded-none object-cover"
name={metadata?.name}
Expand All @@ -69,17 +75,19 @@ export function HomepageProjectCard({
) : null
}
title={
metadata && !isLoading ? (
<div className="max-h-8 truncate font-heading text-lg font-medium text-grey-900 dark:text-slate-100 md:text-xl">
{metadata.name}
</div>
) : (
isLoading ? (
<Skeleton.Input
className="h-6 w-full"
active
size="small"
style={{ width: '100%' }}
/>
) : !metadata ? (
'---'
) : (
<div className="max-h-8 truncate font-heading text-lg font-medium text-grey-900 dark:text-slate-100 md:text-xl">
{metadata.name}
</div>
)
}
description={
Expand Down
70 changes: 34 additions & 36 deletions src/components/Project/ProjectHeader/ProjectHeaderPopupMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { WrenchScrewdriverIcon } from '@heroicons/react/24/outline'
import { Trans } from '@lingui/macro'
import { BookmarkButtonIcon } from 'components/buttons/BookmarkButton/BookmarkButtonIcon'
import { useBookmarkButton } from 'components/buttons/BookmarkButton/hooks/useBookmarkButton'
import { SubscribeButtonIcon } from 'components/buttons/SubscribeButton/SubscribeButtonIcon'
import { useSubscribeButton } from 'components/buttons/SubscribeButton/hooks/useSubscribeButton'
import { PV_V2 } from 'constants/pv'
import useMobile from 'hooks/useMobile'
Expand Down Expand Up @@ -54,42 +52,42 @@ export function ProjectHeaderPopupMenu({
href,
}))
: []),
{
id: 'subscribe',
label: (
<>
<SubscribeButtonIcon
isSubscribed={isSubscribed}
className="h-5 w-5"
/>
// {
// id: 'subscribe',
// label: (
// <>
// <SubscribeButtonIcon
// isSubscribed={isSubscribed}
// className="h-5 w-5"
// />

<span className="whitespace-nowrap text-sm font-medium">
<Trans>Get notifications</Trans>
</span>
</>
),
onClick: onSubscribeButtonClicked,
},
{
id: 'bookmark',
label: (
<>
<BookmarkButtonIcon
isBookmarked={isBookmarked}
className="h-5 w-5"
/>
<span className="whitespace-nowrap text-sm font-medium">
<Trans>Save project</Trans>
</span>
</>
),
onClick(ev) {
ev.preventDefault()
ev.stopPropagation()
// <span className="whitespace-nowrap text-sm font-medium">
// <Trans>Get notifications</Trans>
// </span>
// </>
// ),
// onClick: onSubscribeButtonClicked,
// },
// {
// id: 'bookmark',
// label: (
// <>
// <BookmarkButtonIcon
// isBookmarked={isBookmarked}
// className="h-5 w-5"
// />
// <span className="whitespace-nowrap text-sm font-medium">
// <Trans>Save project</Trans>
// </span>
// </>
// ),
// onClick(ev) {
// ev.preventDefault()
// ev.stopPropagation()

onBookmarkButtonClicked()
},
},
// onBookmarkButtonClicked()
// },
// },
{
id: 'tools',
label: (
Expand Down
4 changes: 2 additions & 2 deletions src/components/Project/ProjectTabs/utils/pairToDatum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { ConfigurationPanelDatum } from 'components/Project/ProjectTabs/CyclesPa

export const pairToDatum = (
name: string,
current: string | undefined,
upcoming: string | undefined | null,
current: string | JSX.Element | undefined,
upcoming: string | JSX.Element | undefined | null,
link?: string,
easyCopy?: boolean,
): ConfigurationPanelDatum => {
Expand Down
22 changes: 13 additions & 9 deletions src/components/ProjectCard.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import * as constants from '@ethersproject/constants'
import { BookmarkIcon as BookmarkIconSolid } from '@heroicons/react/24/solid'
import { Skeleton } from 'antd'
import { PV_V2 } from 'constants/pv'
import { PV_V2, PV_V4 } from 'constants/pv'
import { useProjectHandleText } from 'hooks/useProjectHandleText'
import Link from 'next/link'
import { isHardArchived } from 'utils/archived'
import { formatDate } from 'utils/format/formatDate'

import { useProjectMetadata } from 'hooks/useProjectMetadata'
import { useSubtitle } from 'hooks/useSubtitle'
import { SubgraphQueryProject } from 'models/subgraphProjects'
import Link from 'next/link'
import { v2v3ProjectRoute } from 'packages/v2v3/utils/routes'
import { v4ProjectRoute } from 'packages/v4/utils/routes'
import { isHardArchived } from 'utils/archived'
import { formatDate } from 'utils/format/formatDate'
import { ArchivedBadge } from './ArchivedBadge'
import Loading from './Loading'
import ProjectLogo from './ProjectLogo'
Expand All @@ -21,20 +21,19 @@ export default function ProjectCard({
project,
bookmarked,
}: {
project?: SubgraphQueryProject
project?: SubgraphQueryProject & { chainId?: number }
bookmarked?: boolean
}) {
const { data: metadata } = useProjectMetadata(project?.metadataUri)
const { handleText } = useProjectHandleText({
handle: project?.handle,
projectId: project?.projectId,
})

const subtitle = useSubtitle(metadata)

if (!project) return null

const { volume, pv, handle, projectId, createdAt } = project
const { volume, pv, handle, projectId, createdAt, chainId } = project
const tags = metadata?.tags

// If the total paid is greater than 0, but less than 10 ETH, show two decimal places.
Expand All @@ -58,7 +57,12 @@ export default function ProjectCard({
: `/p/${handle}`

const projectCardUrl =
pv === PV_V2
pv === PV_V4 && chainId
? v4ProjectRoute({
projectId,
chainId,
})
: pv === PV_V2
? v2v3ProjectRoute({
projectId,
handle,
Expand Down
20 changes: 16 additions & 4 deletions src/components/Projects/ProjectsFilterAndSort.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@ export type CheckboxOnChange = (checked: boolean) => void
export default function ProjectsFilterAndSort({
includeV1,
setIncludeV1,

includeV2,
setIncludeV2,

includeV4,
setIncludeV4,

showArchived,
setShowArchived,
searchTags,
Expand All @@ -34,8 +39,13 @@ export default function ProjectsFilterAndSort({
}: {
includeV1: boolean
setIncludeV1: CheckboxOnChange

includeV2: boolean
setIncludeV2: CheckboxOnChange

includeV4: boolean
setIncludeV4: CheckboxOnChange

showArchived: boolean
setShowArchived: CheckboxOnChange
searchTags: ProjectTagName[]
Expand Down Expand Up @@ -67,10 +77,7 @@ export default function ProjectsFilterAndSort({
return (
<div className="flex max-w-[100vw] flex-wrap items-center whitespace-pre">
<Collapse
className={classNames(
`projects-filter-collapse`,
'my-0 border-none bg-transparent',
)}
className="projects-filter-collapse my-0 border-none bg-transparent"
activeKey={tagsIsOpen ? 0 : undefined}
>
<CollapsePanel
Expand Down Expand Up @@ -161,6 +168,11 @@ export default function ProjectsFilterAndSort({
checked={includeV2}
onChange={setIncludeV2}
/>
<FilterCheckboxItem
label={t`V4`}
checked={includeV4}
onChange={setIncludeV4}
/>
<FilterCheckboxItem
label={t`Archived`}
checked={showArchived}
Expand Down
11 changes: 8 additions & 3 deletions src/components/Projects/ProjectsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Button } from 'antd'
import Search from 'antd/lib/input/Search'
import { Footer } from 'components/Footer/Footer'
import { PROJECTS_PAGE } from 'constants/fathomEvents'
import { PV_V1, PV_V2 } from 'constants/pv'
import { PV_V1, PV_V2, PV_V4 } from 'constants/pv'
import { useWallet } from 'hooks/Wallet'
import { trackFathomGoal } from 'lib/fathom'
import { DBProjectQueryOpts } from 'models/dbProject'
Expand Down Expand Up @@ -65,15 +65,18 @@ export function ProjectsView() {
const [orderBy, setOrderBy] = useState<OrderByOption>('volume')
const [includeV1, setIncludeV1] = useState<boolean>(true)
const [includeV2, setIncludeV2] = useState<boolean>(true)
const [includeV4, setIncludeV4] = useState<boolean>(true)
const [showArchived, setShowArchived] = useState<boolean>(false)
const [reversed, setReversed] = useState<boolean>(false)

const pv: PV[] | undefined = useMemo(() => {
const _pv: PV[] = []
if (includeV1) _pv.push(PV_V1)
if (includeV2) _pv.push(PV_V2)
return _pv.length ? _pv : [PV_V1, PV_V2]
}, [includeV1, includeV2])
if (includeV4) _pv.push(PV_V4)

return _pv.length ? _pv : [PV_V1, PV_V2, PV_V4]
}, [includeV1, includeV2, includeV4])

function updateRoute(
_searchTags: ProjectTagName[],
Expand Down Expand Up @@ -137,8 +140,10 @@ export function ProjectsView() {
<ProjectsFilterAndSort
includeV1={includeV1}
includeV2={includeV2}
includeV4={includeV4}
setIncludeV1={setIncludeV1}
setIncludeV2={setIncludeV2}
setIncludeV4={setIncludeV4}
showArchived={showArchived}
setShowArchived={setShowArchived}
reversed={reversed}
Expand Down
12 changes: 9 additions & 3 deletions src/components/Projects/TrendingProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { Skeleton } from 'antd'
import ETHAmount from 'components/currency/ETHAmount'
import Loading from 'components/Loading'
import ProjectLogo from 'components/ProjectLogo'
import { PV_V2 } from 'constants/pv'
import { PV_V2, PV_V4 } from 'constants/pv'
import { useProjectMetadata } from 'hooks/useProjectMetadata'
import { useProjectTrendingPercentageIncrease } from 'hooks/useProjectTrendingPercentageIncrease'
import { DBProject } from 'models/dbProject'
import Link from 'next/link'
import { v2v3ProjectRoute } from 'packages/v2v3/utils/routes'
import { v4ProjectRoute } from 'packages/v4/utils/routes'
import { TRENDING_WINDOW_DAYS } from './RankingExplanation'

export default function TrendingProjectCard({
Expand All @@ -29,7 +30,7 @@ export default function TrendingProjectCard({
| 'handle'
| 'pv'
| 'projectId'
>
> & { chainId?: number }
rank: number
size?: 'sm' | 'lg'
bookmarked?: boolean
Expand Down Expand Up @@ -62,7 +63,12 @@ export default function TrendingProjectCard({
prefetch={false}
key={project.handle}
href={
project.pv === PV_V2
project.pv === PV_V4 && project.chainId
? v4ProjectRoute({
projectId: project.projectId,
chainId: project.chainId,
})
: project.pv === PV_V2
? v2v3ProjectRoute(project)
: `/p/${project.handle}`
}
Expand Down
Loading
Loading