Skip to content

Show shortcut help screen when pressing ? #12283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 30, 2017
Merged

Show shortcut help screen when pressing ? #12283

merged 4 commits into from
Nov 30, 2017

Conversation

sgiehl
Copy link
Member

@sgiehl sgiehl commented Nov 19, 2017

fixes #5230

@sgiehl sgiehl added c: Design / UI For issues that impact Matomo's user interface or the design overall. Needs Review PRs that need a code review labels Nov 19, 2017
@tsteur
Copy link
Member

tsteur commented Nov 19, 2017

I reckon making this extensible for plugins will be a different issue right? Could otherwise maybe just post an event with an array like [z => {{ 'CoreHome_ShortcutZenMode'|translate }}] and keep the template a bit more stupid? Some plugins add further shortcuts on some pages (such as session recording)

@mattab
Copy link
Member

mattab commented Nov 19, 2017

Would be good to make the Help popup already extensible if possible.

Otherwise, nice new feature 👍

@sgiehl
Copy link
Member Author

sgiehl commented Nov 19, 2017

As such shortcuts will always be added in JavaScript I'll try to move some logic there...

@tsteur
Copy link
Member

tsteur commented Nov 19, 2017

👍

@sgiehl
Copy link
Member Author

sgiehl commented Nov 19, 2017

I've now implemented a new method piwikHelper.registerShortcut, which basically bypasses Mousetrap.bind, but additionally saves the keystroke and description for it, which will then be shown on the help screen...

CHANGELOG.md Outdated
@@ -25,6 +25,7 @@ The Product Changelog at **[piwik.org/changelog](https://piwik.org/changelog)**

### New Features
* New config.ini.php setting `show_update_notification_to_superusers_only` makes it possible to hide update notifications for all users except of superusers
* New JavaScript method `piwikHelper.registerShortcut` allows plugins to bind keyboard shortcuts. A summary for available shortcuts will be shown by pressing `?`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's move this mention into the 3.2.1 changelog section

@@ -174,7 +174,7 @@ protected static function cleanupHostAndHashTag($parsedUrl, $idSite = false)
}

if (!empty($parsedUrl['host'])) {
$parsedUrl['host'] = Common::mb_strtolower($parsedUrl['host'], 'UTF-8');
$parsedUrl['host'] = Common::mb_strtolower($parsedUrl['host']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is un-related and not for this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Unrelated. It removes an useless parameter as Common::mb_strtolower only takes one parameter

@mattab mattab added this to the 3.2.1 milestone Nov 20, 2017
@mattab
Copy link
Member

mattab commented Nov 20, 2017

LGTM. @tsteur could you maybe check & merge this one?

@sgiehl
Copy link
Member Author

sgiehl commented Nov 22, 2017

Rebased branch and resolved conflicts... @tsteur any additional change requests?

@mattab mattab merged commit af3a79c into 3.x-dev Nov 30, 2017
@mattab mattab deleted the shortcuthelp branch November 30, 2017 03:41
@matomo-org matomo-org deleted a comment from MatomoForumBot Dec 4, 2017
@mattab mattab added the Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. label Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Design / UI For issues that impact Matomo's user interface or the design overall. Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. Needs Review PRs that need a code review
Development

Successfully merging this pull request may close these issues.

Keyboard shortcuts for Piwik app
3 participants