refactor: improvements to navigation

This commit is contained in:
Carlos Valente
2025-06-20 20:37:12 +02:00
committed by Carlos Valente
parent 31d47ed1e5
commit 48fe6a980c
3 changed files with 7 additions and 11 deletions
@@ -1,5 +1,6 @@
import { memo } from 'react';
import { useDisclosure } from '@chakra-ui/react';
import { useHotkeys } from '@mantine/hooks';
import FloatingNavigation from './FloatingNavigation';
import NavigationMenu from './NavigationMenu';
@@ -18,6 +19,8 @@ function ViewNavigationMenu(props: ViewNavigationMenuProps) {
const toggleMenu = () => (isMenuOpen ? onMenuClose() : onMenuOpen());
useHotkeys([['mod + ,', () => toggleMenu()]]);
if (isViewLocked) {
return <ViewLockedIcon />;
}
@@ -11,10 +11,6 @@
&.collapsible {
cursor: pointer;
&:hover {
border-bottom: 1px solid $white-10;
}
}
}
+4 -7
View File
@@ -1,6 +1,6 @@
import { expect, test } from '@playwright/test';
import { expect, type Page, test } from '@playwright/test';
test.describe.fixme('test view navigation feature', () => {
test.describe('test view navigation feature', () => {
test.beforeEach(async ({ page }) => {
await page.goto('http://localhost:4001/');
page.locator('data-test-id=timer-view');
@@ -71,9 +71,6 @@ test.describe.fixme('test view navigation feature', () => {
});
});
async function openNavigationMenu(page) {
// await page.mouse.move(Math.random() * 100, Math.random() * 100); FIXME: mouse.move dose not work in github actions
await page.keyboard.press('T');
await page.getByRole('button', { name: 'toggle menu' }).click();
page.locator('data-test-id=navigation__menu');
async function openNavigationMenu(page: Page) {
await page.keyboard.press('ControlOrMeta + ,');
}