- From: Christian Liebel <notifications@github.com>
- Date: Thu, 16 Jul 2020 10:37:03 -0700
- To: w3c/manifest <manifest@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/manifest/issues/922/659563134@github.com>
> macOS send to have multiple collections, but I'm still looking for the documentation. Yes, macOS does (sort of). The menus are called [Dock Menus](https://developer.apple.com/design/human-interface-guidelines/macos/menus/dock-menus/). A Dock Menu essentially is an [NSMenu](https://developer.apple.com/documentation/appkit/nsmenu) that can take different [NSMenuItem](https://developer.apple.com/documentation/appkit/nsmenuitem)s. Those again can either be a regular item or a [separator](https://developer.apple.com/documentation/appkit/nsmenuitem/1514838-separator). With the help of separators, you could build different categories:  User agents could even choose to show the category title:  ```swift func applicationDockMenu(_ sender: NSApplication) -> NSMenu? { let dockMenu = NSMenu() dockMenu.autoenablesItems = false dockMenu.addItem(withTitle: "Timeline", action: #selector(action), keyEquivalent: "T") dockMenu.addItem(NSMenuItem.separator()) // Uncomment for category title // dockMenu.addItem(withTitle: "Conversations", action: #selector(action), keyEquivalent: "C").isEnabled = false dockMenu.addItem(withTitle: "Mentions", action: #selector(action), keyEquivalent: "M") dockMenu.addItem(withTitle: "Direct Messages", action: #selector(action), keyEquivalent: "D") return dockMenu } ``` Generally, I think this feature is super important and developers would like to have it, so I strongly support it! However, I’m not sure if simply adding the `category` property is sufficient: - How are the categories sorted? By the appearance of the first categorized item in the array? Or would the items have to appear consecutively? What if they don't? - Can I have more than one category with the same name? (e.g., in macOS, you could have different “unnamed” categories) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/w3c/manifest/issues/922#issuecomment-659563134
Received on Thursday, 16 July 2020 17:37:16 UTC