documentcloud / documentcloud-notes

Responsively embed DocumentCloud notes.

Home Page:https://documentcloud.github.io/documentcloud-notes/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Embedding same note multiple times

reefdog opened this issue · comments

Sprung from: documentcloud/documentcloud#19

Been chatting with @knowtheory about ways to allow this. Basically, we should be able to internally store a note model once and then reference it from multiple note views. Currently, there's a 1:1 relationship and so the last view instantiated is the only one who gets the note. (dc.embed.notes is keyed by note ID and points to a noteView, so you can't have multiple noteViews modeled on the same note.)

Goals:

  1. Make this work
  2. Make this work in a way that doesn't break existing integrations

Classifying this as a bug because there are many reasonably scenarios where a user would expect the same note to appear on the same page (e.g., index page for blog posts which each embed the same note).