MuckRock / documentcloud-frontend

DocumentCloud's front end source code - Please report bugs, issues and feature requests to info@documentcloud.org
https://www.documentcloud.org
GNU Affero General Public License v3.0
15 stars 5 forks source link

Render notes in document view #549

Closed eyeseast closed 1 month ago

eyeseast commented 1 month ago

There are two states: Focused and not.

Focused:

Screenshot 2024-05-17 at 7 56 34 PM

Not focused (default):

Screenshot 2024-05-17 at 7 56 42 PM
eyeseast commented 1 month ago

Here's the API response for a document with notes: https://api.www.documentcloud.org/api/documents/2622/?expand=~all

Type: https://github.com/MuckRock/documentcloud-frontend/blob/sveltekit/src/lib/api/types.d.ts#L140-L155

allanlasser commented 1 month ago

In its readable mode, the note should show the highlighted portion of the document, any comments left on that highlight, and any metadata associated with that highlight.

In its writable mode, the note should let you edit the title, content, and privacy.

allanlasser commented 1 month ago

I've drawn Note Selection and Note components.

That can be rendered in a list, for the document's Notes view:

Figma Dev Mode

Image

Or individually on the document's Document view:

Figma Dev Mode

Image

Figma Dev Mode

Image