uBlockOrigin / uMatrix-issues

This is the community-maintained issue tracker for uMatrix
https://github.com/gorhill/uMatrix
123 stars 17 forks source link

Keyboard navigation inside the popup #197

Open girst opened 5 years ago

girst commented 5 years ago

Prerequisites

Description

As a keyboard centric user, I would like to be able to select/whitelist/blacklist cells/rows/columns using the keyboard (preferably hjkl (vi-like) and cursor keys). I've hacked together a quick proof of concept; its source (.diff.txt) and a video (.zip) of it in action is attached. umatrix-keyboard.diff.txt demo.zip

I'm happy to put together a proper patch for this, if a) there's interest and b) if I can get some pointers about how to best move between cells (the current approach is a bit cumbersome).

A specific URL where the issue occurs

note: not applicable; feature request

Steps to Reproduce

  1. open the uMatrix popup
  2. highlight cells using the keyboard
  3. hit spacebar/return to toggle its state

Ruleset

note: not applicable; feature request

Supporting evidence

note: not applicable; feature request. however, see the attached patch and video

Your environment

gwarser commented 5 years ago

Blocked by https://github.com/uBlockOrigin/uMatrix-issues/issues/37 ?

uBlock-user commented 5 years ago

sounds like a duplicate of that one

gorhill commented 5 years ago

It's different. He wants keyboard-based navigation in the popup panel, while browser.commands is for issuing commands unrelated to the popup panel.

girst commented 5 years ago

On Fri, Nov 01, 2019 at 03:01:31PM -0700, Raymond Hill wrote:

It's different. He wants keyboard-based navigation in the popup panel

correct! #37 would be quite useful to have working too, but VimFx provides me with a key combo already (eb to select browser elements).

i'll re-state my intention to implement this myself, as long as there's a reasonable chance for it to get merged. I will need some pointers on how to best implement navigation between cells, though.

girst commented 5 years ago

@gorhill: I've implemented this now. I'm quite happy with how it turned out, but as I'm not really a JavaScript developer, a code review is probably not a bad idea ;-). The commit message contains my implementation notes.

I'm not allowed to open a pull request, but you can check out the feature branch at https://github.com/girst/uMatrix/tree/pr-keyboardnav

gorhill commented 5 years ago

I am not having much time for this right now, so for now just keep using your version -- I do not commit often to uMatrix anymore, so you shouldn't have to worry about your changes. Eventually I may get more time to go through this.

girst commented 5 years ago

On Sun, Nov 03, 2019 at 07:44:11AM -0800, Raymond Hill wrote:

I am not having much time for this right now, so for now just keep using your version -- I do not commit often to uMatrix anymore, so you shouldn't have to worry about your changes. Eventually I may get more time to go through this.

Thanks for the response. There's no rush! I'll keep forward-porting that as long as necessary, but I do hope this can eventually get merged (I'd prefer using the (properly signed) upstream version and of course not having to apply local patches).

girst commented 5 years ago

uMatrix-keyboardnav-xpi.zip

I've now implemented a checkbox in the settings where this mode is also documented. a (unsigned, renamed) firefox addon is attached, for those interested.

girst commented 4 years ago

@gorhill: seeing htat you pushed some commits the last few days, can you please consider pulling from https://github.com/girst/uMatrix/tree/pr-keyboardnav (i'm not allowed to open pull requests on the repo, as I'm not a "previous contributor")?

I've rebased the changes on top of yours and verified it working (note that the new feature is disabled by default and needs to be enabled in the dashboard -> "keyboard navigation" first).

thanks

elig0n commented 4 years ago

Will @girst patches be admitted? Does @girst maintain his patch up-to-date?

girst commented 4 years ago

On Sun, Apr 26, 2020 at 06:02:24AM -0700, Eliran Gonen wrote:

Will @girst patches be admitted?

I hope so, but I haven't heard anything from gorhill :(

Does @girst maintain his patch up-to-date?

I do. Just rebased on top of gorhill/master (applied automatically); thanks for the reminder. Please ping me if it requires rebasing in the future, too.