Commit Graph

3887 Commits (403fb1fd60f9fa4df8800aa3da2f074567b8d878)
 

Author SHA1 Message Date
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
Daniel Gasienica f240269d7b MVP: Only show images in media gallery 7 years ago
Daniel Gasienica b4e3749c88 MVP: Only show media tab
Until we support showing documents.
7 years ago
Daniel Gasienica 60ed82b728 Show all lightbox controls in style guide 7 years ago
Daniel Gasienica b4a4182613 Hide ‘Save As…’ button in media gallery
Wait until we support it.
7 years ago
Daniel Gasienica a7ed21a811 Add `shouldShowSaveAsButton` option 7 years ago
Daniel Gasienica 0d676a65b8 Open media gallery item in lightbox 7 years ago
Daniel Gasienica a9f7f18721 Add `ItemClickEvent` 7 years ago
Daniel Gasienica d634a414c3 Make visibility of previous/next buttons opt-in 7 years ago
Daniel Gasienica 142236640e Click lightbox to close 7 years ago
Daniel Gasienica ce825fbd66 Rename `save` to `onSave` 7 years ago