Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
9a27bae
feat: activities center
effie-ms Mar 24, 2026
bb44d56
refactor: final button
effie-ms Mar 25, 2026
7ee767c
fix: deduplication
effie-ms Mar 25, 2026
4877424
Merge branch 'main' into feat-activities
effie-ms Mar 25, 2026
0b7a50e
refactor: update icon
effie-ms Mar 26, 2026
a9440f6
refactor: limit stored routes to the most recent 100
effie-ms Mar 27, 2026
5714fd4
Merge branch 'main' into feat-activities
effie-ms Apr 1, 2026
6b45880
refactor: move deduplication into history combine
effie-ms Apr 1, 2026
34ced53
refactor: add bg to activities button
effie-ms Apr 1, 2026
111d6dc
refactor: show store items before history api is loaded
effie-ms Apr 1, 2026
5ad13cf
feat: add menu button to manage failed transactions
effie-ms Apr 1, 2026
8eb68e7
feat: styled dialogs
effie-ms Apr 6, 2026
e136fbb
chore: merge main into feat-activities
chybisov Apr 7, 2026
f8b6013
feat: implement context menu
effie-ms Apr 7, 2026
15051b9
fix: deduplication on render
effie-ms Apr 7, 2026
9a243d8
fix: filter deleteRoutes by account addresses
effie-ms Apr 7, 2026
4467f65
Merge branch 'main' into feat-activities
effie-ms Apr 8, 2026
9aef27a
refactor: update transaction deletion label to 'clear', fix backdrop
effie-ms Apr 8, 2026
21fdb87
fix: set minWidth of ErrorBadge to 16 for consistent styling
effie-ms Apr 8, 2026
ccad6db
Merge branch 'main' into feat-activities
effie-ms Apr 8, 2026
ea0a620
refactor: cleanup duplicate components
effie-ms Apr 8, 2026
8e57519
Merge branch 'main' into feat-activities
effie-ms Apr 8, 2026
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
51 changes: 18 additions & 33 deletions packages/widget/src/AppDefault.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import type { JSX } from 'react'
import { AppLayout } from './AppLayout.js'
import { NotFound } from './components/NotFound.js'
import { ActiveTransactionsPage } from './pages/ActiveTransactionsPage/ActiveTransactionsPage.js'
import { ActivitiesPage } from './pages/ActivitiesPage/ActivitiesPage.js'
import { LanguagesPage } from './pages/LanguagesPage.js'
import { MainPage } from './pages/MainPage/MainPage.js'
import { RoutesPage } from './pages/RoutesPage/RoutesPage.js'
Expand All @@ -22,7 +22,6 @@ import { SendToConfiguredWalletPage } from './pages/SendToWallet/SendToConfigure
import { SendToWalletPage } from './pages/SendToWallet/SendToWalletPage.js'
import { SettingsPage } from './pages/SettingsPage/SettingsPage.js'
import { TransactionDetailsPage } from './pages/TransactionDetailsPage/TransactionDetailsPage.js'
import { TransactionHistoryPage } from './pages/TransactionHistoryPage/TransactionHistoryPage.js'
import { TransactionPage } from './pages/TransactionPage/TransactionPage.js'
import { navigationRoutes } from './utils/navigationRoutes.js'

Expand Down Expand Up @@ -134,19 +133,25 @@ const routesTransactionExecutionDetailsRoute = createRoute({
component: TransactionDetailsPage,
})

