This is an archive of the discontinued LLVM Phabricator instance.

[analyzer] Add keyboard j/k navigation to HTML reports
ClosedPublic

Authored by george.karpenkov on Dec 19 2017, 2:27 PM.

Details

Summary

Navigating inside very HTML report can be rather frustrating: clicking on arrows requires a lot of mouse navigation, and scrolls to the top of the corresponding note, which loses context.
This small patch adds keyboard navigation using j/k keys, which scrolls the desired element right into the middle of the screen.

Wrapping around, issues with only a single element, default navigation all work as expected.

Diff Detail

Repository
rC Clang

Event Timeline

george.karpenkov updated this revision to Diff 127603.
dcoughlin accepted this revision.Dec 20 2017, 8:26 PM

Comments inline.

LGTM.

lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
388

I don't think we should provide these instructions on every report. They will not be relevant to most users.

816

I guess this means you can't combine keyboard and mouse navigation (i.e., by clicking on the arrows)?

This revision is now accepted and ready to land.Dec 20 2017, 8:26 PM

Synchronize keyboard navigation with mouse navigation.

lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp
388

Right, but it's arguably very useful, how could the user possibly know of the shortcut?

816

Fixed in this version: now mouse and keyboard do the same thing.

This revision was automatically updated to reflect the committed changes.
This revision was automatically updated to reflect the committed changes.