-
Notifications
You must be signed in to change notification settings - Fork 14
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
General purpose front-end integration JavaScript library #21
Comments
I learned a UI lesson about definitions with The State Decoded, which I'll pass along here in case you might regard it as useful. Initially I highlighted defined terms quite prominently, and feedback about that fell into three different categories: 1. This is great. 2. This is incredibly annoying. 3. This is useful, but it makes it very distracting to scan the text, because my eye is drawn only to the defined terms. With experimentation, I found that using a very low-key indicator (a faint, dotted underline), people could either ignore them or seek them out, depending on what they wanted, while nobody found that those indicators distracted them from reading. JM2C, YMMV, etc., etc. |
Yeah, faint was my first instinct and implementation, then people said they could barely see it -- but of course those people were coworkers, not users. =) This is good feedback, I'll make it faint again. |
It seemed to me to be like the Pepsi Challenge—people just checking it out real quick thought the bold definitions were great, but people actually engaged in reading a lot of text for a real purpose often found it frustrating. |
It would be VERY slick if after you moused over a term the highlighting for It is nice to see the definitions short and written to be read while You know...we should connect mouse-over glossaries with the plain language Greg On Wed, Oct 9, 2013 at 9:15 PM, Waldo Jaquith [email protected]:
|
👍 I'd want to test this out, to see if it works as well as I think it would, but at first blush I think this is a great idea. I wonder about persistence—if the reduced-strength highlighting resets for each page view, each session, or never resets for that user. I suspect one would want to use client-side storage to save the list of viewed definitions. |
It'd probably need to be client-side storage, which could be packaged in a JS library. It does mean it'd reset itself every time they switched browsers or cleared their cache/cookies/etc, so I would still make the default color undistracting, but making it even subtle-r upon seeing it seems like all upside. |
The client-side storage of browsers and powerful HTML5 and ajax means there is the possibility of essentially of building follow-the-user functionality into the use of the Glossary (or statedecoded). After all, Hypothes.is was at the meeting with us and they are pursuing web page annotations. I'm imagining popping up a little control that may even let me control certain things between visits. It would make sense that I could as user create my own set of notes and expertise level as I view legislation at Federal, State, Local and other jurisdictions. If Glossaries were common, than I could have my own interaction with glossary that was recognized and consistent across different visits and different sites. Maybe there is an easy way for all of that to be done via local storage (and give me as user control over it). There's certainly a way to store in the cloud and log into my annotations as I moved across sites. My guess is that Mozilla would be interested in support this idea. It is a kind of reverse cookie, in which I as the user, native to the browser, have the ability select a profile and decisively store data in that profile that I allow sites to see by default or by white list. It makes sense for this to be a specification and API. Maybe it already is and I just do not know it? |
::brain expands:: I have no idea whether you can use local storage to create bins that any website can use, or if they have to be locked per-domain, but there's clearly a lot of fun to be had here. I'm gonna focus on what's in front of me for now, but a separate branch or repo for front-end experimentation is welcome. |
I like it. Maybe there is a way to do something like gravatar or extend gravatar? On Thu, Oct 10, 2013 at 1:33 PM, Waldo Jaquith [email protected]:
|
I like the model! Looks like the xauth example there is a long-dead project, unfortunately. But with server intervention, anything is possible. |
I added some super basic integration into Scout, using a JS-driven approach here:
https://github.com/sunlightlabs/scout/blob/master/subscriptions/views/federal_bills/_show.erb#L168
This is what is highlighting "Cloture" all over S. Res. 15.
It needs optimization to work for more than a handful of terms (mainly, it needs to be turned into a single regex, rather than passing over the nodes with a regex for every term), but it does handle the hard part of find/replacing text with nodes, in a DOM where text is nested in arbitrary nodes.
Optimizing and generalizing this for easy client-side integration of the glossary would be awesome.
The text was updated successfully, but these errors were encountered: