Files: context menu on right-click in the empty area of the file list
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Feature
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- javascript, typescript
- Bereich
- frontend
Rechercherichtung
Start from apps/files/src/components/FileEntryMixin.ts and trace onRightClick to see how row and selection menus open, then find the container component that renders the file list. Add a contextmenu handler there that reuses the UploadPicker "New" menu when nothing is selected and actionsMenuStore.opened = 'global' for a multi-selection, and check where --mouse-pos-x/y are set and cleared on main.app-content. Done when empty list space, the footer and the empty-folder view open the right menu while rows, inputs and breadcrumbs keep native behaviour.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
[!TIP]
Help move this idea forward
- Use the 👍 reaction to show support for this feature.
- Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
- Subscribe to receive notifications about status changes and new comments.
Is your feature request related to a problem? Please describe.
In Files, right-clicking a file or folder row opens the Files actions menu. Right-clicking anywhere else in the file list opens the browser's native context menu instead. That includes the empty space below the rows, the summary footer and the empty-folder view. This also happens when items are selected, so there is no right-click way to reach the actions for the selection unless you hit one of the selected rows.
Users coming from desktop file managers (and other web drives) expect a context menu in the empty area. They reported it as missing.
Seen on Nextcloud 35 (list and grid view). The row handling is onRightClick in apps/files/src/components/FileEntryMixin.ts. Nothing handles contextmenu on the list container.
Describe the solution you'd like
A Files context menu, opened at the mouse, for right-clicks in the empty area of the file list:
- nothing selected: the "New" menu of the current folder (New folder, Upload files, templates, …), i.e. the UploadPicker menu, as long as the user can create in this folder
- items selected: the batch actions menu for the selection. Today this is what a right-click on a selected row opens when more than one item is selected (
actionsMenuStore.opened = 'global').
Rows, inputs, the breadcrumbs and a second right-click while the menu is open could keep the current behaviour (the native menu).
Describe alternatives you've considered
We currently ship a small script in a custom app that listens for contextmenu on the document. It opens the existing menus by clicking their toggles (.files-list__header-upload-button, [data-cy-files-list-selection-actions]) and moves the popover to the cursor. It works, but it depends on the DOM structure and will break with UI changes, so a native solution would be much better.
Additional context
Related: #41223 (right-click on breadcrumbs), #53342 (details of the current folder).
One detail we noticed while doing this: --mouse-pos-x/y set on main.app-content by onRightClick are only removed by the per-row openedMenu watcher. After a right-click on a multi-selected row (global menu), they stay set, and the next menu inside the app content opens at the old cursor position.
- Vorherrschende Sprache
- PHP
- Sterne
- 37.6k
- Forks
- 5.4k
- Ø Merge
- 1 T. 13 Std.
- Gemergte PRs (30 T.)
- 623
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus nextcloud/server
-
0. Needs triage 35-feedback bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
34-feedback
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: GET /js/../<anything> returns 500 (NotPermittedException from JsController::getJs) instead of 404Evtl. vergeben @lazerg hat das vor 7 Tagen übernommen. Offen35-feedback
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
[Bug]: Dashboard widgets registered via OCA.Dashboard.register() sometimes never mount (spinner forever) – Vue 3 non-deep `callbacks` watcher raceEvtl. vergeben @lazerg hat das vor 7 Tagen übernommen. Offen35-feedback
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in nextcloud/server
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
sonata-project/SonataAdminBundle#8426 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue help wanted
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 90/100
erkamyaman/rust-anything#942 ·
Maintainer antworten meist innerhalb von 1 Tag
-
CPU core labels missing for Low-Power E-cores on hybrid Intel CPUs (Arrow Lake-H) — get_intel_core_types() ignores /sys/devices/cpu_lowpowerEvtl. vergeben @dgongut hat das heute übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
Maintainer antworten meist innerhalb von 1 Tag