akhodakivskiy / VimFx

Vim keyboard shortcuts for Firefox
https://addons.mozilla.org/firefox/addon/vimfx
Other
1.41k stars 174 forks source link

No hints for feedly.com #440

Closed GreenHapi closed 8 years ago

GreenHapi commented 9 years ago

Hi. Hints are not generated for most of feedly.com I use VimFX dev. channel build I compiled on 2015-01-19, Win 8.1, Firefox beta 36

lydell commented 9 years ago

Could you please provide instructions on how to get to a page on feedly.com that does not get hints?

GreenHapi commented 9 years ago

You need to login and add some rss subscriptions. Then on your personal home page you will see that hints are not generated for most of left menu where your subscriptions will be, some parts of right sidebar etc

GreenHapi commented 9 years ago

What I have found: hints are not generated for links that show additional info when I hover cursor over them. With few exceptions others are OK.

lydell commented 9 years ago

Thanks. Does it work on the master branch?

GreenHapi commented 9 years ago

Just tested. For some reason VimFX doesn't work at all. Maybe because of Firefox 36? I downloaded from from Firefox addons 0.5.14. Just built VimFX from dev branch again to fix this.

GreenHapi commented 9 years ago

Also, after this my other keyboard layout (Cyrillic) is garbled now. They are converted to English keyboard layout symbols.

UPD: Oh, there is Ignore Keyboard layout in options. Great! I was looking for a button to reset my VimFX settings. As I understand, currently there is no way to do this.

UPD: Customize button in Addon preferences seems to do nothing

UPD: Looks like Ignore Keyboard layout converts other keyboard layout symbols to English keyboard layout too

UPD: It seems Ignore Keyboard layout is working. Thank you for this option

lydell commented 9 years ago

For some reason it doesn't work at all.

No hints on no pages?

Maybe because of Firefox 36?

Perhaps. The latest version I have tested with is Firefox 34.

after this

After what? Downgrading from develop to 0.5.14? Have you customized any keyboard shortcuts when using the develop version? If you have—yes, that will cause problems when downgrading. If you haven’t, you should not have any problems, though. Could you post a screenshot of what the vimfx prefs look like in about:config?

GreenHapi commented 9 years ago

No hints on no pages?

It looks like it doesn't work at all. No hints on no pages

After what?

Yes, I customized and downgraded. And new shortcuts that I added became symbols from English keyboard layout. Also, the same thing happened when I turned on Ignore Keyboard layout option

GreenHapi commented 9 years ago

Maybe it will be more useful if I copy them as text? Currently, I deleted all non-Latin characters, because with Ignore Keyboard layout option I don't need them Here are they:

