Giter Site home page Giter Site logo

david-tejada / rango Goto Github PK

View Code? Open in Web Editor NEW
126.0 3.0 15.0 5.25 MB

🦎 The cross browser extension that helps you control your browser by voice. It blends in!

License: MIT License

TypeScript 80.11% CSS 2.84% Swift 1.16% HTML 15.50% JavaScript 0.35% Python 0.04%

rango's Issues

Settings ui extension side

Needing a voice command for every setting is inconvenient and even more so the more settings that are added

Add ability to copy links to clipboard

This would be a really great addition and is pretty much one of the last main features I used from Vimium.

It would be nice to have a subtle signal/notification, maybe by the alphabet characters you just used, that the action was successful. Kinda like this but aligned with the size and style of rango.

image

Timing issues with updating tab title

I am not sure what could be going on here but when I visit this website: https://registry.terraform.io/providers/hashicorp/aws/latest/docs

The title ends up being - https://registry.terraform.io/providers/hashicorp/aws/latest/docs

Which smells like a race condition with updating the window title, maybe some client side code by the website VS rango.

In a different browser I can see how the tab does have an original title, which is then updated after some time presumably by some client side code.

It starts out as:

  • Terraform Registry
    and then is updated to
  • Docs overview | hashicorp/aws | Terraform Registry

But in Firefox with rango it just ends up being: - https://registry.terraform.io/providers/hashicorp/aws/latest/docs

Missing hints from iframe

I have only just seen this now and haven't dug into how when it is happening, highlighted blue area does not have hints and it is an iframe.
image

Open multiple links in new tabs in one utterance which don't steal focus

Related to #24 but it seems like a large enough issue to have tracked separately.

Once we can open links which don't take the focus of the window it would be cool to be able to open N number of links in one Talon utterance.

With rango direct clicking enabled, and hints a,b,c,d present on the page.

Saying *stash air and bat and cat would open the three links identified by those hints in new tabs but the original tab remains the focussed one.

*stash to be replaced with whatever the outcome of #24 is.

Better support for video players

Youtube for example. Not all controls are clickable and it would be nice if we could figure out a better way to do scrubbing the timeline.

Hints look a little jittery/twitchy since 0.2.0

In the process of debugging #28 I checked out version v0.1.9 at 57f216a. In unrelated to that issue I did notice that the v0.2.0 version does result in the hints being a little more jittery than version version v0.1.9 when scrolling.

I used this page for testing: https://en.wikipedia.org/wiki/Main_Page

I had noticed this when v0.2.0 was released but didn't bring it up, going back to the older version it is pretty clear though.

I am unsure how the rendering/positioning/throttling code has changed between versions and this may be a conscious decision compromising between smoothness and performance. But thought I would bring this us up if not.

Here is a quick screen recording showing how it looks for me: https://www.youtube.com/watch?v=AEfzh33mrjY

Ability to define whether or not links opened in new tabs become focussed

I think this means being able to set the selected value https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/create when creating the tab here

