Commit graph

3738 commits

Author SHA1 Message Date
Scott Nonnenberg
a0b1dea693
Introduce a bit of color to the message/attachment style guide 2018-04-13 18:10:50 -07:00
Scott Nonnenberg
c747c55b37
MessageReceiver: Translate from BigNumber to number for quote id 2018-04-13 18:10:50 -07:00
Scott Nonnenberg
0100e279f5
MessageView: Make Quotes resilient to re-renders 2018-04-13 18:10:50 -07:00
Scott Nonnenberg
b458c7d449
android-dark: Constrain light play icon to with peer image 2018-04-13 18:10:49 -07:00
Scott Nonnenberg
bdaebc24ae
A few tweaks for the android-dark theme 2018-04-13 18:10:49 -07:00
Scott Nonnenberg
087dd0f758
Support for iOS theme 2018-04-13 18:10:49 -07:00
Scott Nonnenberg
644bc9e6fb
Fix problem of squished quote icons and images 2018-04-13 18:10:49 -07:00
Scott Nonnenberg
127a90c4f6
Removed unused aspect ratio mixin 2018-04-13 18:10:49 -07:00
Scott Nonnenberg
5412ce051e
preload.js: Fix quote support, load Quote properly 2018-04-13 18:10:49 -07:00
Scott Nonnenberg
fc330ef854
Quote loading: Check for in-memory message until we get one 2018-04-13 18:10:48 -07:00
Scott Nonnenberg
92a89a8e41
Fix MessageView test: p -> div 2018-04-13 18:10:48 -07:00
Scott Nonnenberg
2243e348f1
Wire up fake window.Signal.HTML because it's captured on load 2018-04-13 18:10:48 -07:00
Scott Nonnenberg
0f8dd7e2db
Fix a number of lint failures 2018-04-13 18:10:48 -07:00
Scott Nonnenberg
1cc0633786
Full support for quotations in Android theme 2018-04-13 18:10:48 -07:00
Scott Nonnenberg
47a3acd5c9
Remove models/messages + models/messages from jscs run 2018-04-13 18:10:48 -07:00
Scott Nonnenberg
5602241a0c
Eliminate eslint-generated triple-parents 2018-04-13 18:10:47 -07:00
Scott Nonnenberg
5c2936bdd6
Turns out that we call validateNumber() on group conversations! 2018-04-13 18:10:47 -07:00
Scott Nonnenberg
d5043eb9cf
MessageReceiver: Can't use arrow function if it is to be new'd 2018-04-13 18:10:47 -07:00
Scott Nonnenberg
e99192dca7
Unleash eslint on models/messages.js
Fun fact: eslint was not running on this file, despite the eslint
directives previously in the file!
2018-04-13 18:10:47 -07:00
Scott Nonnenberg
33ef967dd7
Unleash eslint on models/conversations.js 2018-04-13 18:10:45 -07:00
Scott Nonnenberg
054d3887a1
Quotes: The full pipeline into the database
1. MessageReceiver always pulls down thumbnails included in quotes
2. Message.upgradeSchema has a new schema that puts all thumbnails on
   disk just like happens with full attachments.
3. handleDataMessage pipes quote from dataMessage into the final message
   destined for the database
2018-04-13 18:05:45 -07:00
Scott Nonnenberg
e69586200a
Unleash eslint on message_receiver.js - lots of change 2018-04-13 18:05:45 -07:00
Scott Nonnenberg
21bf02c94d
Fixed examples in Quote.md, rough Android visuals 2018-04-13 18:05:44 -07:00
Scott Nonnenberg
6653123671
Move quote-related examples from Message.md to Quote.md 2018-04-13 18:05:44 -07:00
Scott Nonnenberg
b4ce79cac0
Reply -> Quote 2018-04-13 18:05:43 -07:00
Scott Nonnenberg
2def6afe45
message_view.js: eslint fixes and a bit of fixup 2018-04-13 18:05:43 -07:00
Scott Nonnenberg
09c3fbc5e2
Style guide: All permutations of text reply to diff. quote types 2018-04-13 18:05:43 -07:00
Scott Nonnenberg
ad58799269
Update protos to reflect recent quotation-related updates
Updating to be current with these two comments in libsignal-service-java

2e4aa84896 (diff-c525e47fbed26da2110c8a7c37a37031)

4f07b9e85e (diff-c525e47fbed26da2110c8a7c37a37031)
2018-04-13 18:05:42 -07:00
Scott Nonnenberg
ae043bf239
In iOS theme, join attachment bubble with caption bubble 2018-04-13 18:05:42 -07:00
Scott Nonnenberg
3a76c3c86e
Styleguide: Incoming/outgoing attachments of all types 2018-04-13 18:05:42 -07:00
Daniel Gasienica
1206b3c448 Remove Conversation Message Preview After Message Has Expired
- [x] Skip timestamp update for `verified-change` and expiring messages to
      prevent them to bump to the top of the conversation list.
