Show original document title (and filename?) before importing
When importing annotations into a document, it would be useful if the Import dialog provided some confirmation of which document the annotations were originally created on, to guard against accidentally importing annotations from the wrong document.
This was originally taken from https://github.com/hypothesis/client/issues/5743#issuecomment-1693194981:
Try to include the "original document" (Title? Name?) on the export file, so that we can display that information before importing, helping users catch possible mistakes while importing from the wrong document.
A sketch of what this could look like, where we show the most common document title from the export data.
A variation where we show a summary of what is in the selected file above options to choose what to import:
This summary could also include the group title, assignment title etc.
A problem we are likely to run into here is that the document titles might often be junk values, and identifying when that is the case will be difficult.
Even though first option groups the overall components in a nicer way, I think the second makes more sense, as the document information is part of the file and will not be affected by the user selected from the dropdown.
But I don't have a strong opinion here.
Note from a discussion earlier this week. The consensus was definitely to go with something more like the second example from https://github.com/hypothesis/client/issues/5791#issuecomment-1706521744.
To recap, the current plan is to show information about what is in the selected file underneath the input, but above the user list. We need a design for how this should look. The second screenshot in https://github.com/hypothesis/client/issues/5791#issuecomment-1706521744 uses a plain label, but I think it would look better if it could be presented in a visually distinct way from the "Select which user's annotations to import" label below, and more coupled with the input field.