-
Notifications
You must be signed in to change notification settings - Fork 15
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
enable SyncCreatorTokens for Existing Contracts #2003
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Bundle SizesCompared against 67b71c6
|
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.
going over this in loom but just to reiterate:
- let's make sure the mobile refresh icon is more accurate in its reaction
- let's share a generic
RefreshIcon
component - some tracking updates
- deprecate
setCollectionContractId
and use existing state vehicles
const track = useTrack(); | ||
const handleCreatorRefreshContract = useCallback( | ||
async (contractId: string) => { | ||
track('Editor Sidebar: Clicked Sync Creator Tokens For Existing Contract'); |
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.
let's make sure to fix the tracking:
track('Editor Sidebar: Clicked Sync Creator Tokens For Existing Contract', {
id: 'Refresh Single Created Contract Button',
context: contexts.Editor,
})
selectedView={selectedView} | ||
setSpamPreferenceForCollection={setSpamPreferenceForCollection} | ||
/> | ||
) : shouldDisplayContractRefreshIcon ? ( | ||
<RefreshContractIcon contractId={row.contractId} /> | ||
) : ( | ||
<CollectionCount>{row.count}</CollectionCount> | ||
)} |
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.
nit: i think there's a lot of logic going on here, could simplify to:
const rightContent = useMemo(() => {
if (selectedView === 'Created' && isMouseHovering) {
return <RefreshContractIcon contractId={row.contractId} />;
}
if (selectedView !== 'Created' && isMouseHovering) {
return (
<ToggleSpamIcon
row={row}
selectedView={selectedView}
setSpamPreferenceForCollection={setSpamPreferenceForCollection}
/>
);
}
return <CollectionCount>{row.count}</CollectionCount>;
}, [isMouseHovering, row, selectedView, setSpamPreferenceForCollection]);
...
// render
{rightContent}
}; | ||
|
||
function AnimatedRefreshContractIcon({ contractId, onRefresh }: AnimatedRefreshContractIconProps) { | ||
const { isSyncing, syncCreatedTokensForExistingContract } = useSyncTokenstActions(); |
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.
typo
} | ||
eventElementId="NftSelectorSyncCreatedTokensForContractButton" | ||
eventName="Nft Selector SyncCreatedTokensForContractButton pressed" | ||
eventContext={contexts.UserCollection} |
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.
contexts.Posts
if (!collectionContractId) { | ||
return; | ||
} | ||
track('NFT Selector: Clicked Sync Creator Tokens For Existing Contract'); |
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.
same thing, let's make sure to track additional details: { id: Refresh Single Contract Button, context: contexts.Posts }
Summary of Changes
You can refresh collections of created tokens from
-web: NftSelector, Editor
-mobile: NftSelector
Demo Mobile
newehoqeoq.mov
Demo Web
Screen.Recording.2023-10-18.at.4.29.18.PM.MOV
Screen.Recording.2023-10-18.at.4.31.17.PM.MOV
Edge Cases
List any common edge cases that you have considered and tested.
Testing Steps
Can test locally with a creator
Checklist
Please make sure to review and check all of the following: