cfpb / regulations-site

(DEPRECATED) Web interface for viewing U.S. federal regulations and other regulatory information
Other
28 stars 43 forks source link

Load inline "Official Interpretations" via Ajax #726

Open ascott1 opened 9 years ago

ascott1 commented 9 years ago

Right now the official interpretations are part of the document, making some sections of the regs rather large. @cmc333333 suggested loading these via Ajax instead.

Before implementing, this requires some UX though. Should the content load before the interpretation "opens?" If so, should there be a visual indicator that the content is loading? If so, how do we work that into the current design of the inline interpretations?

Current Interaction

Interpretation content is hidden by default:

screen shot 2015-06-05 at 3 18 44 pm

When a user clicks anywhere on the interpretation it expands, revealing the content:

screen shot 2015-06-05 at 3 18 53 pm

ascott1 commented 9 years ago

cc: @jpyuda @jehlers

jpyuda commented 9 years ago

I think I'd have it change from the "show" state to the "hide" state, and slide down far enough to have space for a loading spinner.

The big question then would be whether clicking "hide" cancels the loading or just preloads it in case the user opens that interp.

For bonus points, you could explore lazy-loading in interpretations that apply to the scroll position within the section in an attempt to pre-load likely interps.

@jehlers anything else I'm missing here?