const activeTransactionsLayoutRoute = createRoute({
const activitiesLayoutRoute = createRoute({
getParentRoute: () => rootRoute,
path: navigationRoutes.activeTransactions,
path: navigationRoutes.activities,
})

const activeTransactionsIndexRoute = createRoute({
getParentRoute: () => activeTransactionsLayoutRoute,
const activitiesIndexRoute = createRoute({
getParentRoute: () => activitiesLayoutRoute,
path: '/',
component: ActiveTransactionsPage,
component: ActivitiesPage,
})

const activeTransactionExecutionRoute = createRoute({
getParentRoute: () => activeTransactionsLayoutRoute,
const activitiesDetailsRoute = createRoute({
getParentRoute: () => activitiesLayoutRoute,
path: navigationRoutes.transactionDetails,
component: TransactionDetailsPage,
})

const activitiesTransactionExecutionRoute = createRoute({
getParentRoute: () => activitiesLayoutRoute,
path: navigationRoutes.transactionExecution,
component: TransactionPage,
})
Expand Down Expand Up @@ -186,23 +191,6 @@ const configuredWalletsRoute = createRoute({
component: SendToConfiguredWalletPage,
})

const transactionHistoryLayoutRoute = createRoute({
getParentRoute: () => rootRoute,
path: navigationRoutes.transactionHistory,
})

const transactionHistoryIndexRoute = createRoute({
getParentRoute: () => transactionHistoryLayoutRoute,
path: '/',
component: TransactionHistoryPage,
})

const transactionHistoryDetailsRoute = createRoute({
getParentRoute: () => transactionHistoryLayoutRoute,
path: navigationRoutes.transactionDetails,
component: TransactionDetailsPage,
})

const transactionExecutionLayoutRoute = createRoute({
getParentRoute: () => rootRoute,
path: navigationRoutes.transactionExecution,
Expand Down Expand Up @@ -245,9 +233,10 @@ const routeTree = rootRoute.addChildren([
transactionExecutionIndexRoute,
transactionExecutionDetailsRoute,
]),
activeTransactionsLayoutRoute.addChildren([
activeTransactionsIndexRoute,
activeTransactionExecutionRoute,
activitiesLayoutRoute.addChildren([
activitiesIndexRoute,
activitiesDetailsRoute,
activitiesTransactionExecutionRoute,
]),
sendToWalletLayoutRoute.addChildren([
sendToWalletIndexRoute,
Expand All @@ -256,10 +245,6 @@ const routeTree = rootRoute.addChildren([
sendToWalletConnectedWalletsRoute,
]),
configuredWalletsRoute,
transactionHistoryLayoutRoute.addChildren([
transactionHistoryIndexRoute,
transactionHistoryDetailsRoute,
]),
])

const history = createMemoryHistory({
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion packages/widget/src/components/BottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
useState,
} from 'react'
import { useGetScrollableContainer } from '../../hooks/useScrollableContainer.js'
import { modalProps, slotProps } from '../Dialog.js'
import { modalProps, slotProps } from '../Dialog/Dialog.js'
import type { BottomSheetBase, BottomSheetProps } from './types.js'

export const BottomSheet: ForwardRefExoticComponent<
Expand Down
13 changes: 13 additions & 0 deletions packages/widget/src/components/ContextMenu.style.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { IconButton, styled } from '@mui/material'
import type React from 'react'

export const ContextMenuButton: React.FC<
React.ComponentProps<typeof IconButton>
> = styled(IconButton)(({ theme }) => ({
position: 'absolute',
top: theme.spacing(1.75),
right: theme.spacing(2),
'&:hover': {
backgroundColor: `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.04)`,
},
}))
75 changes: 75 additions & 0 deletions packages/widget/src/components/ContextMenu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import MoreVertIcon from '@mui/icons-material/MoreVert'
import type { SxProps, Theme } from '@mui/material'
import { MenuItem } from '@mui/material'
import { type JSX, useId, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { ContextMenuButton } from './ContextMenu.style.js'
import { Menu } from './Menu.js'

export interface ContextMenuItemConfig {
icon: React.ReactNode
label: string
onClick: () => void
}

interface ContextMenuProps {
items: ContextMenuItemConfig[]
disabled?: boolean
buttonSx?: SxProps<Theme>
}

export const ContextMenu = ({
items,
disabled,
buttonSx,
}: ContextMenuProps): JSX.Element => {
const { t } = useTranslation()
const menuId = useId()
const [anchorEl, setAnchorEl] = useState<HTMLElement | null>(null)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see: CSS anchors. This may simplify the setup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. MUI's Menu needs anchorEl though. Plus browser support on Safari? Too new 😄

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, yeah. MUI :)) right.

const open = Boolean(anchorEl)

const handleOpen = (e: React.MouseEvent<HTMLButtonElement>) => {
setAnchorEl(e.currentTarget)
}

const closeMenu = () => {
setAnchorEl(null)
}

const handleItemClick = (onClick: () => void) => () => {
onClick()
closeMenu()
}

return (
<>
<ContextMenuButton
aria-label={t('button.options')}
aria-controls={open ? menuId : undefined}
aria-haspopup="true"
aria-expanded={open ? 'true' : undefined}
onClick={handleOpen}
sx={{ opacity: disabled ? 0.5 : 1, ...buttonSx }}
disableRipple
>
<MoreVertIcon fontSize="small" />
</ContextMenuButton>
<Menu
id={menuId}
elevation={0}
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
transformOrigin={{ vertical: 'top', horizontal: 'right' }}
anchorEl={anchorEl}
open={open}
onClose={closeMenu}
>
{items.map((item) => (
<MenuItem key={item.label} onClick={handleItemClick(item.onClick)}>
{item.icon}
{item.label}
</MenuItem>
))}
</Menu>
</>
)
}
Loading
Loading