angular / angular/components

feat(mat-menu): Open nested menus should be delayed on hover.

オープン
#25,888 コメント 3 件 リアクション 7 件 担当者 0 名 GitHub で見る
area: material/menu feature P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### Feature Description

An option to delay the menu of nested items would be great.
This prevents the menus from blinking/flashing when you just hover/move the mouse quickly to another wanted item.

Solution: Add delay before opening the nested menu. Only a few milliseconds to prevent flashing menus when you just move the mouse around. The user can still click on a nested item to trigger the menu instantly. This will improve the UX. It's really annoying if the menus are flashing.

You can test my suggested behavior in other proven menus like in Windows 10. Just open a folder and open the context menu. You'll see that the nested menus don't open immediately. They are delayed. Same behavior in VSCode. A shorter delay than the Windows menus, but they are delayed. And I think we should implement this for the mat-menus too.

|mat-menu| vs-code |
|---|---|
| ![mat-menu](https://user-images.githubusercontent.com/60390085/198579985-20aba53a-ee97-4d20-a748-fb9cae75a78d.gif) | ![vscode-menu](https://user-images.githubusercontent.com/60390085/198579999-db1003dd-746a-4ede-8e08-cbd6a85ad38d.gif) |

https://material.angular.io/components/menu/examples

Summary:
- Delay nested menu on hover.
- Open nested menu instantly on click.
- Delay nested menu before close (hover leave).
- Implement it with fixed delay time or as an option property with default value (the time in ms. Not just boolean).

Btw: Another related issue which is about delay before closing: #24476
We could combine both issues to add delay before and after.

I think this issue is more a bug than a feature. An unwanted behavior / bad UX. But anyway, it's no candidate for votes. It something what should be considered by the Angular team.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

mat-menu の実装と、関連する閉じる際の遅延に関する issue #24476 から始め、要求された動作をリンク先の Material メニューの例と比較します。ネストされたメニューが短いホバー遅延の後に開き、クリック時には即座に開き、閉じる前に遅延があり、固定または設定可能なデフォルト遅延が公開されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。