cheshire137 / gh-notifications-snoozer

Lists and filters and snoozing pull requests, oh my! This is an app for managing your notifications on GitHub by way of filtering issues and pull requests that are of interest to you.
MIT License
15 stars 10 forks source link

Add menu with options for selected tasks #101

Open cheshire137 opened 7 years ago

cheshire137 commented 7 years ago

When I have one or more tasks selected and thus the archive/ignore/snooze buttons are enabled, it would be nice to see those same options repeated in a menu, perhaps a Task menu. Likewise when I'm viewing the hidden tasks list, it would be good to have a Restore option in a Task menu. These menu options would do the same thing as clicking the button.

You might knock #50 out at the same time by setting an accelerator for each menu option.

src/models/AppMenu.js is where the menu options should be added.

src/components/App/App.jsx is where the archive/ignore/snooze/restore events should be listened for.

The menu options should be grayed out when no tasks are selected, or when the action is not applicable to the selected task(s). For example, 'Restore' should be grayed out when a visible task is selected, and 'Archive' should be grayed out when a hidden task is selected. New functions like setIsAuthenticated can be added to AppMenu.js for enabling/disabling each new menu item. These can be called in App.jsx as the selected tasks change. TaskList and HiddenTaskList may need to be given new handlers for notifying App when the selected tasks change, e.g., onSelectionChange.