mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 23:53:05 +00:00
chore: format
This commit is contained in:
parent
57b1790e12
commit
9f19fb2f88
3 changed files with 6 additions and 11 deletions
|
|
@ -24,6 +24,7 @@ flowchart TD
|
|||
```
|
||||
|
||||
**Opções consideradas:**
|
||||
|
||||
- **A:** Só esconder chevron mas manter estado open — rejeitada (viola aceite).
|
||||
- **B:** Mover sub-lista para fora do `SidebarMenuItem` de Municípios — rejeitada (quebra semântica de filho; mais churn).
|
||||
- **C (recomendada):** Remover disclosure no componente existente; apagar API de open; apertar `mt`/`py` no `SidebarMenuSub` localmente.
|
||||
|
|
|
|||
|
|
@ -50,9 +50,9 @@ export const MunicipalityNavSavedFilters = ({ onNavigate }: { onNavigate: () =>
|
|||
const menuItem = row?.closest('[data-sidebar="menu-item"]')
|
||||
const successor =
|
||||
savedFilters.length > 1
|
||||
? (row?.nextElementSibling ?? row?.previousElementSibling)?.querySelector<HTMLElement>(
|
||||
? ((row?.nextElementSibling ?? row?.previousElementSibling)?.querySelector<HTMLElement>(
|
||||
'[data-sidebar="menu-sub-button"]',
|
||||
) ?? menuItem?.querySelector<HTMLElement>('a')
|
||||
) ?? menuItem?.querySelector<HTMLElement>('a'))
|
||||
: menuItem?.querySelector<HTMLElement>('a')
|
||||
|
||||
removeMunicipalitySavedFilter(entry.href)
|
||||
|
|
@ -91,9 +91,7 @@ export const MunicipalityNavSavedFilters = ({ onNavigate }: { onNavigate: () =>
|
|||
</SidebarMenuSubButton>
|
||||
<SidebarMenuAction
|
||||
type="button"
|
||||
onClick={(event) =>
|
||||
handleRemove(entry, event.currentTarget.closest('li'))
|
||||
}
|
||||
onClick={(event) => handleRemove(entry, event.currentTarget.closest('li'))}
|
||||
aria-label={`Apagar o filtro salvo ${entry.name}`}
|
||||
className="top-1 group-focus-within/menu-sub-item:opacity-100 group-hover/menu-sub-item:opacity-100 md:opacity-0"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -111,11 +111,7 @@ test.describe('Filtros salvos de Municípios', () => {
|
|||
|
||||
await page.reload()
|
||||
await expect(shortcut).toBeVisible(NAVIGATION)
|
||||
await expect(
|
||||
page.getByRole('list', { name: 'Filtros salvos de Municípios' }),
|
||||
).toBeVisible()
|
||||
await expect(
|
||||
page.getByRole('button', { name: /filtros salvos de Municípios/i }),
|
||||
).toHaveCount(0)
|
||||
await expect(page.getByRole('list', { name: 'Filtros salvos de Municípios' })).toBeVisible()
|
||||
await expect(page.getByRole('button', { name: /filtros salvos de Municípios/i })).toHaveCount(0)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in a new issue