[WIP] Show a summarised snippet of the latest reply from each thread #214
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #135.
This reopens @timruffles 's PR (#161) against a branch in our own repo.
@eloquence commented in #161 regarding some UX problems with this feature, which I'll copy below. This PR will be left as WIP until these issues are addressed:
There are a few issues with this from a UX perspective at present:
When the text exceeds the width of the source list, it causes the source list to require horizontal scrolling. To reproduce, create a source with a message like "Everything in one line. Everything in one line. Everything in one line. Everything in one line."
This PR implements a feature that's not in the spec -- a "↳" is inserted before messages that originate from the source (as opposed to replies). That's an interesting idea, but if we add a feature like that, we'll want to do some more thinking about doing it in a more intuitive way. Note that Signal, for example, does not indicate the provenance of snippets and generally relies on the user's memory for that.
When a file is submitted after a message, only the placeholder "↳" is shown. Instead, per the spec, the most recently received message should be shown.
When all we have is a single file (no later messages or replies), contrary to the specification, no text "—submitted a file, no message—" is shown as a snippet.
When the text contains many newlines, it can take up to the entire height of the source list, or more.
Suggested minimal amendments from a UX perspective before merging:
Wrap text to two lines at a width that corresponds to the width of the source widget.
Remove ↳ feature for now.
Swallow line breaks and replace them with spaces:
becomes:
Show most recent message or reply if most recent submission is a file.
Implement "single file, no messages or reply" behavior
Finally, note that after downloading a file, its preview snippet is replaced with . I am not listing this above because files should be special-cased, anyway, per the above. NB: I stepped through this in detail with @ninavizz and she agrees with these recommendations.