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

Add UI for Mintable, Royalty, Claimable, Transferable, BatchMetadata and OpenEdition modules #5219

Merged
merged 74 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
b87f2e1
added in transferable and mintable
GWSzeto Oct 29, 2024
1d8e153
it passes typecheck and lint
GWSzeto Oct 29, 2024
e3ec814
Merge branch 'main' into mintable-module
MananTank Oct 29, 2024
543b68f
UI adjustments and cleanup
MananTank Oct 29, 2024
9fa6d6d
implement MetadataUpload
GWSzeto Oct 29, 2024
05828ae
reverted lock file back
GWSzeto Oct 29, 2024
10a802a
Merge remote-tracking branch 'origin/main' into mintable-module
GWSzeto Oct 29, 2024
9e27649
lock file update
GWSzeto Oct 29, 2024
bd927ae
passes lint tests
GWSzeto Oct 29, 2024
2aef50a
Merge branch 'main' into mintable-module
MananTank Oct 30, 2024
08f2a79
fix pnpm lock
MananTank Oct 30, 2024
77316eb
refactor and UI updates
MananTank Oct 30, 2024
d74d420
added in useAllModuleContractInfo hook
GWSzeto Oct 30, 2024
5e63cae
fixing lint and typecheck errors
GWSzeto Oct 30, 2024
5eeeeca
Merge branch 'modules' into mintable-module
MananTank Oct 30, 2024
1b16162
Fix tailwindconfig and pkg json
MananTank Oct 30, 2024
aa5d040
remove extra prop requirements
MananTank Oct 30, 2024
92efc98
update checkbox labels
MananTank Oct 30, 2024
0269675
added in Royalty module
GWSzeto Oct 31, 2024
bea430c
implemented functionality of Claimable
GWSzeto Oct 31, 2024
17a9fb9
WIP: claimable configuration UI
GWSzeto Oct 31, 2024
adb228f
finished implementing Claimable module
GWSzeto Oct 31, 2024
c0455f0
fix up lint and typecheck issues
GWSzeto Oct 31, 2024
2af289f
revert turbo
GWSzeto Oct 31, 2024
cbedec5
added in BatchMetadata
GWSzeto Nov 1, 2024
b5650f9
added in OpenEditionMetadataModule
GWSzeto Nov 1, 2024
fadb84e
WIP: migrating PropertiesFormControl to shadcnui + tailwind
GWSzeto Nov 1, 2024
2a102e2
fixing lint and typecheck errors
GWSzeto Nov 1, 2024
2d2aff4
last fixes for switching PropertiesFormValues to shadcnui + tailwind
GWSzeto Nov 1, 2024
c4385fa
removed unused CompilerMetadata type
GWSzeto Nov 1, 2024
a3486ff
updated typings
GWSzeto Nov 1, 2024
29bf00f
remove
GWSzeto Nov 1, 2024
0edc2d6
added back in
GWSzeto Nov 1, 2024
a71d012
fixed linting issue
GWSzeto Nov 1, 2024
762d2b0
updated to make it mobile compatible
GWSzeto Nov 2, 2024
bf04434
fixed linting issues
GWSzeto Nov 2, 2024
c2c0e71
addressed comments in PR
GWSzeto Nov 3, 2024
7fbf87b
BatchMetadataModule fixes and UI adjustments
MananTank Nov 4, 2024
648380f
Fix crash on various modules UI on storybook on info button click
MananTank Nov 4, 2024
ff504aa
remove zod address schema cleanup
MananTank Nov 4, 2024
626f5ed
addressed comments in PR
GWSzeto Nov 4, 2024
e28694e
passes typecheck and lint
GWSzeto Nov 4, 2024
01b3311
updated claimable UI to include currency decimals
GWSzeto Nov 4, 2024
8b14233
added back in batch metadata module
GWSzeto Nov 4, 2024
9c9d091
updated batchMetadata UI to have batch upload metadata coming soon
GWSzeto Nov 4, 2024
1b7d29a
removed .or validation on zod
GWSzeto Nov 4, 2024
550613c
added in resolver for mintable and txNofitications for openedition
GWSzeto Nov 4, 2024
b2d4446
reversed back from bigint to number for zod validation schema
GWSzeto Nov 4, 2024
ca659ba
set the tokenId zod schema to string
GWSzeto Nov 4, 2024
53f109e
open edition cleanup
MananTank Nov 5, 2024
44ca031
Fix broken FormFieldSetup UI - revert changes
MananTank Nov 5, 2024
9798428
Add form validation in batchMetadata module and other corrections
MananTank Nov 5, 2024
6a41b31
Merge branch 'main' into mintable-module
MananTank Nov 5, 2024
278c20a
add error boundaries, fix lazy render of modules and fix padding in D…
MananTank Nov 5, 2024
927a4d3
claimable module claim conditions form cleanup
MananTank Nov 5, 2024
24fc6e8
use txbutton in batchmetadata and claimable
MananTank Nov 5, 2024
7584f00
use tx button in Mintable
MananTank Nov 5, 2024
b5ebf52
add tx button in Royalty module
MananTank Nov 5, 2024
d82a9fd
add tx button in Transferable module
MananTank Nov 5, 2024
fd1979f
add tx button in open edition module
MananTank Nov 5, 2024
0819108
Merge branch 'main' into mintable-module
MananTank Nov 5, 2024
44c4d7e
implemented claimableERC1155
GWSzeto Nov 5, 2024
314113b
implemented claimableERC1155 conditions query
GWSzeto Nov 6, 2024
a9da43e
implemented both erc721 and erc1155
GWSzeto Nov 6, 2024
da29439
Merge branch 'main' into mintable-module
MananTank Nov 6, 2024
aab676f
updated to fix issues found from testing
GWSzeto Nov 6, 2024
b81fd41
updated to include erc721 and erc1155 for mutation functions
GWSzeto Nov 6, 2024
2b37d7a
Merge remote-tracking branch 'origin/main' into mintable-module
GWSzeto Nov 6, 2024
23ecbd2
commented out claimable for now to unblock
GWSzeto Nov 6, 2024
a0417c0
add connect wallet in module stories, UI adjustments
MananTank Nov 6, 2024
5a13348
add 1155 case in setDefaultRoyaltyInfo
MananTank Nov 6, 2024
8c8edd6
Fix Transaction Count shown in tx button in TransferableModule
MananTank Nov 6, 2024
2de303a
tx count correction
MananTank Nov 6, 2024
ce5e6dc
Merge branch 'main' into mintable-module
MananTank Nov 6, 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 apps/dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"@hookform/resolvers": "^3.9.1",
"@marsidev/react-turnstile": "^1.0.2",
"@n8tb1t/use-scroll-position": "^2.0.3",
"@radix-ui/react-accordion": "^1.2.1",
"@radix-ui/react-alert-dialog": "^1.1.2",
"@radix-ui/react-avatar": "^1.1.1",
"@radix-ui/react-checkbox": "^1.1.2",
Expand Down
8 changes: 7 additions & 1 deletion apps/dashboard/src/@/components/blocks/FormFieldSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function FormFieldSetup(props: {
children: React.ReactNode;
tooltip?: React.ReactNode;
isRequired: boolean;
helperText?: React.ReactNode;
}) {
return (
<div>
Expand All @@ -26,8 +27,13 @@ export function FormFieldSetup(props: {
)}
</div>
{props.children}

{props.helperText && (
<p className="mt-2 text-muted-foreground text-sm">{props.helperText}</p>
)}

{props.errorMessage && (
<p className="mt-1 text-destructive-text text-sm">
<p className="mt-2 text-destructive-text text-sm">
{props.errorMessage}
</p>
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/dashboard/src/@/components/ui/DatePickerWithRange.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export function DatePickerWithRange(props: {
<DynamicHeight>
<div>
{!isValid && (
<p className="flex items-center justify-center gap-2 pt-2 text-center text-destructive-text text-sm">
<p className="flex items-center justify-center gap-2 py-2 text-center text-destructive-text text-sm">
<CalendarX2Icon className="h-4 w-4" />
Invalid date range
</p>
)}
{props.header}

<div className="px-4">
<div className={cn("px-4", !props.header && "py-4")}>
<TabButtons
tabClassName="!text-sm"
activeTabClassName="!bg-inverted !text-inverted-foreground"
Expand Down
58 changes: 58 additions & 0 deletions apps/dashboard/src/@/components/ui/accordion.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"use client";

import * as AccordionPrimitive from "@radix-ui/react-accordion";
import { ChevronDown } from "lucide-react";
import * as React from "react";

import { cn } from "@/lib/utils";

const Accordion = AccordionPrimitive.Root;

const AccordionItem = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Item>
>(({ className, ...props }, ref) => (
<AccordionPrimitive.Item
ref={ref}
className={cn("border-border border-b", className)}
{...props}
/>
));
AccordionItem.displayName = "AccordionItem";

const AccordionTrigger = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Trigger>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Trigger>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Header className="flex">
<AccordionPrimitive.Trigger
ref={ref}
className={cn(
"flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",
className,
)}
{...props}
>
{children}
<ChevronDown className="h-4 w-4 shrink-0 transition-transform duration-200" />
</AccordionPrimitive.Trigger>
</AccordionPrimitive.Header>
));
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;

const AccordionContent = React.forwardRef<
React.ElementRef<typeof AccordionPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof AccordionPrimitive.Content>
>(({ className, children, ...props }, ref) => (
<AccordionPrimitive.Content
ref={ref}
className="overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down"
{...props}
>
<div className={cn("pt-0 pb-4", className)}>{children}</div>
</AccordionPrimitive.Content>
));

AccordionContent.displayName = AccordionPrimitive.Content.displayName;

export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { popularChains } from "../popularChains";
export const CustomConnectWallet = (props: {
loginRequired?: boolean;
connectButtonClassName?: string;
signInLinkButtonClassName?: string;
detailsButtonClassName?: string;
}) => {
const thirdwebClient = useThirdwebClient();
Expand Down Expand Up @@ -134,7 +135,12 @@ export const CustomConnectWallet = (props: {
if (!isLoggedIn && loginRequired) {
return (
<>
<Button asChild variant="default" className="gap-2" size="lg">
<Button
asChild
variant="default"
className={props.signInLinkButtonClassName}
size="lg"
>
<Link
href={`/login${pathname ? `?next=${encodeURIComponent(pathname)}` : ""}`}
>
Expand Down
Loading