Skip to content
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

Add option for "Time" (default "t") #30

Closed
afilp opened this issue Nov 16, 2017 · 27 comments
Closed

Add option for "Time" (default "t") #30

afilp opened this issue Nov 16, 2017 · 27 comments
Labels
enhancement fixed upstream The issue is fixed in the latest upstream code version, but not necessarily in all releases. seeking user feedback Need more feedback from users to make an informed decision on this issue

Comments

@afilp
Copy link

afilp commented Nov 16, 2017

Restricting search to time is something many users do (especially for news, etc.).

May I propose a quick shortcut?

  1. Add an option for "Time" (default "t")

  2. This opens this dialog (if possible)

image

  1. The focus should go there (this is important), so that with the TAB the user can navigate the options and press enter (or ESC to quit).
    Even better, we could have the proposed letter shortcuts (see screenshot) for fast selection of the time period.

What do you think?

@infokiller
Copy link
Owner

Thanks, that looks like a useful feature. Personally, I don't think I'll get to implementing it soon, but feel free to send a PR.

@mancze
Copy link
Collaborator

mancze commented Nov 16, 2017

I like the bare idea but for me the issue seems is too specific limiting its focus to only certain functionality and not interpreting the google search as a whole. One has to ask how frequently is this particular feature used by users? It is worth reserving such lucrative shortcut for this command? Wouldn't be fixing classical keyboard-based ui navigation good enough?

Personally I would rather see an general way how to navigate via/focus search tabs (all, videos, images, news, settings, tools,...) effectively. Then achieving described goal would be as easy as:

  1. Use shortcut to focus "Tools" tab.
  2. Press Enter (time input gets focused).
  3. Press Enter (time input gets expanded and focused).
  4. Pick your option using Tab key.

The first point needs to be implemented. The second and third comes out of the box. The fourth needs improvements.

ad 1:
Currently the left/right arrow is reserved for navigating to previous/next page. I don't use that. I traverse search results sequentially using up/down and when I hit the last of the search results next item to focus should be arrow pointing to the next page. Navigating to previous page is as simple as using browser's back button. No need for another shortcut for it.

ad 4:
Tab key works, but it would be handful having our shortcut to next/previous result (up/down arrows) mapped here. Also Escape key does not work here - it seems the Google ditched the support for keyboard users at all...

@afilp
Copy link
Author

afilp commented Nov 18, 2017

I like what @mancze proposes.

However, I tried to press enter while "Tools" is focused and the 1st selected result opened instead of it (expected, as "Enter" opens the 1st "selected" result).

@afilp
Copy link
Author

afilp commented Nov 18, 2017

I have a suggestion here (this uses shortcuts):

