Skip to content

Commit 357f543

Browse files
committed
fixup! ✨(frontend) document visible in list are now openable via enter key
1 parent f7d516d commit 357f543

File tree

2 files changed

+2
-40
lines changed

2 files changed

+2
-40
lines changed

src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGridItem.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
2525
const { t } = useTranslation();
2626
const { isDesktop } = useResponsiveStore();
2727
const { flexLeft, flexRight } = useResponsiveDocGrid();
28-
const router = useRouter();
2928
const { spacingsTokens } = useCunninghamTheme();
3029
const shareModal = useModal();
3130
const isPublic = doc.link_reach === LinkReach.PUBLIC;
@@ -39,7 +38,7 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
3938
const handleKeyDown = (e: KeyboardEvent) => {
4039
if (e.key === 'Enter' || e.key === ' ') {
4140
e.preventDefault();
42-
void router.push(`/docs/${doc.id}`);
41+
(e.target as HTMLAnchorElement).click();
4342
}
4443
};
4544

@@ -62,7 +61,6 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
6261
}
6362
`}
6463
className="--docs--doc-grid-item"
65-
onKeyDown={handleKeyDown}
6664
aria-label={t('Open document: {{title}}', {
6765
title: doc.title || t('Untitled document'),
6866
})}
@@ -82,6 +80,7 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
8280
min-width: 0;
8381
`}
8482
href={`/docs/${doc.id}`}
83+
onKeyDown={handleKeyDown}
8584
>
8685
<Box
8786
data-testid={`docs-grid-name-${doc.id}`}

src/frontend/apps/impress/src/i18n/translations.json

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -350,11 +350,6 @@
350350
"Open Source": "Open Source",
351351
"Open the document options": "Öffnen Sie die Dokumentoptionen",
352352
"Open the header menu": "Öffne das Kopfzeilen-Menü",
353-
"Open document: {{title}}": "Dokument öffnen: {{title}}",
354-
"Main content": "Hauptinhalt",
355-
"Home content": "Startseiten-Inhalt",
356-
"Documents grid": "Dokumentenraster",
357-
"Drag and drop status": "Drag-and-Drop-Status",
358353
"Organize": "Organisieren",
359354
"Others are editing. Your network prevent changes.": "Ihre Änderung konnte nicht übernommen werden, da andere Benutzer diesen Bereich zurzeit bearbeiten.",
360355
"Owner": "Besitzer",
@@ -436,27 +431,6 @@
436431
},
437432
"en": {
438433
"translation": {
439-
"Back to homepage": "Back to Docs homepage",
440-
"Document title": "Document title",
441-
"Search docs": "Search docs",
442-
"More options": "More options",
443-
"Open document actions menu": "Open document actions menu",
444-
"Main content": "Main content",
445-
"Home content": "Home content",
446-
"Documents grid": "Documents grid",
447-
"Drag and drop status": "Drag and drop status",
448-
"Pinned documents": "Pinned documents",
449-
"Close the access request modal": "Close the access request modal",
450-
"Close the delete modal": "Close the delete modal",
451-
"Close the search modal": "Close the search modal",
452-
"Close the share modal": "Close the share modal",
453-
"Close the version history modal": "Close the version history modal",
454-
"Close the download modal": "Close the download modal",
455-
"Cancel the deletion": "Cancel the deletion",
456-
"Cancel the download": "Cancel the download",
457-
"Open actions menu for document: {{title}}": "Open actions menu for document: {{title}}",
458-
"Open document: {{title}}": "Open document: {{title}}",
459-
"Open the menu of actions for the document: {{title}}": "Open the menu of actions for the document: {{title}}",
460434
"Share with {{count}} users_one": "Share with {{count}} user",
461435
"Shared with {{count}} users_many": "Shared with {{count}} users",
462436
"Shared with {{count}} users_one": "Shared with {{count}} user",
@@ -569,11 +543,6 @@
569543
"Open Source": "Código abierto",
570544
"Open the document options": "Abrir las opciones del documento",
571545
"Open the header menu": "Abrir el menú de encabezado",
572-
"Open document: {{title}}": "Abrir documento: {{title}}",
573-
"Main content": "Contenido principal",
574-
"Home content": "Contenido de inicio",
575-
"Documents grid": "Lista de documentos",
576-
"Drag and drop status": "Estado de arrastrar y soltar",
577546
"Organize": "Organiza",
578547
"Owner": "Propietario",
579548
"PDF": "PDF",
@@ -799,7 +768,6 @@
799768
"Open invitation actions menu": "Menu des actions d'ouverture d'une invitation",
800769
"Open the document options": "Ouvrir les options du document",
801770
"Open the header menu": "Ouvrir le menu d'en-tête",
802-
"Open document: {{title}}": "Ouvrir le document : {{title}}",
803771
"Open the menu of actions for the document: {{title}}": "Ouvrir le menu des actions du document : {{title}}",
804772
"Organize": "Organiser",
805773
"Others are editing this document. Unfortunately your network blocks WebSockets, the technology enabling real-time co-editing.": "D'autres sont en train de modifier ce document. Malheureusement, votre réseau bloque les web sockets, la technologie permettant la coédition en temps réel.",
@@ -1140,11 +1108,6 @@
11401108
"Open Source": "Open Source",
11411109
"Open the document options": "Open document opties",
11421110
"Open the header menu": "Open het hoofdmenu",
1143-
"Open document: {{title}}": "Document openen: {{title}}",
1144-
"Main content": "Hoofdinhoud",
1145-
"Home content": "Startpagina-inhoud",
1146-
"Documents grid": "Documentenraster",
1147-
"Drag and drop status": "Slepen en neerzetten status",
11481111
"Organize": "Organiseer",
11491112
"Owner": "Eigenaar",
11501113
"PDF": "PDF",

0 commit comments

Comments
 (0)