mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-13 11:23:50 +00:00
refactor: improvements to navigation
This commit is contained in:
committed by
Carlos Valente
parent
31d47ed1e5
commit
48fe6a980c
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 + ,');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user