hypothesis / hypothesis/product-backlog

Allow document titles to be updated somehow

Open
#127 17 comments 7 reactions 0 assignees View on GitHub
feature request
Dominant language
No language data
Stars
122
Forks
7
PR merge metrics
No merged PRs in 30d

Description

Feature request from a user: https://hypothesis.zendesk.com/agent/tickets/857

When people annotate a document in Hypothesis the title of that document (shown in activity pages etc) is whatever title the client extracted from that document the first time anyone annotated the document. If the author of the document changes the title, say from a temporary title to the final one, the title will never be updated in Hypothesis.

Instead of always sticking to the first title that we ever saw for a document, we could instead use the latest title that we've seen for that document. That might fill this particular user's need, although after the author has changed the title of a document someone needs to create a new annotation of that document in order to trigger the document's title to be updated in Hypothesis. The downside is that it might be confusing if the titles of documents change on activity pages.

Alternatively we could allow users to edit the title of a document in Hypothesis, but then which users should be allowed to edit which document titles?

Group admins could be allowed to edit the titles of documents in their groups, and those new titles would only be shown when the document is viewed in that group and not when the same document is seen in public or in another group. But this gets complicated to implement and potentially confusing to users (the same document having different titles on different Hypothesis pages).

* * *

Implementation notes:

Doing some quick testing if the title of an annotated document changes _and then someone makes a new annotation of the document_ then we do store the new title in the `document_meta` table in the database, and in fact we overwrite the old title and no longer have it in the `document_meta` table. But on activity pages it is somehow still the old title that is shown.

I think this must be because the document's title is also denormalised into the `document` table in the db, and we _don't_ update that denormalized copy when the title changes.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how titles move between the document_meta and document database tables and how activity pages read the document title. Confirm the intended behavior before changing anything: updating the denormalized document title from the latest annotation, or supporting user-edited titles, with activity pages showing the resulting title consistently.

Written by the indexing model from the issue text.

Assessment

Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.