Merge pull request #18918 from overleaf/dp-swap-search-arrows

Swap order of next/previous arrows in editor search

GitOrigin-RevId: 2c402e177fcd679ebff8e96812faf09d493e9726
This commit is contained in:
David 2024-06-18 11:02:07 +01:00 committed by Copybot
parent aa480a2663
commit 7722c44414
2 changed files with 11 additions and 11 deletions

View file

@ -405,14 +405,6 @@ const CodeMirrorSearchForm: FC = () => {
<div className="ol-cm-search-form-group ol-cm-search-next-previous">
<ButtonGroup className="ol-cm-search-form-button-group">
<Button type="button" bsSize="small" onClick={() => findNext(view)}>
<Icon
type="chevron-down"
fw
accessibilityLabel={t('search_next')}
/>
</Button>
<Button
type="button"
bsSize="small"
@ -424,6 +416,14 @@ const CodeMirrorSearchForm: FC = () => {
accessibilityLabel={t('search_previous')}
/>
</Button>
<Button type="button" bsSize="small" onClick={() => findNext(view)}>
<Icon
type="chevron-down"
fw
accessibilityLabel={t('search_next')}
/>
</Button>
</ButtonGroup>
{position !== null && (

View file

@ -505,8 +505,8 @@ describe('<CodeMirrorEditor/>', { scrollBehavior: false }, function () {
cy.findByLabelText('Within selection').as('within-selection-label')
cy.findByRole('button', { name: 'Replace' }).as('replace')
cy.findByRole('button', { name: 'Replace All' }).as('replace-all')
cy.findByRole('button', { name: 'next' }).as('find-next')
cy.findByRole('button', { name: 'previous' }).as('find-previous')
cy.findByRole('button', { name: 'next' }).as('find-next')
cy.findByRole('button', { name: 'Close' }).as('close')
// Tab forwards...
@ -516,8 +516,8 @@ describe('<CodeMirrorEditor/>', { scrollBehavior: false }, function () {
cy.get('@regexp').should('be.focused').tab()
cy.get('@whole-word').should('be.focused').tab()
cy.get('@within-selection').should('be.focused').tab()
cy.get('@find-next').should('be.focused').tab()
cy.get('@find-previous').should('be.focused').tab()
cy.get('@find-next').should('be.focused').tab()
cy.get('@replace').should('be.focused').tab()
cy.get('@replace-all').should('be.focused').tab()
@ -525,8 +525,8 @@ describe('<CodeMirrorEditor/>', { scrollBehavior: false }, function () {
cy.get('@close').should('be.focused').tab({ shift: true })
cy.get('@replace-all').should('be.focused').tab({ shift: true })
cy.get('@replace').should('be.focused').tab({ shift: true })
cy.get('@find-previous').should('be.focused').tab({ shift: true })
cy.get('@find-next').should('be.focused').tab({ shift: true })
cy.get('@find-previous').should('be.focused').tab({ shift: true })
cy.get('@within-selection').should('be.focused').tab({ shift: true })
cy.get('@whole-word').should('be.focused').tab({ shift: true })
cy.get('@regexp').should('be.focused').tab({ shift: true })