Files: context menu on right-click in the empty area of the file list
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript, typescript
- 領域
- frontend
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
[!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.
- 主要言語
- PHP
- スター
- 37.6k
- フォーク
- 5.4k
- 平均マージ
- 1日 13時間
- マージ済み PR(30日)
- 623
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
nextcloud/server のほかの issue
-
0. Needs triage 35-feedback bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
34-feedback
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: GET /js/../<anything> returns 500 (NotPermittedException from JsController::getJs) instead of 404対応中かも @lazerg が 7 日前に担当しました。 オープン35-feedback
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
[Bug]: Dashboard widgets registered via OCA.Dashboard.register() sometimes never mount (spinner forever) – Vue 3 non-deep `callbacks` watcher race対応中かも @lazerg が 7 日前に担当しました。 オープン35-feedback
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
nextcloud/server の issue をすべて見る
似ている issue
-
area: tests area: user refactoring
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
nplhse/collaborative-ivena-statistics#1845 ·
メンテナーはふだん 1 日以内に返信
-
[Sync EN] filesystem: document the ValueError of fgets(), file_get_contents(), and touch() (#6167)オープンsync-en
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
sync-en
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
メンテナーはふだん 2 日以内に返信
-
Перевод устарел
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
メンテナーはふだん 1 日以内に返信
-
Documentation Feature: Events / Calendar
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信