18F / omb-eregs

A tool to find, read, and maintain White House Office of Management and Budget (OMB) policy requirements
https://policy-beta.cio.gov/
Other
9 stars 9 forks source link

Implement anchor link design #666

Open cmc333333 opened 6 years ago

cmc333333 commented 6 years ago

528 includes a design for users linking to a given paragraph/table/etc. This ticket is a placeholder for its implementation.

We'll likely want to split this up into subtasks.

carodew commented 6 years ago

I'm wondering if we can either add another issue, or include in this one as AC, that implements click tracking for when a user copies a link to a block level element, with the idea that we could then create a report out of which paragraphs within a document are being shared the most? (top 10 paragraphs). I'd consider this part of user research, but just not one that I can execute on my own.

cmc333333 commented 6 years ago

I think we'll break this issue up at sprint the next sprint planning since no one started work this sprint. We'll want to refine this, but I suspect the chunks would be along the lines of:

  1. Add HTML element for a link to paragraph nodes
  2. Add hover state (depends on 1.)
  3. Add copy-to-clipboard functionality (depends on 1.)
  4. Add highlight (similar to 2.) for a user first loading a shared link
  5. Implement fading/dismiss action (will need to confer with @rtwell, depends on 4.)
  6. Ensure mobile styles match (depends on 1., 2., 3., 4.)
  7. Add Google Analytics event for tracking which elements are shared (depends on 3.)
  8. Ensure Google Analytics page events include the anchor