Merge pull request #711 from toeverything/chore/remove-searchArrowButton

chore: remove searchArrowButton
This commit is contained in:
DarkSky 2023-01-11 18:37:48 +08:00 committed by GitHub
commit 257744f98b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 8 additions and 14 deletions

View File

@ -1,14 +1,8 @@
import React, { useEffect, useState } from 'react';
import {
StyledSearchArrowWrapper,
StyledSwitchWrapper,
StyledTitle,
StyledTitleWrapper,
} from './styles';
import { StyledSwitchWrapper, StyledTitle, StyledTitleWrapper } from './styles';
import { Content } from '@/ui/layout';
import { useAppState } from '@/providers/app-state-provider/context';
import EditorModeSwitch from '@/components/editor-mode-switch';
import QuickSearchButton from './QuickSearchButton';
import Header from './Header';
import usePropsUpdated from '@/hooks/use-props-updated';
import useCurrentPageMeta from '@/hooks/use-current-page-meta';
@ -64,9 +58,9 @@ export const EditorHeader = () => {
/>
</StyledSwitchWrapper>
<Content ellipsis={true}>{title}</Content>
<StyledSearchArrowWrapper>
{/* <StyledSearchArrowWrapper>
<QuickSearchButton />
</StyledSearchArrowWrapper>
</StyledSearchArrowWrapper> */}
</StyledTitleWrapper>
</StyledTitle>
)}

View File

@ -11,7 +11,7 @@ export const QuickSearchButton = ({
const { triggerQuickSearchModal } = useModal();
const { t } = useTranslation();
return (
<Tooltip content={t('Switch to')} placement="bottom">
<Tooltip content={t('Jump to')} placement="bottom">
<IconButton
data-testid="header-quickSearchButton"
{...props}

View File

@ -81,7 +81,7 @@ export const Results = (props: {
</StyledNotFound>
)
) : (
<Command.Group heading={t('Switch to')}>
<Command.Group heading={t('Jump to')}>
{List.map(link => {
return (
<Command.Item

View File

@ -20,7 +20,7 @@
"Add to favourites": "Add to favourites",
"Paper": "Paper",
"Edgeless": "Edgeless",
"Switch to": "Switch to",
"Jump to": "Jump to",
"Convert to ": "Convert to ",
"Page": "Page",
"Export": "Export",

View File

@ -10,7 +10,7 @@ export async function clickPageMoreActions(page: Page) {
.getByTestId('editor-header-items')
.getByRole('button')
//FIXME: temporary change due to cloud sync icon being hidden
.nth(1)
.nth(0)
.click()
);
}

View File

@ -32,7 +32,7 @@ test.describe('Open quick search', () => {
await expect(quickSearch).toBeVisible();
});
test('Click arrowDown icon after title', async ({ page }) => {
test.skip('Click arrowDown icon after title', async ({ page }) => {
await newPage(page);
const quickSearchButton = page.locator(
'[data-testid=header-quickSearchButton]'