Skip to content

Commit f9c08cf

Browse files
committed
Revert "✨(frontend) add document visible in list and openable via enter key"
This reverts commit b619850.
1 parent 2155c2f commit f9c08cf

File tree

2 files changed

+0
-18
lines changed

2 files changed

+0
-18
lines changed

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Tooltip, useModal } from '@openfun/cunningham-react';
22
import { DateTime } from 'luxon';
3-
import { useRouter } from 'next/router';
43
import { useTranslation } from 'react-i18next';
54
import { css } from 'styled-components';
65

@@ -22,7 +21,6 @@ type DocsGridItemProps = {
2221

2322
export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
2423
const { t } = useTranslation();
25-
const router = useRouter();
2624
const { isDesktop } = useResponsiveStore();
2725
const { flexLeft, flexRight } = useResponsiveDocGrid();
2826
const { spacingsTokens } = useCunninghamTheme();
@@ -35,13 +33,6 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
3533
shareModal.open();
3634
};
3735

38-
const handleKeyDown = (e: React.KeyboardEvent) => {
39-
if (e.key === 'Enter' || e.key === ' ') {
40-
e.preventDefault();
41-
void router.push(`/docs/${doc.id}`);
42-
}
43-
};
44-
4536
return (
4637
<>
4738
<Box
@@ -61,10 +52,6 @@ export const DocsGridItem = ({ doc, dragMode = false }: DocsGridItemProps) => {
6152
}
6253
`}
6354
className="--docs--doc-grid-item"
64-
onKeyDown={handleKeyDown}
65-
aria-label={t('Open document: {{title}}', {
66-
title: doc.title || t('Untitled document'),
67-
})}
6855
>
6956
<Box
7057
$flex={flexLeft}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,6 @@
372372
"Open the document options": "Öffnen Sie die Dokumentoptionen",
373373
"Open the header menu": "Öffne das Kopfzeilen-Menü",
374374
"Open document actions menu": "Dokumentaktionsmenü öffnen",
375-
"Open document: {{title}}": "Dokument öffnen: {{title}}",
376375
"Main content": "Hauptinhalt",
377376
"Home content": "Startseiten-Inhalt",
378377
"Documents grid": "Dokumentenraster",
@@ -479,7 +478,6 @@
479478
"Cancel the deletion": "Cancel the deletion",
480479
"Cancel the download": "Cancel the download",
481480
"Open actions menu for document: {{title}}": "Open actions menu for document: {{title}}",
482-
"Open document: {{title}}": "Open document: {{title}}",
483481
"Open the menu of actions for the document: {{title}}": "Open the menu of actions for the document: {{title}}",
484482
"Share with {{count}} users_one": "Share with {{count}} user",
485483
"Shared with {{count}} users_many": "Shared with {{count}} users",
@@ -609,7 +607,6 @@
609607
"Open the document options": "Abrir las opciones del documento",
610608
"Open the header menu": "Abrir el menú de encabezado",
611609
"Open document actions menu": "Abrir menú de acciones del documento",
612-
"Open document: {{title}}": "Abrir documento: {{title}}",
613610
"Main content": "Contenido principal",
614611
"Home content": "Contenido de inicio",
615612
"Documents grid": "Lista de documentos",
@@ -842,7 +839,6 @@
842839
"Open the document options": "Ouvrir les options du document",
843840
"Open the header menu": "Ouvrir le menu d'en-tête",
844841
"Open document actions menu": "Ouvrir le menu d'actions du document",
845-
"Open document: {{title}}": "Ouvrir le document : {{title}}",
846842
"Open the menu of actions for the document: {{title}}": "Ouvrir le menu des actions du document : {{title}}",
847843
"Main content": "Contenu principal",
848844
"Home content": "Contenu d'accueil",
@@ -1208,7 +1204,6 @@
12081204
"Open the document options": "Open document opties",
12091205
"Open the header menu": "Open het hoofdmenu",
12101206
"Open document actions menu": "Open documentactiemenu",
1211-
"Open document: {{title}}": "Document openen: {{title}}",
12121207
"Main content": "Hoofdinhoud",
12131208
"Home content": "Startpagina-inhoud",
12141209
"Documents grid": "Documentenraster",

0 commit comments

Comments
 (0)