Commit Graph

3997 Commits (5fe5320760da1beab4d389f655ebb45b8fadef67)
 

Author SHA1 Message Date
Daniel Gasienica 96c44094e3 Implement `Conversation.fetchFileAttachments` 7 years ago
Daniel Gasienica 3a8582ee16 Re-enable media gallery access 7 years ago
Daniel Gasienica 2a5f513ebc Organize `global`s 7 years ago
Scott Nonnenberg 45bf1d5bfc
styleguide: Make filesize/Signal.Util.GoogleChrome available (#2302)
styleguide: Make filesize and Signal.Util.GoogleChrome available
7 years ago
Scott Nonnenberg ccf14710a3 styleguide: Make filesize and Signal.Util.GoogleChrome available 7 years ago
Daniel Gasienica 73a0032b75 Remove duplicate entry from .gitignore (#2271) 7 years ago
Balázs Keresztury dac1f69c16 Removed duplicate entry from .gitignore 7 years ago
Scott Nonnenberg fdd6985a79
Thumbnails for new video attachments and video quotes (#2293)
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.
7 years ago
Scott Nonnenberg 1bc8452337 Remove the outline for the scroll down button
In the future we'll re-enable this for keyboard navigation. For now,
it's really distracting.
7 years ago
Scott Nonnenberg 84c7a4c293 Move to some of our global utility methods 7 years ago
Scott Nonnenberg 403fb1fd60 Make algorithm for finding thumbnails more efficient 7 years ago
Scott Nonnenberg 27a30b3267 Respond to PR feedback
- makeThumbnail -> makeImageThumbnail
- duplicate 'display: flex'
- remove no-longer-applicable comment
7 years ago
Scott Nonnenberg ac0b50d20f
Generate thumbnails for new video attachments, video quotes 7 years ago
Scott Nonnenberg 0e99ca61a2
eslintify file_input_view.js 7 years ago
Scott Nonnenberg b9b85a0030
v1.9.0-beta.1
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)
7 years ago
Daniel Gasienica acf8a1a96c
Media Gallery: Phase 1 (#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.
7 years ago
Daniel Gasienica bf3a547a76 Organize `global`s 7 years ago
Daniel Gasienica 19411a78c8 Remove dead code 7 years ago
Daniel Gasienica 52e4e5aece Omit undefined keys when comparing IndexedDB data 7 years ago
Daniel Gasienica f36f206a01 Use `IndexablePresence` for `hasFileAttachments` and `hasVisualMediaAttachments`
Reduces index size, makes it easier to debug using IndexedDB inspector, and
hopefully improves lookup performance.
7 years ago
Daniel Gasienica 3a33d862c0 Update backup test fixture 7 years ago
Daniel Gasienica c8e51f1d06 Disable media gallery access until feature is complete 7 years ago
Daniel Gasienica 5c81e1b353 Watch TypeScript files in Grunt 7 years ago
Daniel Gasienica 8e3c38d5fe Fix formatting 7 years ago
Daniel Gasienica b65370c8d7 Prefer `GoogleChrome.is*` over `MIME.is*` 7 years ago
Daniel Gasienica 64c3d604aa Fix type errors 7 years ago
Daniel Gasienica cd6912f0dd 🎨 Autoformat code 7 years ago
Daniel Gasienica 823a58f98a Prevent NPE 7 years ago
Daniel Gasienica 96be0df8c7 Show lightbox controls based on presence of handlers 7 years ago
Daniel Gasienica 59650035ec Use 🇺🇸 spelling 7 years ago
Daniel Gasienica feff820cd4 Prefer custom styles over `strong` 7 years ago
Daniel Gasienica 657a2d6149 Document the use of CSS vs inline styles 7 years ago
Daniel Gasienica fca8de16c8 Add required `Message.id: string` 7 years ago
Daniel Gasienica dd7e51e697 🎨 Fix formatting 7 years ago
Daniel Gasienica 3ad74e0c3e Remove implied `strict` compiler options 7 years ago
Daniel Gasienica 74582de2d1 Clarify naming 7 years ago
Daniel Gasienica 6330a8d9f3 Simplify expression 7 years ago
Daniel Gasienica f99e6306c3 Simplify `withSection` 7 years ago
Daniel Gasienica d98d08a7e0 Remove obsolete TODO 7 years ago
Daniel Gasienica e97b078088 Use `componentWillUnmount` 7 years ago
Daniel Gasienica 9abf1f0fcd Use `dash-case` for CSS class names 7 years ago
Daniel Gasienica 9134701f7c Move `filesize` from Bower to npm 7 years ago
Daniel Gasienica 2e121310e4 🎨 Fix lint error 7 years ago
Daniel Gasienica 4d04638358 Document changes for MVP 7 years ago
Daniel Gasienica c3e04ecf87 Remove use of `LoadingIndicator` 7 years ago
Daniel Gasienica 6d5d0df1c0 🎨 Fix TSLint errors 7 years ago
Daniel Gasienica 8b9516de72 Update test for attachment metadata 7 years ago
Daniel Gasienica 86a9923181 Remove TODOs 7 years ago
Daniel Gasienica 204de3aaea Lazily bind `Signal.Components.MediaGallery` 7 years ago
Daniel Gasienica 146178f977 Update schema documentation 7 years ago