Restrict urlbar action override behavior to the same key canonization uses
Categories
(Firefox :: Address Bar, enhancement, P3)
Tracking
()
People
(Reporter: aminomancer, Unassigned)
References
(Depends on 1 open bug)
Details
Currently, switch-to-tab results only afford the user 2 actions: 1) switch to the tab; 2) open the tab's URL in the current tab.
Most other results permit the user to open the result in a new window, a new selected tab, and a new background tab. Because the action override feature is tied to every keyboard modifier, there's currently no way to activate these shortcuts for switch-to-tab results.
However, the action override feature is really great because it provides visual indication that the modifier does something, and it's pretty clear what that something is because it makes the result look much like a normal history result.
So, I'm proposing that we make switch-to-tab and regular search results function in the same way. If you see bug 1753878, I suggested there that we change the keyboard modifier for search string canonization. If we make that keyboard modifier the same as the action override key, we can get a really clean, contextual behavior. The user can then interpret the Alt key as a "contextual modifier" key that overrides the default behavior with some alternate, context-dependent behavior (this makes sense to me because "Alt" usually implies "alternate behavior").
Canonization is functionally very similar to the switch-to-tab action override behavior. Both behaviors override the main action of the result in favor of a secondary/alternative action that results in directly opening a URL instead of doing something more subtle. They're not the same behavior obviously, but semantically they are related. So the visual treatment for switch-to-tab action override could be equally applied to canonization.
Instead of making canonization a somewhat hidden feature, we can make it an "action override" modifier that changes the visual appearance of applicable results. When the modifier is pressed, instead of merely showing searchString — Search with Google we can display https://www.searchstring.com — Visit (and highlight searchstring within the title string, as we do for autocomplete results). This would effectively convey what the modifier does and what's going to happen if the user presses Enter.
Moreover, once we change the keyboard modifier in line with bug 1753878, we can make canonization work on mouse clicks instead of only working with the Enter key. That is, Alt+click and Alt+Enter would both canonize a search result, and would both "action override" a switch-to-tab result. In turn, that means that pressing the modifier can change the appearance of all applicable search results as it does for switch-to-tab results.
Switch-to-tab results can't be canonized, so I'm pretty sure there is no way for these 2 things to interfere with each other. If Alt key canonizes a search result and Alt key also overrides a switch-to-tab result, there shouldn't be any problems as a result (aside from reducing the number of action override keys and thereby potentially impacting user habits).
Note that in order to visually display the canonized URL in the result, we need to canonize results before the result has been activated. That canonization could happen when the modifier key is first pressed, and then cached in the result until it is replaced; or it could happen when the result is first provided. Any opinions on that?
Finally, I suggested 3 different options in bug 1753878 that would all improve the present situation with canonization. Only one of those three options would be suitable for this proposal:
1. When thectrlCanonizesURLspref is disabled, swap the Alt+Enter shortcuts to Accel+Enter shortcuts. That is,modifier = ctrlCanonizesURLs ? Alt : Accel
2. Add a pref that makes the canonize modifier Alt instead of Ctrl
3. Change the canonization pref to an integer type; let user choose the modifier and then transform the_whereToOpenmodifiers accordingly; migrate the old pref value to the new pref in some way
Making the modifier user-customizable isn't strictly necessary. If the canonization key is just changed to Alt, that will solve the problem with respect to opening results in new tabs, and it will allow making canonization and "action override" consistent with each other.
However, I'm in favor of adding a pref for this because it shouldn't cause any keyboard shortcut problems if handled correctly, and it will mitigate the main issue with this bug — restricting action override to one modifier key may irritate users who have grown accustomed to using one of the other modifier keys like Accel or Shift.
Updated•2 years ago
|
Description
•