await browser.tabs.create({
as it defaults to true.

I am unsure what to suggest for the Talon command, and whether or not it should share the existing blank ... command with an extra qualifier or if it should get a new one. I think I'm leaning towards a new word, some for consideration:

stash air
load air
set air
store air
pack air

Trying to think of words which invoke imagery of stashing something away for later use as is common with opening links in new tabs

Direct clicking when focussed on input field inputs `Å` - doesn't click requested element

Having seen the recent change where you demonstrated clicking a link while focussed on an input field I tried it out. Though when I do, it doesn't quite work, when focussed on an input and saying the letter for a hint the request is sent to rango, the letter Å is typed into the input field, and then Talon reports a timeout waiting for response.

I'm on macos 12.3.1, using up-to-date Firefox.

Ability to hide rango hints per tab

#20 means that I frequently have to hide/show rango hints when jumping around tabs as I spend a lot of time in Confluence and Jira where this is a problem. It would be great if I could toggle the hints per tab to not have to deal with that.

Also a sidenote, I find when I toggle the rango hints it seems to cause some significant work for my browser and it lags for a bit. I wonder if this is due to having multiple tabs open and rango having to do a lot of work to show all the hints after them being toggled off? Being able to toggle per tab would also help with that.

Implement missing vimium features

I would like to completely replace vimium with rango, but there is some features I still use that are vimium explicit.

  • scrollPageDown
  • scrollPageUp
  • scrollUp
  • scrollDown
  • scrollLeft
  • scrollRight
  • visitPreviousTab
  • moveTabToNewWindow
  • go home: "gU". Go to root of current URL hierarchy
  • link next: "]]". Follow the link labeled next or >
  • go input: "gi". Focus the first text input on the page

Links which copy things to clipboard don't always work due to lack of user activation

I found this random page you can see the issue from https://github.github.io/clipboard-copy-element/examples/

  1. have something in your clipboard - abc for example
  2. find a button/link which adds something to your clipboard - eg. xyz
  3. click the button/link with rango
  4. paste clipboard contents to see what is in it.

Result will be abc, when the desired contents is xyz.

When rango receives a request and performs its action, before it writes the response message it could inspect the clipboard again and if it isn't still the original request then send the current contents back to talon in the response object hopefully allowing Talon to set this as clipboard contents and not the original content before the action.

Copy arbitrary text from webpage

This has been mentioned a few times in Slack I think but thought it wise to get an issue open for discussion and ideas!!

Usecase

Being able to fluently copy portions of a webpage to the clipboard.

Possible Issues

  1. Given the problems described in #18 do you know if there will be issues copying portions of the webpage to the clipboard?
  2. Performance, marking up even more of the page could be quite the performance hit.
  3. How to know what characters/words/tokens are visible in the viewport - this seems difficult to do performatively, or at all.

Ideas

Here are some ideas about how to reference areas of a webpage:

  • Cusorless is the obvious example here. This does seem like a significant amount of work though and in the interest of thinking of other interactions lets continue...
  • Referencing words in the current viewport literally, for text The quick brown fox jumps over the lazy dog, take quick past fox to select/copy quick brown fox
  • Copying/selecting lines of text - each line could be marked up with number/letter/color hints
  • Use containing elements like div or other HTML elements (see image below where I added an outline to all div elements)
  • Leveraging the existing vscode draft capability, where you could copy a chunk and then refine more in vscode

Inspiration

A list of some other tools for inspiration:

UX

Perhaps there should be two commands:

  1. Selecting text only - possibly allowing for further refinement
  2. Copy the requested text to clipboard directly.

Given most of the time spent using a web browser would be reading and navigating it seems that any mode that would allow you to copy text would be something that you had to switch into to allow for more markup on the page and actions to become available. Though this would impact the fluency aspect.


image

Support iframes

Currently we don't have support for iframes. They are complicated. Vimium has support for them so they has to be a way to solve this issue

Not able to click element in google mail - other UI elements aren't markedup with hint

I haven't noticed this anywhere else yet but I have problems selecting the checkbox in the top left of google mail to select all unread mail. Saying the letter hint performs the animation of the hint but the checkbox is not selected. This does work with Vimium but I haven't looked at what could be the difference yet.

image
image

Another thing I saw was that in the google mail UI some clickable elements with Vimium aren't marked up with hints in rango

Rango:
image

Vimium:
image

Response schema does not always include action type - Talon errors in logs

This line expects a certain response schema that rango isn't consistently using for all action types: https://github.com/david-tejada/rango-talon/blob/adc4905d84538a5544b90fba25548b0f0634af31/browser.py#L67

This results in the Talon logs having errors:

2022-05-01 10:44:51    IO {'type': 'response'}
2022-05-01 10:44:51 ERROR     7: talon/scripting/talon_script.py:592| 
    6: talon/scripting/talon_script.py:297| 
    5: talon/scripting/talon_script.py:559| 
    4:      talon/scripting/actions.py:85 | 
    3:        talon/scripting/types.py:411| 
    2:     user/rango-talon/browser.py:115| execute_command(command)
    1:     user/rango-talon/browser.py:69 | if response["action"]["type"] == "copyLink":
KeyError: 'action'

[The below error was raised while handling the above exception(s)]
2022-05-01 10:44:51 ERROR cb error topic="phrase" cb=<bound method SpeechSystem.engine_event of <talon.scripting.speech_system.SpeechSystem object at 0x110d91c20>>
   30:       lib/python3.9/threading.py:930* # cron thread
   29:       lib/python3.9/threading.py:973* 
   28:       lib/python3.9/threading.py:910* 
   27:                    talon/cron.py:155| 
   26:                    talon/cron.py:106| 
   25:                     talon/vad.py:21 | 
   24: talon/scripting/speech_system.py:355| 
   23:             talon/engines/w2l.py:706| 
   22:      talon/scripting/dispatch.py:105| 
   21:      talon/scripting/dispatch.py:144| 
   20:      talon/scripting/dispatch.py:133| 
   19:          talon/scripting/rctx.py:233| # 'phrase' main:_redispatch()
   18: talon/scripting/speech_system.py:62 | 
   17:      talon/scripting/dispatch.py:105| 
   16:      talon/scripting/dispatch.py:144| 
   15:      talon/scripting/dispatch.py:133| 
   14: ------------------------------------# cron thread
   13:          talon/scripting/rctx.py:233| # 'phrase' main:engine_event()
   12: talon/scripting/speech_system.py:407| 
   11:       talon/scripting/actions.py:85 | 
   10:         talon/scripting/types.py:411| 
    9:     talon/scripting/core/core.py:100| 
    8:       talon/scripting/actions.py:85 | 
    7:         talon/scripting/types.py:411| 
    6:     talon/scripting/core/core.py:129| 
    5:       talon/scripting/actions.py:85 | 
    4:         talon/scripting/types.py:411| 
    3:     talon/scripting/core/core.py:134| 
    2:  talon/scripting/talon_script.py:693| 
    1:  talon/scripting/talon_script.py:596| 
talon.scripting.talon_script.TalonScriptError: 
 in script at /Users/rickymcmillen/.talon/user/rango-talon/direct_clicking.talon:4:
 > user.browser_click_hint("{letter_1}{letter_2 or ''}", 0)
KeyError: 'action'
2

Could probably work around this in the Talon browser.py but I figured it would be better get rango to use a consistent response schema so logging it here.

Thanks again for your contributions!!

Move to multiple hints container inside the first positioned ancestor so that hints always stay with their element

Related to #38.

I have been giving some thought to this and I think it's possible to have hints always be next to the element they're hinting. Instead of having just one hints container every hint would be inside a hints container within the first positioned ancestor (position other than "static"). This would require a considerate rework of the way hints are place in the page but I think it's worth it. The advantages are:

  • Hints don't jump around when scrolling.
  • No need to calculate if the element is obscured as the hint would be in the same stacking context.
  • Hints wouldn't appear over other elements as in #10.
  • Hints would display even if there is an invisible overlay in the page.
  • Performance gain as there is no need to recalculate position with every scroll/intersection.

Position hints would work something like this:

  1. Find the first positioned ancestor of the element. Store this element in intersector for future need.
  2. Store the dimensions of this element to reposition hints in case the element resizes.
  3. Find out if there is a hints container within that element and if not create it and place the hint inside. The hint will be position absolute and top and left can be calculated using getBoundingClientRect on the container and the element hinted.
  4. On scroll check for new fixed or sticky elements added with javascript and reposition the hints of elements within.
  5. On scroll/intersection/input event check if the containers have been resized and in that case reposition hints.

Add scrolling

  • A command for scrolling an specific element: We will need to find the closest ancestor with overflow.
  • Add commands for scrolling an element to a certain position (top, center , bottom)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.