diff --git a/CHANGELOG.md b/CHANGELOG.md index dbd0a3c16..1c7827bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -101,6 +101,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Improvements +- [#883](https://github.com/alleslabs/celatone-frontend/pull/883) Improve validator badge to have a dynamic width - [#884](https://github.com/alleslabs/celatone-frontend/pull/884) Bump cosmjs tx parsing problem - [#861](https://github.com/alleslabs/celatone-frontend/pull/861) Upgrade json schema package version - [#871](https://github.com/alleslabs/celatone-frontend/pull/871) Move filter and search logic to API diff --git a/src/lib/components/CopyLink.tsx b/src/lib/components/CopyLink.tsx index 4f180b601..8589d40a9 100644 --- a/src/lib/components/CopyLink.tsx +++ b/src/lib/components/CopyLink.tsx @@ -72,7 +72,7 @@ export const CopyLink = ({ {...flexProps} > ; }) => { @@ -124,10 +121,7 @@ const LinkRender = ({ @@ -136,7 +130,12 @@ const LinkRender = ({ ); return isInternal && !openNewTab ? ( - e.stopPropagation()}> + e.stopPropagation()} + style={{ overflow: "hidden" }} + > {textElement} ) : ( @@ -149,6 +148,7 @@ const LinkRender = ({ if (!isInternal) trackMintScan(type); e.stopPropagation(); }} + style={{ overflow: "hidden" }} > {textElement} @@ -163,7 +163,6 @@ export const ExplorerLink = ({ showCopyOnHover = false, isReadOnly = false, textFormat = "truncate", - maxWidth = "160px", textVariant = "body2", ampCopierSection, openNewTab, @@ -211,7 +210,6 @@ export const ExplorerLink = ({ hrefLink={link} textValue={textValue} isEllipsis={textFormat === "ellipsis"} - maxWidth={maxWidth} textVariant={textVariant} openNewTab={openNewTab} /> diff --git a/src/lib/components/ValidatorBadge.tsx b/src/lib/components/ValidatorBadge.tsx index eb73a67ce..061282fd1 100644 --- a/src/lib/components/ValidatorBadge.tsx +++ b/src/lib/components/ValidatorBadge.tsx @@ -13,7 +13,6 @@ interface ValidatorBadgeProps { validator: Nullable; badgeSize?: ImageProps["boxSize"]; ampCopierSection?: string; - maxWidth?: string; hasLabel?: boolean; moreInfo?: JSX.Element; } @@ -22,7 +21,6 @@ export const ValidatorBadge = ({ validator, badgeSize = 10, ampCopierSection, - maxWidth = "160px", hasLabel = true, moreInfo, }: ValidatorBadgeProps) => { @@ -37,7 +35,7 @@ export const ValidatorBadge = ({ {validator ? ( - + {isMobile && hasLabel && } diff --git a/src/lib/components/ValidatorImage.tsx b/src/lib/components/ValidatorImage.tsx index 7ef510986..3ffb84cad 100644 --- a/src/lib/components/ValidatorImage.tsx +++ b/src/lib/components/ValidatorImage.tsx @@ -28,7 +28,7 @@ export const ValidatorImage = ({ } return isLoading || !data || !validator.moniker ? ( - + ) : ( diff --git a/src/lib/components/table/blocks/BlocksTableRow.tsx b/src/lib/components/table/blocks/BlocksTableRow.tsx index c0743c494..66221e379 100644 --- a/src/lib/components/table/blocks/BlocksTableRow.tsx +++ b/src/lib/components/table/blocks/BlocksTableRow.tsx @@ -50,11 +50,7 @@ export const BlocksTableRow = ({ {showProposer && ( - + )} diff --git a/src/lib/components/table/contracts/ContractsTableMobileCard.tsx b/src/lib/components/table/contracts/ContractsTableMobileCard.tsx index e52218bcf..217b204f3 100644 --- a/src/lib/components/table/contracts/ContractsTableMobileCard.tsx +++ b/src/lib/components/table/contracts/ContractsTableMobileCard.tsx @@ -53,7 +53,6 @@ export const ContractsTableMobileCard = ({ } diff --git a/src/lib/components/table/non-redelegatable/NonRedelegatableTableMobileCard.tsx b/src/lib/components/table/non-redelegatable/NonRedelegatableTableMobileCard.tsx index 333a277b1..cad705f29 100644 --- a/src/lib/components/table/non-redelegatable/NonRedelegatableTableMobileCard.tsx +++ b/src/lib/components/table/non-redelegatable/NonRedelegatableTableMobileCard.tsx @@ -16,6 +16,7 @@ export const NonRedelegatablesTableMobileCard = ({ direction="column" gap={2} w="full" + minW={0} borderTop="1px solid" borderTopColor="gray.700" pt={3} diff --git a/src/lib/components/table/proposals/Answer.tsx b/src/lib/components/table/proposals/Answer.tsx index 8dfc451ec..d6414094e 100644 --- a/src/lib/components/table/proposals/Answer.tsx +++ b/src/lib/components/table/proposals/Answer.tsx @@ -55,8 +55,8 @@ export const Answer = ({ return ( diff --git a/src/lib/components/table/redelegation/RedelegationTableMobileCard.tsx b/src/lib/components/table/redelegation/RedelegationTableMobileCard.tsx index 940d6c697..02b4d08c4 100644 --- a/src/lib/components/table/redelegation/RedelegationTableMobileCard.tsx +++ b/src/lib/components/table/redelegation/RedelegationTableMobileCard.tsx @@ -29,12 +29,12 @@ export const RedelegationTableMobileCard = ({ templateColumns="1fr 32px 1fr" alignItems="center" > - + - + diff --git a/src/lib/components/table/tableComponents.ts b/src/lib/components/table/tableComponents.ts index 9e5d405e3..5919bc50a 100644 --- a/src/lib/components/table/tableComponents.ts +++ b/src/lib/components/table/tableComponents.ts @@ -41,6 +41,7 @@ const tableRowBaseStyle = { fontSize: "14px", fontWeight: 400, p: 4, + minW: 0, minH: "75px", display: "flex", alignItems: "center", diff --git a/src/lib/layout/Searchbar.tsx b/src/lib/layout/Searchbar.tsx index bec7c9ac9..4292ce2e8 100644 --- a/src/lib/layout/Searchbar.tsx +++ b/src/lib/layout/Searchbar.tsx @@ -418,44 +418,50 @@ const Searchbar = () => { onKeyDown={handleOnKeyEnter} autoComplete="off" /> - - {keyword.length > 0 ? ( - <> - {isLoading || isTyping ? ( - - - - Looking for results ... - - - ) : ( - - )} - - ) : ( - - - {getPlaceholder({ isWasm, isPool, isMove, isGov })} - - - )} - + {isOpen && ( + + {keyword.length > 0 ? ( + <> + {isLoading || isTyping ? ( + + + + Looking for results ... + + + ) : ( + + )} + + ) : ( + + + {getPlaceholder({ isWasm, isPool, isMove, isGov })} + + + )} + + )} ); }; diff --git a/src/lib/pages/block-details/components/BlockInfo.tsx b/src/lib/pages/block-details/components/BlockInfo.tsx index 8db1d2a35..6ea011b0d 100644 --- a/src/lib/pages/block-details/components/BlockInfo.tsx +++ b/src/lib/pages/block-details/components/BlockInfo.tsx @@ -36,7 +36,7 @@ export const BlockInfo = ({ blockData }: BlockInfoProps) => { }`} - + ( - + {title} diff --git a/src/lib/pages/proposal-details/components/vote-details/voting-period/table/Voter.tsx b/src/lib/pages/proposal-details/components/vote-details/voting-period/table/Voter.tsx index f67f41991..128d2e43f 100644 --- a/src/lib/pages/proposal-details/components/vote-details/voting-period/table/Voter.tsx +++ b/src/lib/pages/proposal-details/components/vote-details/voting-period/table/Voter.tsx @@ -29,7 +29,6 @@ export const Voter = ({ proposalVote }: VoterProps) => { /> ) : undefined } - maxWidth="110px" /> ); diff --git a/src/lib/pages/proposal-details/components/vote-details/voting-period/validator-votes-table/index.tsx b/src/lib/pages/proposal-details/components/vote-details/voting-period/validator-votes-table/index.tsx index d6afb8c5d..2948a1c59 100644 --- a/src/lib/pages/proposal-details/components/vote-details/voting-period/validator-votes-table/index.tsx +++ b/src/lib/pages/proposal-details/components/vote-details/voting-period/validator-votes-table/index.tsx @@ -40,8 +40,8 @@ export const ValidatorVotesTableBody = ({ const templateColumns = fullVersion && !isMobile - ? `${!isProposalResolved ? "0.2fr " : ""}1fr 0.8fr 1.5fr 1fr` - : `${!isProposalResolved ? "0.1fr " : ""}1.5fr 1fr`; + ? `${!isProposalResolved ? "32px " : ""}1fr 0.8fr 1.5fr 1fr` + : `${!isProposalResolved ? "32px " : ""}1.5fr 0.5fr`; if (isLoading) return ; if (!validatorVotes) return ; diff --git a/src/lib/pages/proposal-details/components/vote-details/voting-period/votes-table/index.tsx b/src/lib/pages/proposal-details/components/vote-details/voting-period/votes-table/index.tsx index 4256e2b34..69b2f1645 100644 --- a/src/lib/pages/proposal-details/components/vote-details/voting-period/votes-table/index.tsx +++ b/src/lib/pages/proposal-details/components/vote-details/voting-period/votes-table/index.tsx @@ -35,7 +35,7 @@ export const ProposalVotesTableBody = ({ }: ProposalVotesTableBodyProps) => { const isMobile = useMobile(); const templateColumns = - fullVersion && !isMobile ? `1fr 0.8fr 1.5fr 1fr` : `2fr 1fr`; + fullVersion && !isMobile ? `1fr 0.8fr 1.5fr 1fr` : `3fr 1fr`; if (isLoading) return ; if (!proposalVotes) return ; diff --git a/src/lib/pages/validators/components/validators-table/ValidatorsTableMobileCard.tsx b/src/lib/pages/validators/components/validators-table/ValidatorsTableMobileCard.tsx index acade627b..0bc4c2e5c 100644 --- a/src/lib/pages/validators/components/validators-table/ValidatorsTableMobileCard.tsx +++ b/src/lib/pages/validators/components/validators-table/ValidatorsTableMobileCard.tsx @@ -57,7 +57,7 @@ export const ValidatorsTableMobileCard = ({ )} - +