tridactyl icon indicating copy to clipboard operation
tridactyl copied to clipboard

Hints do not work in gerrit code review dialogs

Open stagnation opened this issue 5 months ago • 5 comments

  • Brief description of the problem:

The gerrit code review main UI does not work with hints :hints. Though other keyboard navigation keys work.

  • Steps to reproduce:

Try to open hints here: https://gerrit-review.googlesource.com/q/status:open+-is:wip Or a permanent link: https://gerrit-review.googlesource.com/c/gitiles/+/246495 The latter has a larger viewport so I can scroll that, the former is small and have little interaction opportunities.

This UI does work: https://gerrit.googlesource.com/aws-gerrit

set logging.hinting debug

Reporting(2024-09-09T08:09:28.614Z): Focus changed: {"isVisible":true,"hasFocus":true} gr-app.js:33041:321
Reporting(2024-09-09T08:09:30.059Z): user-active: {"events":["mousemove","pointerdown","keydown"]} gr-app.js:33041:321
Reporting(2024-09-09T08:09:30.532Z): Focus changed: {"isVisible":true,"hasFocus":false} gr-app.js:33041:321
Reporting(2024-09-09T08:09:36.618Z): Focus changed: {"isVisible":true,"hasFocus":true} gr-app.js:33041:321
Reporting(2024-09-09T08:09:40.191Z): user-active: {"events":["keydown","pointerdown","mousemove"]} gr-app.js:33041:321
Reporting(2024-09-09T08:09:45.648Z): Focus changed: {"isVisible":true,"hasFocus":false} gr-app.js:33041:321
Reporting(2024-09-09T08:09:45.985Z): Visibility changed to hidden: {"hiddenDurationMs":391276,"isVisible":false,"hasFocus":false} gr-app.js:33041:321
Reporting(2024-09-09T08:09:50.500Z): user-active: {"events":["mousemove"]} gr-app.js:33041:321
Reporting(2024-09-09T08:09:51.586Z): Focus changed: {"isVisible":false,"hasFocus":true} gr-app.js:33041:321
Reporting(2024-09-09T08:09:51.587Z): Visibility changed to visible: {"hiddenDurationMs":396877,"isVisible":true,"hasFocus":true} gr-app.js:33041:321
Reporting(2024-09-09T08:09:53.958Z): Focus changed: {"isVisible":true,"hasFocus":false} gr-app.js:33041:321
Reporting(2024-09-09T08:09:56.633Z): Focus changed: {"isVisible":true,"hasFocus":true} gr-app.js:33041:321
Reporting(2024-09-09T08:10:00.500Z): user-active: {"events":["mousemove","pointerdown","keydown"]} gr-app.js:33041:321
Reporting(2024-09-09T08:10:05.440Z): Focus changed: {"isVisible":true,"hasFocus":false}

Almost nothing. Pressed both f and called :hint.

  • Tridactyl version (:version): 1.24.1pre7027-eb1141b8

  • Firefox version (Top right menu > Help > About Firefox): 130.00 (64bit)

  • URL of the website the bug happens on: (See steps to reproduce section) https://gerrit-review.googlesource.com/q/status:open+-is:wip

  • Config (in a new tab, run :viewconfig --user, copy the url and paste it somewhere like gist.github.com): https://gist.github.com/stagnation/39d988f3d8cb28c4649de72e0d3d3146

  • Contents of ~/.tridactylrc or ~/.config/tridactyl/tridactylrc (if they exist):

set hintchars hklasdfgyuopwertnmzxcvb

set editorcmd alacritty --class FloatingTerminal -e vim
# set editorcmd urxvt -name FloatingTerminal -e vim -c ':color lakris256 | :set nonumber laststatus=0'

# Open in new-tab (replaces some view-source toggle I don't use)
bind gf hint -t

bind yd tabduplicate
bind \ss source /home/spill/.config/tridactyl/tridactylrc

# Yank the window title
bind yt composite js document.title + '\n' + document.location.href | yank

bind yf hint -y

# Yank anchor URL `;#`
bind ya hint -#

# Yank paragraph
bind yp composite hint -pipe * textContent | yank

## find mode
bind / fillcmdline find
bind n findnext 1
bind N findnext -1
bind ,<Space> nohlsearch

set followpagepatterns.next ^(next|newer)\\b|»|>>|more|→
set followpagepatterns.prev ^(prev(ious)?|older)\\b|«|<<|←

# split tab to a new window (d) and duplicate (D)
bind gd tabdetach
bind gD composite tabduplicate; tabdetach

set smoothscroll true

# # slack
# Actions for messages
# NB: Yoinked from github issues. Seem to be helpful, but not entirely correct.
# I supposed that slack has changed how they do things since these were written.
bindurl .*.slack.com ;m composite hint -Jc div[class=c-message_kit__gutter]; hint -Jc button[data-qa=more_message_actions]; hint -Jc button[data-focus-key=message_actions],[role=menuitem]
# Edit message
bindurl .*.slack.com ;e composite hint -Jc div[class=c-message_kit__gutter]; hint -Jc button[data-qa=more_message_actions]; hint -Jc button[data-qa=edit_message]
# copy message
bindurl .*.slack.com --mode=normal v composite hint -pipe div[data-qa=message-text] | js -p navigator.clipboard.writeText(JS_ARG.innerText)
# fewer anchors for f
bindurl .*.slack.com --mode=normal f hint -Jc div[data-sidebar-link-id]:not([data-sidebar-link-id=""]),div[data-section-channel-index]:not([data-section-channel-index=""]),button,a

stagnation avatar Sep 09 '24 08:09 stagnation