If the "sequences" plugin is used (https://github.com/cmawhorter/keymaster-sequences.js), then the "Time" use case can be handled easily:

key.sequence('t 2', function(evt, handler, sequence) {
  console.log('You pressed t then 2, so "Past 24 hours" will be selected inside this handler');
  // code to select the "Past 24 hours" here
});

OR, if we also want to handle the "All Results / Verbatim" case in the future (rare use case...), the sequence may include 3 keys: t t 2
(which means: "Tools -> Time -> 24 hours")

The "Time"-related subkeys could be as shown below:
image

@infokiller infokiller added seeking user feedback Need more feedback from users to make an informed decision on this issue enhancement labels Apr 27, 2018
@tkroll
Copy link
Contributor

tkroll commented Jun 9, 2018

This was added in recent update

@afilp
Copy link
Author

afilp commented Jun 11, 2018

@tkroll This is nice! CTRL-SHIFT-W closes the tab though, is this a proper shortcut?

@afilp
Copy link
Author

afilp commented Jun 11, 2018

Also, I cannot find the extension in Chrome Web Store anymore, how can we update it?

https://chrome.google.com/webstore/search/%22google%20search%20navigator%22?_category=extensions

@infokiller
Copy link
Owner

Waiting for a Google review, see #60

@tkroll
Copy link
Contributor

tkroll commented Jun 11, 2018

@afilp Oh crap. Mac user here. Can you get my some good Windows alternatives? I'll also add these to the Options menu.

@afilp
Copy link
Author

afilp commented Jun 15, 2018

@tkroll I am afraid that most of these shortcuts are used for something else in Windows, so I would not go for the "CTRL-SHIFT-..." combinations.

Maybe use a "gmail style sequence" by importing the mousetrap package?
https://github.com/ccampbell/mousetrap

So you could have:
"t a"
"t h"
"t d"
... etc.

Mousetrap also opens a door to many other interesting shortcuts in the future.

@tkroll
Copy link
Contributor

tkroll commented Jun 18, 2018

@afilp : Mousetrap look pretty cool. The new functions are now in Options screen.
@infokiller: Should I do a fork with Mousetrap to test?

@infokiller
Copy link
Owner

@tkroll yes that sounds good

@tkroll
Copy link
Contributor

tkroll commented Jun 19, 2018

Removed keymaster and added mousetrap (https://github.com/ccampbell/mousetrap).
Since mousetrap binds with an array of strings instead of a string, I changed the options to handle that. The options page still works the same way.

I used Gmail-style, double-keys for the search/time settings. See options screen.

Please take a look and comment:
https://github.com/tkroll/google-search-navigator/tree/search-tools

@tkroll
Copy link
Contributor

tkroll commented Jul 2, 2018

Any feedback?

@infokiller
Copy link
Owner

Just tried it, looks pretty good. I also took a quick look at the commit in your branch, a minor comment I have: please use the un-minified name of mousetrap. The minified version will be generated with the same name using yarn build --production (this is how it's currently done for keymaster as well).

Thanks!

@tkroll
Copy link
Contributor

tkroll commented Jul 10, 2018

@infokiller Noted and corrected. Update pushed.

@afilp
Copy link
Author

afilp commented Oct 2, 2018

@infokiller @tkroll Is this merged to master? I think not, based on that commit:

https://github.com/tkroll/google-search-navigator/commit/a64557a1994a4714a8e9b9a0da690b928112a576

Windows users (like me) need this, because Ctrl+Shift+w closes all browser tabs, etc.

@tkroll
Copy link
Contributor

tkroll commented Oct 2, 2018

Yeah, I did it wrong. Will have to redo from current master when I have time.

@afilp
Copy link
Author

afilp commented Oct 25, 2018

@tkroll May I help somehow? I think you are very close, what was the problem and was not merged/released? Thanks!

@tkroll
Copy link
Contributor

tkroll commented Oct 25, 2018

I wanted to wait until you moved to typescript actually. Also found a weird bug that it focuses on the next button and scrolls down. Do you see that behavior?

@infokiller
Copy link
Owner

@tkroll what version are you using?
This should have been fixed in the chrome web store version.

@tkroll
Copy link
Contributor

tkroll commented Oct 28, 2018

Realized it's my unmerged version. I'll handle it.

@afilp
Copy link
Author

afilp commented Dec 2, 2018

@tkroll Hi! Can your PR make it to the actual product? The current shortcuts are still unusable in Windows but yours are. Thanks!

Also, may I recommend that we also add "SHIFT-downarrow" and "SHIFT-uparrow" to navigate through the "More results from..." section?

image

@mancze

This comment has been minimized.

@afilp
Copy link
Author

afilp commented Jan 4, 2019

@tkroll Is there something else needed for the PR to make it to the actual product?

CTRL-SHIFT-W (which is for "week" on Mac) will simply close all tabs in Windows.

So, we really need your PR to be merged and publised. Thanks a lot!

@tkroll
Copy link
Contributor

tkroll commented Jan 16, 2019

@afilp I'm back. Sorry for the delay. I'll take a look.

@tkroll
Copy link
Contributor

tkroll commented Jan 23, 2019

@afilp @infokiller New PR ready to go.

@infokiller infokiller added waiting fixed upstream The issue is fixed in the latest upstream code version, but not necessarily in all releases. and removed fixed on master labels Jun 20, 2020
@infokiller infokiller removed the waiting label Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement fixed upstream The issue is fixed in the latest upstream code version, but not necessarily in all releases. seeking user feedback Need more feedback from users to make an informed decision on this issue
Projects
None yet
Development

No branches or pull requests

4 participants