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

Touchoups #452

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion apps/web/components/CommunityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export function CommunityCard({
<Card
key={id}
href={`${pathname}/${id}`}
className={`w-[275px] sm:m-w-[313px] ${isNewCommunity ? "shadow-2xl" : ""}`}
className={`w-[275px] sm:min-w-[313px] ${isNewCommunity ? "shadow-2xl" : ""}`}
>
<Image
src={commImg}
Expand Down
8 changes: 4 additions & 4 deletions apps/web/components/Forms/ProposalForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export const ProposalForm = ({
registerOptions={{
max: {
value: spendingLimitNumber,
message: `Max amount cannot exceed ${formatNumber(spendingLimitString)} ${poolToken?.symbol}`,
message: `Max amount must remain under the spending limit of ${formatNumber(spendingLimitString)} ${poolToken?.symbol}`,
},
min: {
value: INPUT_TOKEN_MIN_VALUE,
Expand All @@ -347,7 +347,7 @@ export const ProposalForm = ({
type="number"
placeholder="0"
suffix={poolToken?.symbol}
/>
/>
</div>
)}
{proposalTypeName !== "signaling" && (
Expand Down Expand Up @@ -403,10 +403,10 @@ export const ProposalForm = ({
{arbitrableConfig && (
<WalletBalance
askedAmount={arbitrableConfig.submitterCollateralAmount}
label="Proposal stake"
label="Collateral deposit"
setIsEnoughBalance={setIsEnoughBalance}
token="native"
tooltip="A stake is required for proposal submission. It will be refunded upon proposal execution or cancellation, except in the case of disputes, where it is forfeited."
tooltip="A stake is required as collateral for proposal submission and is returned upon execution or cancellation, except in the case of disputed and found to be in violation of the Covenant by the Tribunal, where it is forfeited."
/>
)}
</div>
Expand Down
26 changes: 20 additions & 6 deletions apps/web/components/PoolCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ import {
CVStrategyConfig,
TokenGarden,
} from "#/subgraph/.graphclient";
import { Skeleton } from "./Skeleton";
import TooltipIfOverflow from "./TooltipIfOverflow";
import { blueLand, grass } from "@/assets";
import { Badge, Card, DisplayNumber, Statistic } from "@/components";
import { QUERY_PARAMS } from "@/constants/query-params";
import { useCollectQueryParams } from "@/contexts/collectQueryParams.context";
import { useMetadataIpfsFetch } from "@/hooks/useIpfsFetch";
import { PointSystems, PoolTypes } from "@/types";
import { capitalize } from "@/utils/text";

Expand All @@ -36,7 +39,11 @@ export function PoolCard({ pool, tokenGarden }: Props) {
const pathname = usePathname();
const searchParams = useCollectQueryParams();

let { poolAmount, poolId, proposals, isEnabled, config } = pool;
let { poolAmount, poolId, proposals, isEnabled, config, metadata } = pool;

const { metadata: ipfsResult } = useMetadataIpfsFetch({
hash: metadata,
});

poolAmount = poolAmount || 0;
const poolType = config?.proposalType as number | undefined;
Expand All @@ -46,13 +53,20 @@ export function PoolCard({ pool, tokenGarden }: Props) {
return (
<Card
href={`${pathname}/${poolId}`}
className={isNewPool ? "shadow-2xl" : ""}
className={`w-[275px] sm:min-w-[313px] ${isNewPool ? "shadow-2xl" : ""}`}
>
<header className="mb-4 flex w-full items-center justify-between">
<h4>Pool #{poolId}</h4>
<Badge type={poolType} />
<header className="mb-4 flex flex-col w-full justify-between items-start gap-2">
<Skeleton isLoading={!ipfsResult}>
<h3 className="flex items-start w-fit max-w-full">
<TooltipIfOverflow>{ipfsResult?.title}</TooltipIfOverflow>
</h3>
</Skeleton>
<div className="flex justify-between items-center w-full">
<h6>ID #{poolId}</h6>
<Badge type={poolType} />
</div>
</header>
<div className="mb-10 flex min-h-[60px] flex-col gap-2">
<div className="mb-8 flex min-h-[60px] flex-col gap-2">
<Statistic
icon={<BoltIcon />}
label="voting weight"
Expand Down
16 changes: 9 additions & 7 deletions apps/web/components/Skeleton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@ export const Skeleton = ({
rows = 1,
}: Props) => {
return isLoading ?
<div className="flex flex-col gap-1">
{Array(rows).fill(0).map((_, i) => (
<div
key={i}
className={`[--fallback-b3:#f0f0f0] skeleton h-4 w-full my-1 rounded-md ${className}`}
/>
))}
<div className="flex flex-col gap-1 w-full">
{Array(rows)
.fill(0)
.map((_, i) => (
<div
key={i}
className={`[--fallback-b3:#f0f0f0] skeleton h-5 w-full my-1 rounded-md ${className}`}
/>
))}
</div>
: <>{children}</>;
};
90 changes: 45 additions & 45 deletions pkg/subgraph/.graphclient/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,28 +71,28 @@ export async function getMeshOptions() {
store: rootStore.child('bareMerger')
});
const documentHashMap = {
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetFactoriesDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetTokenGardensDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetMemberStrategyDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": IsMemberDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetMemberDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetPoolCreationDataDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetGardenCommunitiesDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetCommunityDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetCommunityCreationDataDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetPoolDataDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetProposalDataDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetAlloDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetStrategyByPoolDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetTokenTitleDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetCommunityTitlesDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetPoolTitlesDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetProposalTitlesDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetPassportScorerDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetPassportStrategyDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetPassportUserDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetProposalDisputesDocument,
"537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab": GetArbitrableConfigsDocument
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetFactoriesDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetTokenGardensDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetMemberStrategyDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": IsMemberDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetMemberDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetPoolCreationDataDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetGardenCommunitiesDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetCommunityDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetCommunityCreationDataDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetPoolDataDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetProposalDataDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetAlloDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetStrategyByPoolDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetTokenTitleDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetCommunityTitlesDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetPoolTitlesDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetProposalTitlesDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetPassportScorerDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetPassportStrategyDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetPassportUserDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetProposalDisputesDocument,
"8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2": GetArbitrableConfigsDocument
};
additionalEnvelopPlugins.push(usePersistedOperations({
getPersistedOperation(key) {
Expand All @@ -118,154 +118,154 @@ export async function getMeshOptions() {
return printWithCache(GetFactoriesDocument);
},
location: 'GetFactoriesDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetTokenGardensDocument,
get rawSDL() {
return printWithCache(GetTokenGardensDocument);
},
location: 'GetTokenGardensDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetMemberStrategyDocument,
get rawSDL() {
return printWithCache(GetMemberStrategyDocument);
},
location: 'GetMemberStrategyDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: IsMemberDocument,
get rawSDL() {
return printWithCache(IsMemberDocument);
},
location: 'IsMemberDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetMemberDocument,
get rawSDL() {
return printWithCache(GetMemberDocument);
},
location: 'GetMemberDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetPoolCreationDataDocument,
get rawSDL() {
return printWithCache(GetPoolCreationDataDocument);
},
location: 'GetPoolCreationDataDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetGardenCommunitiesDocument,
get rawSDL() {
return printWithCache(GetGardenCommunitiesDocument);
},
location: 'GetGardenCommunitiesDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetCommunityDocument,
get rawSDL() {
return printWithCache(GetCommunityDocument);
},
location: 'GetCommunityDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetCommunityCreationDataDocument,
get rawSDL() {
return printWithCache(GetCommunityCreationDataDocument);
},
location: 'GetCommunityCreationDataDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetPoolDataDocument,
get rawSDL() {
return printWithCache(GetPoolDataDocument);
},
location: 'GetPoolDataDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetProposalDataDocument,
get rawSDL() {
return printWithCache(GetProposalDataDocument);
},
location: 'GetProposalDataDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetAlloDocument,
get rawSDL() {
return printWithCache(GetAlloDocument);
},
location: 'GetAlloDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetStrategyByPoolDocument,
get rawSDL() {
return printWithCache(GetStrategyByPoolDocument);
},
location: 'GetStrategyByPoolDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetTokenTitleDocument,
get rawSDL() {
return printWithCache(GetTokenTitleDocument);
},
location: 'GetTokenTitleDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetCommunityTitlesDocument,
get rawSDL() {
return printWithCache(GetCommunityTitlesDocument);
},
location: 'GetCommunityTitlesDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetPoolTitlesDocument,
get rawSDL() {
return printWithCache(GetPoolTitlesDocument);
},
location: 'GetPoolTitlesDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetProposalTitlesDocument,
get rawSDL() {
return printWithCache(GetProposalTitlesDocument);
},
location: 'GetProposalTitlesDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetPassportScorerDocument,
get rawSDL() {
return printWithCache(GetPassportScorerDocument);
},
location: 'GetPassportScorerDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetPassportStrategyDocument,
get rawSDL() {
return printWithCache(GetPassportStrategyDocument);
},
location: 'GetPassportStrategyDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetPassportUserDocument,
get rawSDL() {
return printWithCache(GetPassportUserDocument);
},
location: 'GetPassportUserDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetProposalDisputesDocument,
get rawSDL() {
return printWithCache(GetProposalDisputesDocument);
},
location: 'GetProposalDisputesDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}, {
document: GetArbitrableConfigsDocument,
get rawSDL() {
return printWithCache(GetArbitrableConfigsDocument);
},
location: 'GetArbitrableConfigsDocument.graphql',
sha256Hash: '537e9e5e43ebfb83a7f9ab6430c13b4a0aa0aae76c471ad20caa1b4b482430ab'
sha256Hash: '8c4e2689e2603a221e82211c01fb7e208b113089dfecda76627946e068ef20a2'
}
];
},
Expand Down Expand Up @@ -499,7 +499,7 @@ export const getCommunityDocument = gql `
id
stakedTokens
}
strategies {
strategies(orderBy: poolId, orderDirection: desc) {
id
proposals {
id
Expand Down
Loading
Loading