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

feat: visual tweaks #1312

Open
wants to merge 6 commits into
base: main
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/namadillo/src/App/AccountOverview/MaspBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const MaspBanner = (): JSX.Element => {
</div>
<ActionButton
size="md"
href={routes.ibcShieldAll}
href={routes.masp}
className="self-end justify-end"
>
Manage your shielded assets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ const PanelContent = ({ data }: { data: TokenBalance[] }): JSX.Element => {
title: "Total Transparent Asset Balance",
amount: getTotalDollar(data),
button: (
<ActionButton size="xs" href={routes.ibcShieldAll}>
Shield All
<ActionButton size="xs" href={routes.maspShield}>
Shield
</ActionButton>
),
},
Expand Down
2 changes: 1 addition & 1 deletion apps/namadillo/src/App/Governance/AllProposalsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ const TableSelect = <T extends string>(
type CellProps = { proposal: Proposal };

const Title: React.FC<CellProps> = ({ proposal }) => (
<div className="w-full overflow-x-hidden whitespace-nowrap text-ellipsis">
<div className="w-full overflow-x-hidden whitespace-nowrap text-ellipsis text-sm">
{proposal.content.title}
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions apps/namadillo/src/App/Governance/LiveGovernanceProposals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const ProposalListItem: React.FC<{
)
}
className={clsx(
"group/proposal cursor-pointer text-sm",
"group/proposal cursor-pointer",
"rounded-md bg-[#191919] p-4"
)}
>
Expand All @@ -52,8 +52,8 @@ const ProposalListItem: React.FC<{
</div>
</div>
<div className="flex items-center justify-between gap-4">
<div className="min-w-[6ch]">#{proposal.id.toString()}</div>
<div className="flex-1">{proposal.content.title}</div>
<div className="min-w-[6ch] text-sm">#{proposal.id.toString()}</div>
<div className="flex-1 leading-tight">{proposal.content.title}</div>
<TypeLabel proposalType={proposal.proposalType} color="dark" />
<div className="min-w-20">
{typeof vote !== "undefined" && (
Expand Down
6 changes: 3 additions & 3 deletions apps/namadillo/src/App/Governance/ProposalHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const ProposalHeader: React.FC<{
<div className="w-full">
<Breadcrumbs proposalId={proposalId} />
<BackButton />
<Stack gap={2.5}>
<Stack gap={2.5} className="mt-4">
<TypeLabel proposal={proposal} />
<Title proposal={proposal} proposalId={proposalId} />
</Stack>
Expand Down Expand Up @@ -77,7 +77,7 @@ const Title: React.FC<{
);

const Breadcrumbs: React.FC<{ proposalId: bigint }> = ({ proposalId }) => (
<div className="text-xxs text-neutral-500">
<div className="text-sm text-neutral-500">
<Link className="transition-colors hover:text-white" to={routes.governance}>
Governance
</Link>{" "}
Expand All @@ -97,7 +97,7 @@ const BackButton: React.FC = () => (
<Link
to={routes.governance}
className={clsx(
"inline-flex items-center text-xxs gap-1",
"inline-flex items-center text-xs gap-1",
"text-neutral-200 bg-neutral-900 my-2 px-2 py-0.5 rounded-sm",
"hover:text-yellow"
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ const Loaded: React.FC<{

const highestVoteType: VoteType | undefined =
zeroVotes ? undefined : (
voteTypes.reduce((a, b) => (props[a] > props[b] ? a : b))
voteTypes.reduce((a, b) => (props[a].gt(props[b]) ? a : b))
);

const [hoveredVoteType, setHoveredVoteType] = useState<VoteType | undefined>(
Expand Down
6 changes: 3 additions & 3 deletions apps/namadillo/src/App/Governance/UpcomingProposals.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const ProposalListItem: React.FC<{
)
}
className={clsx(
"group/proposal cursor-pointer text-sm",
"group/proposal cursor-pointer",
"rounded-md bg-[#191919] p-4"
)}
>
Expand All @@ -41,8 +41,8 @@ const ProposalListItem: React.FC<{
/>
</div>
<div className="flex items-center justify-between gap-4">
<div className="min-w-[6ch]">#{proposal.id.toString()}</div>
<div className="flex-1">{proposal.content.title}</div>
<div className="min-w-[6ch] text-sm">#{proposal.id.toString()}</div>
<div className="flex-1 leading-tight">{proposal.content.title}</div>
<TypeLabel proposalType={proposal.proposalType} color="dark" />
</div>

Expand Down
11 changes: 7 additions & 4 deletions apps/namadillo/src/App/Layout/ActiveAccount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { useAtomValue } from "jotai";
import { useLocation, useNavigate } from "react-router-dom";
import { DisconnectAccountIcon } from "./DisconnectAccountIcon";
import { SwitchAccountIcon } from "./SwitchAccountIcon";
import NamadaWalletIcon from "./assets/namada-wallet-icon.svg";

export const ActiveAccount = (): JSX.Element => {
const { data: account, isFetching } = useAtomValue(defaultAccountAtom);
Expand All @@ -17,22 +18,24 @@ export const ActiveAccount = (): JSX.Element => {
return <></>;
}

const buttonClassName = "p-1 opacity-80 transition-opacity hover:opacity-100";
const buttonClassName =
"p-1 px-2 opacity-80 transition-opacity hover:opacity-100";

return (
<div>
<span
className={clsx(
"px-4 py-2.5 flex items-center text-xs rounded-sm",
"text-white bg-black rounded-xs"
"p-2.5 flex items-center text-sm rounded-sm",
"text-white bg-rblack rounded-xs"
)}
>
<span className="flex items-center gap-2 relative group/tooltip">
<CopyToClipboardControl
className={buttonClassName}
value={account.address || ""}
>
{account.alias}
<img src={NamadaWalletIcon} alt="Namada Wallet" />
<span className="mr-2">{account.alias}</span>
</CopyToClipboardControl>
<Tooltip position="left">{account.address}</Tooltip>
</span>
Expand Down
4 changes: 2 additions & 2 deletions apps/namadillo/src/App/Layout/DisconnectAccountIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const DisconnectAccountIcon = (): JSX.Element => {
return (
<svg
width="12"
height="12"
width="18"
height="18"
viewBox="0 0 12 12"
fill="currentColor"
xmlns="http://www.w3.org/2000/svg"
Expand Down
4 changes: 2 additions & 2 deletions apps/namadillo/src/App/Layout/SwitchAccountIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const SwitchAccountIcon = (): JSX.Element => {
return (
<svg
width="13"
height="12"
width="18"
height="18"
viewBox="0 0 13 12"
fill="none"
xmlns="http://www.w3.org/2000/svg"
Expand Down
4 changes: 4 additions & 0 deletions apps/namadillo/src/App/Layout/assets/namada-wallet-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion apps/namadillo/src/App/Masp/ShieldedFungibleTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export const ShieldedFungibleTable = ({

return (
<>
<div className="text-sm font-medium mt-6">
<div className="text-sm font-medium">
<span className="text-yellow">{data.length} </span>
Tokens
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/namadillo/src/App/Masp/ShieldedNFTTable.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const ShieldedNFTTable = (): JSX.Element => {
return (
<div className="text-yellow p-10">
<div className="text-yellow">
<div>NFT Table (WIP)</div>
</div>
);
Expand Down
41 changes: 23 additions & 18 deletions apps/namadillo/src/App/Masp/ShieldedOverviewPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const tabs = ["Fungible", "NFT"];
const ShieldAssetCta = (): JSX.Element => {
return (
<div className="flex-1 flex items-center justify-center">
<ActionButton href={routes.ibc} className="w-fit uppercase">
<ActionButton href={routes.maspShield} className="w-fit uppercase">
Shield your first assets
</ActionButton>
</div>
Expand All @@ -39,29 +39,34 @@ const AssetTable = (): JSX.Element => {
);
}

// TODO implement NFT balances
const isNftEnabled = false;

return (
<AtomErrorBoundary
result={shieldedTokensQuery}
niceError="Unable to load your shielded balance"
containerProps={{ className: "pb-16" }}
>
<div className="flex">
{tabs.map((name) => {
const selected = name == tab;
return (
<ActionButton
key={name}
backgroundColor={selected ? "black" : "gray"}
outlineColor={selected ? "yellow" : undefined}
textColor={selected ? "yellow" : "white"}
backgroundHoverColor="yellow"
onClick={() => setTab(name)}
>
{name}
</ActionButton>
);
})}
</div>
{isNftEnabled && (
<div className="flex mb-6">
{tabs.map((name) => {
const selected = name == tab;
return (
<ActionButton
key={name}
backgroundColor={selected ? "black" : "gray"}
outlineColor={selected ? "yellow" : undefined}
textColor={selected ? "yellow" : "white"}
backgroundHoverColor="yellow"
onClick={() => setTab(name)}
>
{name}
</ActionButton>
);
})}
</div>
)}
{tab === "Fungible" && (
<ShieldedFungibleTable data={shieldedTokensQuery.data} />
)}
Expand Down
4 changes: 2 additions & 2 deletions apps/namadillo/src/App/Sidebars/ShieldAllBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const ShieldAllBanner = (): JSX.Element => {
src={`${svgImg}${isAnimating ? "#hover " : ""}`}
/>
<Link
to={routes.ibcShieldAll}
to={routes.maspShield}
onMouseEnter={() => setIsAnimating(true)}
onMouseLeave={() => setIsAnimating(false)}
>
Expand All @@ -43,7 +43,7 @@ export const ShieldAllBanner = (): JSX.Element => {
textColor="yellow"
backgroundHoverColor="yellow"
>
Shield All Assets
Shield Assets
</ActionButton>
</Link>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/components/src/CopyToClipboardControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const CopyToClipboardControl = ({
animate={{ opacity: 1, scale: 1 }}
exit={{ opacity: 0 }}
>
<GoCheckCircle />
<GoCheckCircle className="w-[18px] h-[18px]" />
</motion.div>
: <GoCopy />}
: <GoCopy className="w-[18px] h-[18px]" />}
</div>
);
};
2 changes: 1 addition & 1 deletion packages/components/src/Panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const Panel = <T extends keyof JSX.IntrinsicElements = "div">({
as || "div",
{
className: twMerge(
"rounded-sm bg-black px-4 py-5 text-white font-medium",
"rounded-sm bg-rblack px-4 py-5 text-white font-medium",
className
),
...props,
Expand Down
Loading