From 4b0d0d4c6f210984cd68da828b88c5f30ae0e553 Mon Sep 17 00:00:00 2001 From: Jordy McNab Date: Wed, 22 Oct 2025 15:30:44 -0500 Subject: [PATCH 1/5] refactor: reduce activity panel size for better visual hierarchy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reduce panel width from 340-448px to 320-400px for cleaner layout - Reduce heading size from text-2xl to text-xl (24px → 20px) - Reduce activity amounts from text-lg to text-base (18px → 16px) - Reduce body text from text-sm to text-xs (14px → 12px) - Improves information density while maintaining readability --- .../V4V5ProjectDashboard.tsx | 2 +- .../V4V5ActivityPanel/V4V5ActivityList.tsx | 26 +++++++++---------- .../activityEventElems/ActivityElement.tsx | 2 +- .../components/ProjectActivityList.tsx | 4 +-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectDashboard.tsx b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectDashboard.tsx index 6662dbf6b4..9e19d61fa8 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectDashboard.tsx +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectDashboard.tsx @@ -41,7 +41,7 @@ export default function V4V5ProjectDashboard() {
diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx index 3f18835848..9d8b036cba 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx @@ -91,7 +91,7 @@ export function V4V5ActivityList() { return (
-

Activity

+

Activity

) : ( - No activity yet. + No activity yet. )}
@@ -148,7 +148,7 @@ export function translateEventDataToPresenter( event, header: 'Paid', subject: ( - + {formatActivityAmount(event.amount.value)} ETH ), @@ -159,7 +159,7 @@ export function translateEventDataToPresenter( event, header: 'Added to balance', subject: ( - + {formatActivityAmount(event.amount.value)} ETH ), @@ -170,7 +170,7 @@ export function translateEventDataToPresenter( event, header: 'Minted tokens', subject: ( - + {event.amount.format()}{' '} {tokenSymbolText({ capitalize: true, @@ -186,7 +186,7 @@ export function translateEventDataToPresenter( event, header: 'Cashed out', subject: ( - + {formatActivityAmount(event.reclaimAmount.value)} ETH ), @@ -195,7 +195,7 @@ export function translateEventDataToPresenter( return { event, header: 'Deployed ERC20', - subject: {event.symbol}, + subject: {event.symbol}, extra: , } case 'projectCreateEvent': @@ -210,7 +210,7 @@ export function translateEventDataToPresenter( event, header: 'Send payouts', subject: ( - + {formatActivityAmount(event.amount.value)} ETH ), @@ -225,7 +225,7 @@ export function translateEventDataToPresenter( event, header: 'Send reserved tokens', subject: ( - + {fromWad(event.tokenCount)}{' '} {tokenSymbolText({ tokenSymbol, plural: event.tokenCount > 1 })} @@ -237,7 +237,7 @@ export function translateEventDataToPresenter( event, header: 'Send to reserved token split', subject: ( - + {fromWad(event.tokenCount)}{' '} {tokenSymbolText({ tokenSymbol, plural: event.tokenCount > 1 })} @@ -255,7 +255,7 @@ export function translateEventDataToPresenter( event, header: 'Send to payout split', subject: ( - + {formatActivityAmount(event.amount.value)} ETH ), @@ -272,7 +272,7 @@ export function translateEventDataToPresenter( event, header: 'Used allowance', subject: ( - + {formatActivityAmount(event.amount.value)} ETH ), @@ -283,7 +283,7 @@ export function translateEventDataToPresenter( event, header: 'Burned', subject: ( - + {Number(event.amount.toFloat())}{' '} {tokenSymbolText({ tokenSymbol, diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/activityEventElems/ActivityElement.tsx b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/activityEventElems/ActivityElement.tsx index b882f6113b..a2fae554ca 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/activityEventElems/ActivityElement.tsx +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/activityEventElems/ActivityElement.tsx @@ -128,7 +128,7 @@ function TimestampVersion({ } function Subject({ subject }: { subject: string | JSX.Element | null }) { - return
{subject}
+ return
{subject}
} /** diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/components/ProjectActivityList.tsx b/src/packages/v4v5/views/V4V5ProjectDashboard/components/ProjectActivityList.tsx index 8f1e2318dd..d0967f9eb2 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/components/ProjectActivityList.tsx +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/components/ProjectActivityList.tsx @@ -59,7 +59,7 @@ export function ProjectActivityList() { return (
-

+

Activity

@@ -100,7 +100,7 @@ export function ProjectActivityList() { )} ) : ( - !loading && No activity yet. + !loading && No activity yet. )}
From 69f5a291dc4abddc12225cc3d0d20fad3fc59872 Mon Sep 17 00:00:00 2001 From: Jordy McNab Date: Wed, 22 Oct 2025 15:44:14 -0500 Subject: [PATCH 2/5] feat: replace automated events with manual events in activity feeds - Replace mintTokensEvent with manualMintTokensEvent to show only manual mints - Replace burnEvent with manualBurnEvent to show only manual burns - This reduces noise by excluding automated mints from payments and automated burns from cash outs - Updated GraphQL queries, event types, transform logic, and presentation layers - Regenerated GraphQL types to include new Bendystraw event types Per Peri and Jango's request to consolidate events and reduce activity feed noise by showing only intentional administrative actions. --- .../translateEventDataToProtocolPresenter.tsx | 4 +- .../graphql/queries/activityEvents.graphql | 4 +- .../V4V5ActivityPanel/V4V5ActivityList.tsx | 8 ++-- .../utils/transformEventsData.ts | 42 +++++++++---------- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/components/ProtocolActivity/utils/translateEventDataToProtocolPresenter.tsx b/src/components/ProtocolActivity/utils/translateEventDataToProtocolPresenter.tsx index d62006409e..90b5c55c48 100644 --- a/src/components/ProtocolActivity/utils/translateEventDataToProtocolPresenter.tsx +++ b/src/components/ProtocolActivity/utils/translateEventDataToProtocolPresenter.tsx @@ -20,7 +20,7 @@ export function translateEventDataToProtocolPresenter(event: AnyEvent) { header: 'Added to balance', subject: `${formatActivityAmount(event.amount.value)} ETH`, } - case 'mintTokensEvent': + case 'manualMintTokensEvent': return { event, header: 'Minted tokens', @@ -74,7 +74,7 @@ export function translateEventDataToProtocolPresenter(event: AnyEvent) { header: 'Used allowance', subject: `${formatActivityAmount(event.amount.value)} ETH`, } - case 'burnEvent': + case 'manualBurnEvent': return { event, header: 'Burned', diff --git a/src/packages/v4v5/graphql/queries/activityEvents.graphql b/src/packages/v4v5/graphql/queries/activityEvents.graphql index 8520f6424f..fe5a06a378 100644 --- a/src/packages/v4v5/graphql/queries/activityEvents.graphql +++ b/src/packages/v4v5/graphql/queries/activityEvents.graphql @@ -48,7 +48,7 @@ query ActivityEvents( amount memo } - mintTokensEvent { + manualMintTokensEvent { id projectId timestamp @@ -158,7 +158,7 @@ query ActivityEvents( netAmountPaidOut memo } - burnEvent { + manualBurnEvent { id projectId timestamp diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx index 9d8b036cba..a424fd5b6a 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/V4V5ActivityList.tsx @@ -165,7 +165,7 @@ export function translateEventDataToPresenter( ), extra: event.note ? : null, } - case 'mintTokensEvent': + case 'manualMintTokensEvent': return { event, header: 'Minted tokens', @@ -278,7 +278,7 @@ export function translateEventDataToPresenter( ), extra: , } - case 'burnEvent': + case 'manualBurnEvent': return { event, header: 'Burned', @@ -402,7 +402,7 @@ const ACTIVITY_OPTIONS = [ { label: 'All activity', value: 'all' }, { label: 'Paid', value: 'payEvent' }, { label: 'Added to balance', value: 'addToBalanceEvent' }, - { label: 'Minted tokens', value: 'mintTokensEvent' }, + { label: 'Minted tokens', value: 'manualMintTokensEvent' }, { label: 'Cashed out', value: 'cashOutEvent' }, { label: 'Deployed ERC20', value: 'deployedERC20Event' }, { label: 'Project created', value: 'projectCreateEvent' }, @@ -420,7 +420,7 @@ const ACTIVITY_OPTIONS = [ value: 'sendPayoutsToSplitEvent', }, { label: 'Used allowance', value: 'useAllowanceEvent' }, - { label: 'Burned', value: 'burnEvent' }, + { label: 'Burned', value: 'manualBurnEvent' }, ] const CHAIN_OPTIONS = Object.entries(NETWORKS).map( diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/utils/transformEventsData.ts b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/utils/transformEventsData.ts index f868ab862b..f293ccab0f 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/utils/transformEventsData.ts +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5ActivityPanel/utils/transformEventsData.ts @@ -6,7 +6,7 @@ import { ActivityEventsQuery } from 'packages/v4v5/graphql/client/graphql' export type EventType = | 'payEvent' | 'addToBalanceEvent' - | 'mintTokensEvent' + | 'manualMintTokensEvent' | 'cashOutEvent' | 'deployedERC20Event' | 'projectCreateEvent' @@ -15,7 +15,7 @@ export type EventType = | 'distributeToReservedTokenSplitEvent' | 'distributeToPayoutSplitEvent' | 'useAllowanceEvent' - | 'burnEvent' + | 'manualBurnEvent' export interface Event { id: string @@ -46,8 +46,8 @@ export interface AddToBalanceEvent extends Event { note: string | null } -export interface MintTokensEvent extends Event { - type: 'mintTokensEvent' +export interface ManualMintTokensEvent extends Event { + type: 'manualMintTokensEvent' amount: Ether beneficiary: string note: string @@ -118,8 +118,8 @@ export interface UseAllowanceEvent extends Event { note: string } -export interface BurnEvent extends Event { - type: 'burnEvent' +export interface ManualBurnEvent extends Event { + type: 'manualBurnEvent' holder: string amount: Ether stakedAmount: Ether @@ -136,7 +136,7 @@ export interface BurnEvent extends Event { export type AnyEvent = | PayEvent | AddToBalanceEvent - | MintTokensEvent + | ManualMintTokensEvent | CashOutEvent | DeployedERC20Event | ProjectCreateEvent @@ -145,7 +145,7 @@ export type AnyEvent = | DistributeToReservedTokenSplitEvent | DistributeToPayoutSplitEvent | UseAllowanceEvent - | BurnEvent + | ManualBurnEvent // eslint-disable-next-line @typescript-eslint/no-explicit-any function extractBaseEventData(event: any, projectName?: string | null, projectHandle?: string | null): AnyEvent { @@ -204,14 +204,14 @@ export function transformEventData( note: data.addToBalanceEvent.memo, } } - if (data.mintTokensEvent) { + if (data.manualMintTokensEvent) { return { - ...extractBaseEventData(data.mintTokensEvent, projectName, projectHandle), + ...extractBaseEventData(data.manualMintTokensEvent, projectName, projectHandle), chainId: data.chainId, - type: 'mintTokensEvent', - amount: new Ether(BigInt(data.mintTokensEvent.tokenCount)), - beneficiary: data.mintTokensEvent.beneficiary, - note: data.mintTokensEvent.memo || '', + type: 'manualMintTokensEvent', + amount: new Ether(BigInt(data.manualMintTokensEvent.tokenCount)), + beneficiary: data.manualMintTokensEvent.beneficiary, + note: data.manualMintTokensEvent.memo || '', } } if (data.cashOutTokensEvent) { @@ -309,15 +309,15 @@ export function transformEventData( note: data.useAllowanceEvent.memo || '', } } - if (data.burnEvent) { + if (data.manualBurnEvent) { return { - ...extractBaseEventData(data.burnEvent, projectName, projectHandle), + ...extractBaseEventData(data.manualBurnEvent, projectName, projectHandle), chainId: data.chainId, - type: 'burnEvent', - holder: data.burnEvent.from, - amount: new Ether(BigInt(data.burnEvent.amount)), - stakedAmount: new Ether(BigInt(data.burnEvent.creditAmount)), - erc20Amount: new Ether(BigInt(data.burnEvent.erc20Amount)), + type: 'manualBurnEvent', + holder: data.manualBurnEvent.from, + amount: new Ether(BigInt(data.manualBurnEvent.amount)), + stakedAmount: new Ether(BigInt(data.manualBurnEvent.creditAmount)), + erc20Amount: new Ether(BigInt(data.manualBurnEvent.erc20Amount)), } } console.warn('Unknown event type', data) From 95979c139c7b1058cd15cdb4be7685ba89c2411f Mon Sep 17 00:00:00 2001 From: Jordy McNab Date: Wed, 22 Oct 2025 15:59:18 -0500 Subject: [PATCH 3/5] feat: add quick access button for NFT creation on NFT tab - Add "Add NFT Tier" button for project owners and revnet operators - Show "Create NFT Rewards" button in empty state for authorized users - Permission check: project owner OR revnet operator can access - Button navigates to /settings/nfts for NFT management - Foundation for future NFT shop/store organization features Per Jango's request to provide quicker entry point for project owners to post new NFTs for sale. --- .../V4V5NftRewardsPanel.tsx | 41 +++++++++++++++++-- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx index a6b1632614..f7179c9ed8 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx @@ -2,7 +2,12 @@ import { Trans, t } from '@lingui/macro' import { forwardRef } from 'react' import { NftReward, NftRewardSkeleton } from './NftReward/NftReward' +import { Button } from 'antd' import { EmptyScreen } from 'components/Project/ProjectTabs/EmptyScreen' +import { useWallet } from 'hooks/Wallet/useWallet' +import useV4V5ProjectOwnerOf from 'packages/v4v5/hooks/useV4V5ProjectOwnerOf' +import { useV4V5ProjectHeader } from 'packages/v4v5/views/V4V5ProjectDashboard/hooks/useV4V5ProjectHeader' +import { useRouter } from 'next/router' import { RedeemNftsSection } from './RedeemNftsSection/RedeemNftsSection' import { useNftRewardsPanel } from './hooks/useNftRewardsPanel' @@ -14,11 +19,30 @@ export const V4V5NftRewardsPanel = forwardRef((props, ref) => { loading: nftsLoading, } = useNftRewardsPanel() + const router = useRouter() + const { userAddress } = useWallet() + const { data: projectOwnerAddress } = useV4V5ProjectOwnerOf() + const { isRevnet, operatorAddress } = useV4V5ProjectHeader() + + // Check if user can add NFTs (project owner or revnet operator) + const canAddNfts = + userAddress && + (userAddress.toLowerCase() === projectOwnerAddress?.toLowerCase() || + (isRevnet && + userAddress.toLowerCase() === operatorAddress?.toLowerCase())) + return (
-

- NFTs -

+
+

+ NFTs +

+ {canAddNfts && rewardTiers?.length ? ( + + ) : null} +
{!nftsLoading && rewardTiers?.length ? ( @@ -41,6 +65,17 @@ export const V4V5NftRewardsPanel = forwardRef((props, ref) => { ))}
+ ) : canAddNfts ? ( +
+ + +
) : ( )} From c0d32145a0d1c69da6b0d7ef0b536c582e7625ce Mon Sep 17 00:00:00 2001 From: Jordy McNab Date: Wed, 22 Oct 2025 16:11:03 -0500 Subject: [PATCH 4/5] fix: use proper project-scoped routing for NFT settings - Replace hardcoded '/settings/nfts' with useSettingsPagePath('nfts') - Ensures proper routing like /v5/op:9/settings/nfts instead of /settings/nfts - Adds null check for nftSettingsPath before rendering buttons --- .../V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx index f7179c9ed8..859d7141f3 100644 --- a/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx +++ b/src/packages/v4v5/views/V4V5ProjectDashboard/V4V5ProjectTabs/V4V5NftRewardsPanel/V4V5NftRewardsPanel.tsx @@ -7,6 +7,7 @@ import { EmptyScreen } from 'components/Project/ProjectTabs/EmptyScreen' import { useWallet } from 'hooks/Wallet/useWallet' import useV4V5ProjectOwnerOf from 'packages/v4v5/hooks/useV4V5ProjectOwnerOf' import { useV4V5ProjectHeader } from 'packages/v4v5/views/V4V5ProjectDashboard/hooks/useV4V5ProjectHeader' +import { useSettingsPagePath } from 'packages/v4v5/views/V4V5ProjectSettings/hooks/useSettingsPagePath' import { useRouter } from 'next/router' import { RedeemNftsSection } from './RedeemNftsSection/RedeemNftsSection' import { useNftRewardsPanel } from './hooks/useNftRewardsPanel' @@ -23,6 +24,7 @@ export const V4V5NftRewardsPanel = forwardRef((props, ref) => { const { userAddress } = useWallet() const { data: projectOwnerAddress } = useV4V5ProjectOwnerOf() const { isRevnet, operatorAddress } = useV4V5ProjectHeader() + const nftSettingsPath = useSettingsPagePath('nfts') // Check if user can add NFTs (project owner or revnet operator) const canAddNfts = @@ -37,8 +39,8 @@ export const V4V5NftRewardsPanel = forwardRef((props, ref) => {

NFTs

- {canAddNfts && rewardTiers?.length ? ( - ) : null} @@ -65,13 +67,13 @@ export const V4V5NftRewardsPanel = forwardRef((props, ref) => { ))}
- ) : canAddNfts ? ( + ) : canAddNfts && nftSettingsPath ? (
From d88879f1b3a7d217f35e515cf61d170455ad7ed8 Mon Sep 17 00:00:00 2001 From: Jordy McNab Date: Wed, 22 Oct 2025 16:18:58 -0500 Subject: [PATCH 5/5] chore: update translation template --- src/locales/messages.pot | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/locales/messages.pot b/src/locales/messages.pot index c3913ce7c1..0ad4340fbb 100644 --- a/src/locales/messages.pot +++ b/src/locales/messages.pot @@ -788,6 +788,9 @@ msgstr "" msgid "<0/>{0} distributed" msgstr "" +msgid "Create NFT Rewards" +msgstr "" + msgid "Project ownership has been successfully transferred to {toAddress} on all chains." msgstr "" @@ -2141,6 +2144,9 @@ msgstr "" msgid "Unlimited payouts" msgstr "" +msgid "Add NFT Tier" +msgstr "" + msgid "Configuration rules" msgstr ""