user_pref("extensions.VimFx.black_list", "vim-adventures.com,coolwanglu.github.io,www.openvim.com"); user_pref("extensions.VimFx.commands.close_other_tabs.keys", "[]"); user_pref("extensions.VimFx.commands.close_tab.keys", "[[\"x\"]]"); user_pref("extensions.VimFx.commands.close_tabs_to_end.keys", "[]"); user_pref("extensions.VimFx.commands.follow.keys", "[[\"f\"]]"); user_pref("extensions.VimFx.commands.follow_in_tab.keys", "[[\"F\"]]"); user_pref("extensions.VimFx.commands.help.keys", "[[\"?\"]]"); user_pref("extensions.VimFx.commands.home.keys", "[]"); user_pref("extensions.VimFx.commands.open_tab.keys", "[[\"t\"],[\"5\"]]"); user_pref("extensions.VimFx.commands.reload.keys", "[[\"r\"]]"); user_pref("extensions.VimFx.commands.reload_force.keys", "[[\"R\"]]"); user_pref("extensions.VimFx.commands.restore_tab.keys", "[[\"X\"]]"); user_pref("extensions.VimFx.commands.scroll_down.keys", "[\"j\"]"); user_pref("extensions.VimFx.commands.scroll_page_down.keys", "[]"); user_pref("extensions.VimFx.commands.scroll_page_up.keys", "[]"); user_pref("extensions.VimFx.commands.scroll_up.keys", "[\"k\"]"); user_pref("extensions.VimFx.commands.tab_first.keys", "[\"0\"]"); user_pref("extensions.VimFx.commands.tab_first_non_pinned.keys", "[\"^\"]"); user_pref("extensions.VimFx.commands.tab_last.keys", "[\"$\"]"); user_pref("extensions.VimFx.commands.tab_next.keys", "[[\"K\"],[\"g\",\"t\"],[\"e\"]]"); user_pref("extensions.VimFx.commands.tab_prev.keys", "[[\"J\"],[\"g\",\"T\"],[\"q\"]]"); user_pref("extensions.VimFx.hints_bloom_data", "[-207618566,-134918809,-1862277381,-307717250,-18959450,2071947990,-1083773129,-1610875346,1289092783,-553123845,-81805333,-50452135,-5054739,-345665,-347251621,1811011271,-536975473,1073648987,1493020473,-940300297,-561029529,-558563996,-1159758403,958309875,871610278,-372258882,-1892698509,1873631605,2130294206,-176713745,-1074447417,-72149018,-156513287,-1087508097,-745333793,163027810,-1728340363,991281099,-408223873,-543162821,-474071190,-13648737,-1946349577,2143254223,1029570541,937230306,-642947477,-208183672,-805201,-774282337,-545060930,-292687940,-423624745,997155444,-16932945,-1615806657,-242727849,-1346971970,-1352485149,-1288645637,-1085328929,-71389193,-355014699,871366255,976925487,-1154024137,-447764005,-1689288721,2146664428,-1182808069,1605566329,-201362463,-689381474,1785714043,-704643203,-110380658,-75712532,1396405873,-72177180,1022819292,-557974733,-829770561,-245628998,-1389654391,805285307,2088549357,-1887766082,2101324969,-2517062,2073950062,-40486389,1727231743,1577044903,-44109953,803192642,-1611139089,2122120984,-139411603,-101927022,-66655,-487277057,1803517949,2000469695,-204505141,997191487,-1343834498,-1171375297,-234902633,-50375749,1985598959,460294335,998239211,-555811357,-20982057,1476245473,-1214916882,-890109954,-39854401,-284557350,-1048870,2107092783,-67114503,-547275843,-1109394246,763035333,2009519019,1406990259,-2028602501,1605279674,-1886884490,1802932036,464122490,-532813825,-510273538,-250643185,-1098913669,1119087583,-1094815053,1947728895,-1891893766,-336651942,-545034241,-26235407,-269056589,-1019752595,267906559,2011161933,-751379991,-449376389,-492335365,2006706556,-1243121937,1197653567,-1073877269,-39078423,54109879,-197253,-359547970,-1098248706,1809637347,-1082204387,-278030353,-564400193,1608326391,-336855297,762074358,200605542,-1099049489,796768749,-1637889729,-423698953,993721815,-557070377,-7021569,503036901,639106365,1875877878,1136444318,-1951,-946100787,-1569245318,-1078518309,794720255,356417441,-822362753,-327823184,1610035839,1730084863,-1151008807,-638265107,463374140,1759986354,-1495275009,2142960607,-161874539,1463213420,2132245758,-1622298689,1742527964,-1938476572,-69239555,497937785,1585575354,-156157954,-1845495682,-59582995,-321171973,-551292042,-409468966,-740950059,-349642983,-1172832653,-1109426719,492625835,-202170505,1194195408,-16777729,1763695599,1003857118,-470288178,2093317855,1408118223,1710790526,-523773061,-1688082706,2105509887,-1355677841,-141623768,-1144621643,2109209547,-352389317,-118022,-1083470089,-92804689,-1087042,-1351673873,2147155929,-1212286033,-1615368897,1832644056,939391735,255838141,2109729175,2071376872,-601678353,-3014659,-286261249,656318122,398428717,-305399154,1591833069,-281782324,2138550233,-34209809,-142619651,-587434590]"); user_pref("extensions.VimFx.ignore_keyboard_layout", true);

lydell commented 9 years ago

Also, the same thing happened when I turned on Ignore Keyboard layout option

Did you mean that you flipped it in about:config? Because there is no such option in 0.5.14 (and thus changing it in about:config has no effect).

