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

Update UI of Beehive Component #837

Merged
merged 23 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
c1d99d2
Remove feature flag -`BEEHIVE_COMPONENT_ENABLED`
kkosiorowska Nov 8, 2024
d8897fe
Update UI of Beehive Component
kkosiorowska Nov 8, 2024
66d824e
Update beehive illustration
kkosiorowska Nov 8, 2024
d483a4e
Update `InfoTooltip` component
kkosiorowska Nov 8, 2024
ba73d8c
Fix a failed build
kkosiorowska Nov 8, 2024
b890270
Update the tooltip theme to be consistent with the design
kkosiorowska Nov 8, 2024
ef11ef9
Fix padding for tooltip component
kkosiorowska Nov 8, 2024
5cbdbc6
Fix styles for the tooltip
kkosiorowska Nov 8, 2024
f74eb88
Remove unneeded asset
kkosiorowska Nov 8, 2024
02fb882
Use a `InfoTooltip` in `AcrePointsCard`
kkosiorowska Nov 8, 2024
97d70cd
Refactor for the card theme
kkosiorowska Nov 8, 2024
2dcbff2
Update styles for `CardHeader` to new design
kkosiorowska Nov 8, 2024
4e7cc56
Update styles for table header to new design
kkosiorowska Nov 8, 2024
91dd3a6
Remove unnecessary props for `Card` component
kkosiorowska Nov 8, 2024
4cd8598
Remove unneeded import
kkosiorowska Nov 8, 2024
92dee8b
Set correct size for the tooltip in `CurrencyBalance`
kkosiorowska Nov 8, 2024
cc1d707
Back to previous version
kkosiorowska Nov 12, 2024
dc231b8
Use style props shorthands
kkosiorowska Nov 12, 2024
8729d75
Merge branch 'main' of github.com:thesis/acre into update-beehive-com…
kkosiorowska Nov 13, 2024
53f7d03
Merge branch 'update-beehive-component' of github.com:thesis/acre int…
kkosiorowska Nov 13, 2024
b69be5b
Merge branch 'main' into update-beehive-component
kpyszkowski Nov 13, 2024
9176c1e
Merge branch 'main' into update-beehive-component
kpyszkowski Nov 13, 2024
04c516a
Refactor for the card theme (#838)
kpyszkowski Nov 13, 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: 0 additions & 1 deletion dapp/.env
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ VITE_FEATURE_FLAG_GAMIFICATION_ENABLED="false"
VITE_FEATURE_FLAG_WITHDRAWALS_ENABLED="false"
VITE_FEATURE_FLAG_OKX_WALLET_ENABLED="false"
VITE_FEATURE_FLAG_XVERSE_WALLET_ENABLED="false"
VITE_FEATURE_FLAG_BEEHIVE_COMPONENT_ENABLED="false"
VITE_FEATURE_FLAG_ACRE_POINTS_ENABLED="true"
VITE_FEATURE_FLAG_TVL_ENABLED="true"
VITE_FEATURE_GATING_DAPP_ENABLED="true"
Expand Down
14 changes: 0 additions & 14 deletions dapp/src/assets/icons/Info.tsx

This file was deleted.

1 change: 0 additions & 1 deletion dapp/src/assets/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./Info"
export * from "./ArrowUpRight"
export * from "./AcreLogo"
export * from "./Pause"
Expand Down
56 changes: 55 additions & 1 deletion dapp/src/assets/images/beehive-illustration.svg
kpyszkowski marked this conversation as resolved.
Show resolved Hide resolved
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion dapp/src/assets/images/mezo-bees.svg

This file was deleted.

21 changes: 3 additions & 18 deletions dapp/src/components/Header/ConnectWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@ export default function ConnectWallet() {
divider={<StackDivider borderColor="gold.500" />}
>
<Tooltip
fontSize="xs"
size="xs"
label={hasCopied ? "Address copied" : "Copy"}
color="gold.200"
px={3}
py={2}
closeOnClick={false}
>
<IconButton
Expand All @@ -116,13 +113,7 @@ export default function ConnectWallet() {
</Tooltip>

{isChangeAccountFeatureSupported(embeddedApp) && (
<Tooltip
fontSize="xs"
label="Change account"
color="gold.200"
px={3}
py={2}
>
<Tooltip size="xs" label="Change account">
<IconButton
variant="ghost"
aria-label="Change account"
Expand All @@ -134,13 +125,7 @@ export default function ConnectWallet() {
</Tooltip>
)}

<Tooltip
fontSize="xs"
label="Disconnect"
color="gold.200"
px={3}
py={2}
>
<Tooltip size="xs" label="Disconnect">
<IconButton
variant="ghost"
aria-label="Disconnect"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ import {
ModalCloseButton,
ModalFooter,
ModalHeader,
Tooltip,
} from "@chakra-ui/react"
import { CableWithPlugIcon, Info } from "#/assets/icons"
import { CableWithPlugIcon } from "#/assets/icons"
import { TextMd } from "#/components/shared/Typography"
import { EXTERNAL_HREF } from "#/constants"
import IconWrapper from "#/components/shared/IconWrapper"
Expand All @@ -20,6 +19,7 @@ import {
IconReload,
IconServerBolt,
} from "@tabler/icons-react"
// import InfoTooltip from "#/components/shared/InfoTooltip"

export default function ServerErrorModal({
isLoading,
Expand Down Expand Up @@ -66,9 +66,7 @@ export default function ServerErrorModal({
<HStack>
<TextMd fontWeight="bold">System status</TextMd>
{/* TODO: ADD a tooltip */}
<Tooltip label="Tooltip text" placement="top">
<Icon as={Info} boxSize={4} color="grey.400" />
</Tooltip>
{/* <InfoTooltip label="Tooltip text" placement="top" /> */}
</HStack>
<TextMd color="red.400">Partial Outage</TextMd>
</Flex>
Expand Down
2 changes: 1 addition & 1 deletion dapp/src/components/shared/CurrencyBalance/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export function CurrencyBalance({
const tooltipLabel = `${getBalance({ withFullPrecision: true })} ${symbol}`

return (
<Tooltip label={tooltipLabel} shouldWrapChildren>
<Tooltip size="xs" label={tooltipLabel} shouldWrapChildren>
{content}
</Tooltip>
)
Expand Down
13 changes: 11 additions & 2 deletions dapp/src/components/shared/InfoTooltip.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
import React from "react"
import { Info } from "#/assets/icons"
import { IconInfoCircleFilled } from "@tabler/icons-react"
import { Icon, Tooltip, TooltipProps } from "@chakra-ui/react"

// TODO: Define in the new color palette
const ICON_COLOR = "#3A3328"
kpyszkowski marked this conversation as resolved.
Show resolved Hide resolved

export default function InfoTooltip(props: Omit<TooltipProps, "children">) {
return (
<Tooltip placement="bottom" {...props}>
<Icon as={Info} boxSize={4} cursor="pointer" color="grey.400" />
<Icon
as={IconInfoCircleFilled}
boxSize="1.125rem" // 18px
cursor="pointer"
color={ICON_COLOR}
opacity={0.25}
/>
</Tooltip>
)
}
4 changes: 0 additions & 4 deletions dapp/src/constants/featureFlags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ const XVERSE_WALLET_ENABLED =
const WITHDRAWALS_ENABLED =
import.meta.env.VITE_FEATURE_FLAG_WITHDRAWALS_ENABLED === "true"

const BEEHIVE_COMPONENT_ENABLED =
import.meta.env.VITE_FEATURE_FLAG_BEEHIVE_COMPONENT_ENABLED === "true"

const ACRE_POINTS_ENABLED =
import.meta.env.VITE_FEATURE_FLAG_ACRE_POINTS_ENABLED === "true"

Expand All @@ -26,7 +23,6 @@ const featureFlags = {
OKX_WALLET_ENABLED,
XVERSE_WALLET_ENABLED,
WITHDRAWALS_ENABLED,
BEEHIVE_COMPONENT_ENABLED,
ACRE_POINTS_ENABLED,
TVL_ENABLED,
GATING_DAPP_ENABLED,
Expand Down
15 changes: 5 additions & 10 deletions dapp/src/pages/DashboardPage/AcrePointsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@ import {
CardHeader,
CardProps,
HStack,
Icon,
Stack,
Tooltip,
VStack,
} from "@chakra-ui/react"
import Countdown from "#/components/shared/Countdown"
import { logPromiseFailure, numberToLocaleString } from "#/utils"
import { useAcrePoints, useWallet } from "#/hooks"
import Spinner from "#/components/shared/Spinner"
import { IconInfoCircle } from "@tabler/icons-react"
import UserDataSkeleton from "#/components/shared/UserDataSkeleton"
import InfoTooltip from "#/components/shared/InfoTooltip"
import useDebounce from "#/hooks/useDebounce"
Expand Down Expand Up @@ -77,15 +74,13 @@ export default function AcrePointsCard(props: CardProps) {
<HStack spacing={0}>
<Spinner mr={3} size="sm" />
<TextMd>Your drop is being prepared.</TextMd>
<Tooltip
<InfoTooltip
label={`
We need some time to calculate your points. It may take up to 30 minutes.
${claimableBalance ? "You can still claim points from previous drops." : ""}
`}
We need some time to calculate your points. It may take up to 30 minutes.
${claimableBalance ? "You can still claim points from previous drops." : ""}
`}
maxW={72}
>
<Icon ml={1.5} as={IconInfoCircle} />
</Tooltip>
/>
</HStack>
</VStack>
) : (
Expand Down
Loading
Loading