From: Benjamin S. <bs...@cr...> - 2005-12-01 21:25:43
|
> I had thought kbd nav would also include selecting different feeds, > etc. I tend to use Page Up and Page Down for scrolling through pages. Might I suggest space and shift+space for just jumping through pages? shift+space rules. > I read this page: > http://www.quirksmode.org/viewport/compatibility.html quirksmode is pretty super useful. > Which discusses compliant means for doing scrolling methods. Combined > with "Access Keys", it's possible to do: > -- > <script type="text/javascript"> > function fr_scroll(inc) > { > var x,y; .... > } > </script> > <a href="javascript:scroll(0,0)" accesskey="h">Top</a> > <a href="javascript:fr_scroll(-200)" accesskey="j">Up</a> > <a href="javascript:fr_scroll(200)" accesskey="k">Down</a> > -- So uh, that code could probably be adapted pretty easily, since all I need to do is build a list of items on the page and then be able to jump to those items. I'll see about using this code tonight to see how hard it is. I used the refeed code just because it was there and did what I wanted and allowed for a quick proof of concept. > I think the marking is *very* good idea - though I couldn't test it on > a large number of feeds. How does it know to jump to the next feed > item to be read? Oh, it doesn't actually do that. It just jumps to the next item. So I kind of made an oversight here, which has to do with how I read my news: When I read, I read "today's unread items" instead of "today's items." On my personal menu, I added a link to /view.php?what=all&when=today&what=unread -- the what=unread is super useful. On top of that, I have a second hack where I can *ajax* mark something read, which causes it to disappear from the page. Taken together, these two things mean that I never see "read" items when I'm reading, which means I don't have to skip read items. In the current implementation, read items would be visible if I weren't using what=unread, and marked items are visible no matter what. I'll be able to make it so that read items AND mark items get skipped, and 'j' can be "next unread / unmarked" and something else (control-j?) is absolute next item... But implementing the "I only want to see my unread news" by just putting the "today unread" link in the menu would be a nice feature to toss in there. I'll do it in my next commit. > I guess it can get the X,Y page location of the next > check-box and then scrollTo(x,y) that location. I'm not scrolling to the checkbox; I'm scrolling to the top of the div. > In the end, I'm not sure what all the ReFeeds js stuff is including, A lot of crap. =) > but I think it's too heavy handed for just up/down and marking stuff. > I think we'll be better served by writing up our own JS code that's > smaller. The above code does scroll up/down (albeit with ctrl-j, > ctrl-k) and I would think the mark would be straight-forward? As mentioned, I'll follow up on optimizing this tonight. But as implemented, I should be able to change the implementing javascript without changing the HTML at all -- I'll just need to remove the extra javascript includes. --Benjy |