- [x] Skip message preview (`lastMessage`) update for `verified-change` messages
      since they don’t contain any message body.
- [x] Reset last message if conversation is empty.

Fixes https://github.com/signalapp/Signal-Desktop/issues/980.
2018-04-13 14:27:02 -04:00
Daniel Gasienica
5f8148d3da Bind to Conversation lazily to prevent style guide errors 2018-04-13 14:26:01 -04:00
Daniel Gasienica
560cc4e149 Set dynamic parameter last 2018-04-11 19:46:23 -04:00
Daniel Gasienica
0daccee209 Enable TSLint Mocha rules 2018-04-11 19:45:48 -04:00
Daniel Gasienica
9d159da79c Add Microsoft contributed TSlint rules: tslint-microsoft-contrib 2018-04-11 19:45:31 -04:00
Daniel Gasienica
0902c94093 Reset last message after message has expired
Fixes #980.
2018-04-11 19:34:21 -04:00
Daniel Gasienica
ad05efb7a0 Expose Signal.Types.Conversation 2018-04-11 19:34:21 -04:00
Daniel Gasienica
44debd123d Add basic implementation of Conversation.updateFromLastMessage 2018-04-11 19:34:21 -04:00
Daniel Gasienica
cca5db3237 Remove unused import 2018-04-11 19:25:38 -04:00
Daniel Gasienica
1659354f51 Expand Message type definitions 2018-04-11 19:25:38 -04:00
Daniel Gasienica
b50c55172d Add MIME type 2018-04-11 19:25:38 -04:00
Daniel Gasienica
65bf34d1b8 Add basic Attachment type definition 2018-04-11 19:25:38 -04:00
Daniel Gasienica
fa36e1b7a7 Configure EditorConfig for TypeScript 2018-04-11 19:25:38 -04:00
Daniel Gasienica
f25a579f32 Add basic Message type definition 2018-04-11 19:25:38 -04:00
Daniel Gasienica
9513e90a84 Fix TS error regarding window 2018-04-11 19:25:30 -04:00
Daniel Gasienica
bcd3e26377 Fix TS warning about appendChild 2018-04-11 19:25:30 -04:00
Daniel Gasienica
27f205e0a3 Fix TS error regarding SharedArrayBuffer 2018-04-11 19:25:30 -04:00
Daniel Gasienica
3a05201501
Improve URL Auto-Linking In Messages (#2240)
As a user, I’d like the app to autolink as many possible URL formats I write in
messages as possible, e.g.

- [x] URLs without protocol: `github.com`
- [x] URLs with in different languages (Unicode):
  - [x] `https://zh.wikipedia.org/zh-hans/信号`
  - [x] `https://ru.wikipedia.org/wiki/Сигнал`
- [x] URLs with single quotes: `https://www.example.com/this-couldn't-be-true`
- [x] Messages with URLs right after special characters:
      `wink ;)https://www.youtube.com/watch?v=oHg5SJYRHA0`
- [x] URLs with square brackets:
      `https://www.example.com/test.html?foo=bar&baz[qux]=quux`
- [x] **Infrastructure:** Include TypeScript files in build.
- [x] **Infrastructure:** Rename `ts/test` to `ts/styleguide`.
- [x] **Infrastructure:** Decouple linting from testing.
- [x] **Infrastructure:** Run all tests in CI.
- [x] **Infrastructure:** Compile TypeScript on CI.

### Dependencies
- Forked `link-text` to disable HTML escaping: It only has the minimum required
  dependencies:
    - `linkify-it`: Best-in-class link detection library with support for
                    Unicode/IDN. Popular alternative: `linkifyjs`.
                    Doesn’t handle Unicode in URLs.
    - ~~`escape-html`: Standalone dependency for escaping HTML.~~
    - `uc.micro`: Standalone dependency of Unicode data files.

### Known Issues

We don’t auto-link trailing exclamation points which in most cases would be
expected to be part of the message body rather than the link.
**Counterexample:** `https://en.wikipedia.org/wiki/Mother!`.
N.B. GitHub doesn’t do this right either.

Fixes #598.
2018-04-11 17:31:16 -04:00
Daniel Gasienica
55fc21505e Rename ts/test to ts/styleguide 2018-04-11 16:36:42 -04:00
Daniel Gasienica
96c07c6373 Bump timeout of debuglogs test 2018-04-11 16:36:42 -04:00