All command prefs that start with a single [ (not a double [[) should still work in 0.5.14. The others have undefined behavior. This is expected. However, when 0.6.0 is released this will be mentioned in the changelog so people are aware of it.

Back on topic: It seems like something has changed in Firefox 36 then that breaks VimFx. Needs investigation.

GreenHapi commented 9 years ago

capture

GreenHapi commented 9 years ago

Did you mean that you flipped it in about:config? Because there is no such option in 0.5.14 (and thus changing it in about:config has no effect).

No. When I saw that 0.5.14 doesn't work I deleted it and installed new dev build. This happened in new dev build

PS. New build works in Firefox 36 just fine except topic problem. But this problem with feedly was before, so it's not Firefox 36 related. It's the same with Gmail. It works, but for urls where additional info is displayed when I hover cursor over them VimFX doesn't display hint for them. But for some it displays. And I cannot pinpoint the difference yet. In Gmail for left menu (Inbox, Important etc)it displays hints

lydell commented 9 years ago

I’m very confused now. Is the only problem that some links on feedly.com and gmail do not get hints?

GreenHapi commented 9 years ago

Yes. Sorry for confusing you

GreenHapi commented 9 years ago

PS. Just checked your latest "Fix broken Keyboard Shortcuts button menu item" Still doesn't work for me, though.

lydell commented 9 years ago

Odd. Works for me.

GreenHapi commented 9 years ago

This is what I do. I go to about:addons Then click on Options next to VimFX and then I press button Customize next to Keyboard Shortcuts. And nothing happens. I don't know how to debug it

lydell commented 9 years ago

That’s a different issue. The commit you referenced fixed the menu item of the VimFx toolbar button. By the way, I just fixed the Customize button in about:addons a few minutes ago ;)

GreenHapi commented 9 years ago

Yes, it works now. I can't keep up with fixes))

akhodakivskiy commented 9 years ago

I think the issue is that feedly.com styles divs as buttons and links. Perhaps VimFx needs to be updated to include these custom styles and/or attributes in the xpath query that looks up elements on the page that get hints.

lydell commented 9 years ago

Or it's because of the new algorithms in develop. We need to check it out before guessing.

GreenHapi commented 9 years ago

I will check under OS X with Firefox 35 and older build of VimFX whether it works or not and will report back

akhodakivskiy commented 9 years ago

Well, I'm using the latest release - 0.5.14. I checked feedly.com DOM, and it's using fancy javascript binding based of various attributes, like data-uri="...". The class names on these elements also don't match what we have in the xpath query (from my memory)

GreenHapi commented 9 years ago

No changes. It still doesn't work. And what interesting 0.5.14 is working after I updated Firefox to 36 under OS X.

lydell commented 9 years ago

Phew, then at least it's not a regression.

GreenHapi commented 9 years ago

It's separate issue (Win 8.1, Firefox beta 36 and VimFX 0.5.14), but I will post it here. Just checked this combination again. Doesn't work, but OS X 10.10.1 is ok. Under Windows I can see VimFX under Addons, I can open Options, but I can't open Customize keyboard shortcuts and no keyboard shortcuts seem to work. Still, I can see VimFX in toolbar and open Preferences, but not Keyboard shortcuts.

UPD: Looks like I completely broken VimFX, because after installation of 0.5.14 and then installing latest dev build again I can't make it work at all. I can go to Options and Customize Keys, but not shortcuts seem to work

UPD: OK. I fixed VimFX and this combination (Win 8.1, Firefox beta 36 and VimFX 0.5.14) I had to uninstall VimFX, then under about:config I reset all VimFX settings and installed 0.5.14. It works now. Maybe those non-latin characters broke 0.5.14 somehow when I downgraded from latest version and then it broke latest dev build too. Because under OS X I used only 0.5.14. After all this manipulations and resets I again installed latest dev build. Now it works too. So I blame those customizations

lydell commented 9 years ago

Thank you so much for testing the develop branch! Nobody should have to go through what you have, where downgrading caused VimFx to crash. Therefore I’ve now published 0.5.15 which is forwards-compatible with 0.6.0.

GreenHapi commented 9 years ago

Well, I'm glad to test it. Someone had to go through few problems anyway)

GreenHapi commented 9 years ago

I changed code to generate hints for feedly.com https://github.com/TheGreenHabi/VimFx/tree/patch-1 But they all have the same hint (F). Still looking for problem

UPD_1: and Shift-F is no longer working. Bugs hunting) UPD_2: now I get why my code doesn't for as intended. It's because of new function Combine links with the same href. It combines all elements with the same attributes that I check for

  return element.hasAttribute('data-app-action') or
         element.hasAttribute('data-uri') or
         element.hasAttribute('data-page-action')

So if I update this new code, my should work too. Also, it might solve future problems

UPD_3: Shift-F command_follow_in_tab and same hint bug are totally different beasts

GreenHapi commented 9 years ago

OK. While messing with my bug, I found bug in current dev builds hint generation. Hints are generated differently for f - command_follow and F - command_follow_in_tab

command_follow seems to work ok.

command_follow_in_tab - not all hints are generated as command_follow would do on all websites and hints get different hint characters. There is no such problem for command_follow_multiple for example

command_follow_in_focused_tab - same problem as with command_follow_in_tab (they use same function)

GreenHapi commented 9 years ago

I updated command_follow_in_tab and command_follow_in_focused_tab functions to go through command_follow.

GreenHapi commented 9 years ago

All bugs are removed! Everything works! I don't believe I actually made it!

lydell commented 9 years ago

That 'F' generates fewer hints than 'f' is not a bug—it's a feature. 'F' only targets things that make sense to open in a new tab, while 'f' also targets lots of other clickable things. How is that a problem for you?

GreenHapi commented 9 years ago

Now I understand. I was to focused on feedly hints generation problem that when I saw no hints for F I thought - it's a bug and fixed it. Makes perfect sense to not generate them.

UPD: Restored functionality to previous version + feedly patch.