Two major changes here:
1. When you attach a video to your message, you see a thumbnail of its first frame in the composition area, instead of a generic file icon
2. When you reply to a message with a video in it, your message will include a thumbnail of that video (we'll also generate thumbnails for video quotes if not provided already)
I also made a change to our quote-loading algorithm, since I noticed that our previous approach had some performance issues now that we support video. Where before, we privileged our ability to make local thumbnails at a higher quality, now we defer to any thumbnail we have saved on the quote. So the algorithm for preparing a quote for display is now:
1. Load thumbnail from disk
2. Check to see if quoted message is in memory already. If it is, and we weren't able to load a thumbnail already, generate it from quoted message.
3. If there is an attachment in quote, and we couldn't find message in memory, and the attachment contentType is either image or video, we will go to the database to find the referenced message and create a thumbnail from it.
Bonus bug-fix: The scroll down button in the bottom right of the conversation no longer has an outline when you click it.
Send quoted replies via hover menu on message (#2284, #2292)
Fixed: Linking a new iOS device would not initially show iOS theme (#2284)
Fixed: In iOS theme, narrow images would result in a broken chat bubble (#2273, #2282)
Dev:
- Fix beta install instructions in readme for debian-based linux (#2262)
- Media Gallery: Phase 1 - currently disabled (#2236)
- [x] Index each `Message` based on whether it has an attachment
(visual or document), e.g.
~~`attachmentTypes: 'visual' | 'document' | 'mixed' | 'none'`~~.
~~`attachmentTypes: 'visual' | 'document' | 'none'`~~
- `hasVisualMediaAttachments: IndexedDB.IndexablePresence`
(`1 | undefined`)
- `hasFileAttachment: IndexedDB.IndexablePresence` (`1 | undefined`)
- `hasAttachments: IndexedDB.IndexableBoolean` (`1 | 0`)
- [x] Create migration to initialize index
- [x] Add menu for viewing all media: **View All Media**
- [x] Add IndexedDB index for:
- [x] visual media attachments
- [x] file attachments
- [x] attachments (general)
- [x] Render tabs: **Media** and **Documents**
- [x] Group messages by date
- [x] Add `GoogleChrome` module to explicitly whitelist file formats it can
render / play back.
- [x] Render list of media thumbnails
- [x] Avoid loading videos into memory as they are too big.
**TODO:** Could we do that for any large attachment before we have
thumbnails?
- [x] Show video icon for videos as we don’t have thumbnails (yet).
- [x] Implement lightbox
- [x] Rebuild Backbone lightbox using React
- [x] Add right arrow SVG (`forward.svg` for symmetry with `back.svg`).
- [x] Add next / previous buttons
- [x] Port support for `Escape` key to close
- [x] Port click close
- [x] Show lightbox when clicking on media thumbnail
- [x] Switch from `MIME.is*` to `GoogleChrome.is[Image|Video]TypeSupported`
- [x] Disable access to media gallery until it’s complete.
- [x] **Infrastructure:** Move `filesize` from Bower to npm/yarn.
- [x] **Infrastructure:** Add support for _Prettier_ code formatting.
Opt-in via pragma:
```
/**
* @prettier
*/
```
Run via `yarn format` command. **TODO:** Add support Git commit hook, etc.
- [x] **Infrastructure:** Add basic TypeScript type definitions for Backbone
`Model` and `Collection`.
- [x] **Infrastructure:** Created pattern for fetching index data without adding
more code to existing Backbone collections.
See `Conversation.fetchVisualMediaAttachments`.
- [x] **Infrastructure:** Created variable for `z-index`.
**TODO:** Replace all usages of explicit `z-index` with variables
over time.
- [x] **Infrastructure:** Created `Signal.Backbone.Views.Lightbox` module to
experiment interop with Backbone without using Backbone or jQuery itself
to align with long-term plans.
- [x] **Infrastructure:** Enable all strict checks by TypeScript compiler.
- [x] **Infrastructure:** Add new TSLint rules (see comments in `tslint.json`).
### Phase 1
- [x] Only show images in media gallery until we have video support in lightbox
(and potentially thumbnails for grid).
- [x] Show up to 50 of most recent images until we have infinite scrolling.
- [x] Hide ‘Save As…’ button in media gallery until we port underlying
functionality from Backbone to React.
- [x] Disable previous/next navigation until implemented.