Skip to content

Commit

Permalink
Merge pull request #2350 from blockscout/navigation-improvement
Browse files Browse the repository at this point in the history
trying to make google happy
  • Loading branch information
isstuev authored Nov 1, 2024
2 parents af0baef + a6da5d8 commit d86c7ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions ui/snippets/navigation/vertical/NavLinkGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {
Text,
HStack,
Box,
Link,
PopoverTrigger,
PopoverContent,
PopoverBody,
Expand Down Expand Up @@ -38,11 +37,12 @@ const NavLinkGroup = ({ item, isCollapsed }: Props) => {
<Popover
trigger="hover"
placement="right-start"
isLazy
// should not be lazy to help google indexing pages
isLazy={ false }
gutter={ 8 }
>
<PopoverTrigger>
<Link
<Box
{ ...styleProps.itemProps }
w={{ lg: isExpanded ? '180px' : '60px', xl: isCollapsed ? '60px' : '180px' }}
pl={{ lg: isExpanded ? 2 : '15px', xl: isCollapsed ? '15px' : 2 }}
Expand Down Expand Up @@ -73,14 +73,14 @@ const NavLinkGroup = ({ item, isCollapsed }: Props) => {
transitionTimingFunction="ease"
/>
</HStack>
</Link>
</Box>
</PopoverTrigger>
<PopoverContent width="252px" top={{ lg: isExpanded ? '-16px' : 0, xl: isCollapsed ? 0 : '-16px' }}>
<PopoverBody p={ 4 }>
<Text variant="secondary" fontSize="sm" mb={ 1 } display={{ lg: isExpanded ? 'none' : 'block', xl: isCollapsed ? 'block' : 'none' }}>
{ item.text }
</Text>
<VStack spacing={ 1 } alignItems="start">
<VStack spacing={ 1 } alignItems="start" as="ul">
{ item.subItems.map((subItem, index) => Array.isArray(subItem) ? (
<Box
key={ index }
Expand Down
4 changes: 2 additions & 2 deletions ui/snippets/navigation/vertical/NavigationDesktop.pw.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ test.describe('with submenu', () => {
</Flex>,
{ hooksConfig },
);
await page.locator('a[aria-label="Blockchain link group"]').hover();
await page.locator('div[aria-label="Blockchain link group"]').hover();
});

test('', async() => {
Expand Down Expand Up @@ -239,7 +239,7 @@ test.describe('with highlighted routes', () => {
});

test('with submenu', async({ page }) => {
await page.locator('a[aria-label="Blockchain link group"]').hover();
await page.locator('div[aria-label="Blockchain link group"]').hover();
await expect(component).toHaveScreenshot();
});

Expand Down

0 comments on commit d86c7ca

Please sign in to comment.