`npm run icon-gen` builds icon files from png files in the images
directory, outputting to build/icon.{ico,icns} (the expected location
for electron-builder).
// FREEBIE
Just use the english locale for now. Load locale data from the
filesystem in the main process and pass it to the renderer preload
script via ipc. Note that we need the locale data to be available by the
time view scripts are loaded.
// FREEBIE
Set NODE_ENV at run time or build time to switch the app between dev and
production modes.
At build time, the current NODE_ENV will be included in the packaged
app's package.json file. At runtime we read NODE_ENV from package.json,
but also allow the local environment variable to override. A query
string parsed by a preload script exposes the value to the renderer,
which then determines whether we use the staging or production server.
Additionally, different environments have different user data
directories.
// FREEBIE
It is also important to set the Application User Model ID (AUMID) to the
appId of the application, in order for notifications on Windows 8/8.1 to
function and for Window 10 notifications to display the app icon within
the notifications by default. The AUIMD should be set within the Main
process and before any BrowserWindows have been opened, it is normally
the first piece of code executed.
https://github.com/electron-userland/electron-builder/wiki/NSIS#guid-vs-application-name
// FREEBIE
Nothing stops us from rendering the inbox in the background page, since
it is no longer a background page at all. TODO: intercept window close
events to hide this window instead of closing it unless the app is quit
explicitly.
// FREEBIE
In package.json, define our main entry point for electron, and add a
node script to start it up.
Add main.js from Electron/electron-quick-start with two modifications.
1. Load background.html instead of index.html
2. Disable node integration in the renderer
At this point we can load the background page in a window
with `npm start`, though it currently breaks on missing chrome app APIs.
// FREEBIE
Force full contact/group import on next launch if not first run (#1476)
Performance: Log entry max to 2k, less logging in hot codepaths (#1459)
Don't show notification for verified state change with yourself (#1454)
Export: Improve usability - timing expectations, install button (#1474)
Add Transifex config to git to unblock Electron localization (#1477)
Large localization update
FREEBIE
Because export might take a couple minutes, we now set expectations
that it might take 'several minutes' instead of just 'please wait.'
We also promote 'Install new Signal Desktop' from a text link in the
instructions to a button. This is important on the 'Completed' screen
because it is bigger and to the left of the 'Export Again' button, which
previously drew primary focus on that screen.
Lastly, we also remove the title-specific element of the support link,
so we're resilient to title changes in the future.
FREEBIE
On a recent trip through a CPU profile taken while Signal Desktop
churned through a large backlog of messages, it was clear that
console.log was a major source of time spent, primarily the sort
operation required after every new entry is added to the Backbone
collection. So, three different techniques to combat this:
1) Reduce the maximum number of entries in the collection from 5k to 2k
2) No more logging of add/update/remove queue in MessageReceiver
3) No more log entries in Message.handleDataMessage main codepath
FREEBIE
* Don't show notifications for verified state change with yourself
It's confusing to users, and it really doesn't mean anything anyway.
FREEBIE
* Add log statement that we've suppressed a verified notification
FREEBIE
Fix bug causing contact and group names/colors to be lost (#1437)
Fix broken Swedish translation preventing new installs
(8caecd50cd)
Fix clear message bubbles when adding contact with previous messages
in iOS (#1438)
Fix message bubble widths on horizontal resizes (#1447)
Remove horizontal scrolling in convo/message lists (#1448)
Update translations for hr, pt_BR and sv
(8dca9c9b8f)
Export (still behind a flag):
- Limit attachment filename length for Windows path limits (#1439)
- Reintroduce conversation last-contact date in directory name (#1439)
Add tests for export utility functions (#1439)
FREEBIE
Max-width on a message bubble should be about 30em for the good readability.
However, when the window isn't wide enough, bubbles must be further limited.
The transition should happen around the point that these two rules intersect,
but it was kicking in a little late, which caused the bubbles to jump from wider
to shorter as you widened the window past a certain point. This change adjusts
the threshold for smoother and more consistent bubble resizing.
The variable name $big-avatar-min-width is an artifact of a past design and was
previously used in multiple places, but it no longer makes sense in this context
so it has been discarded.
// FREEBIE
* Export: limit attachment names to 30 chars, tests for helper fns
Also, reintroduce last contact date in conversation dir name
FREEBIE
* MessageView tests: Fix failures during blanket coverage run
FREEBIE
When we relied on the actual value of the color property to be supplied
to the updateColor change event listener, sometimes it would be null.
Then the conversation bubbles would have no color at all, making the
text hard to read.
FREEBIE
* Fetch all conversations on startup of app, not on inbox load
A recent change to fetch conversations less didn't take into account all
that can happen in the app without the inbox loaded. That only happens
when the window is shown, and messages can come in with the app in the
background. In that case, the conversation wouldn't have been loaded
from the database, but would be saved to the database anyway, losing
data.
This change fetches all conversations as soon as the the data store is
ready for a fetch. It also introduces failsafe throws to ensure that
synchronous ConversationController accesses don't happen until the
initial fetch is complete. A new getUnsafe() method was required to
account for some of the model setup that happens during that initial
conversation fetch.
Fixes#1428
FREEBIE
* Fix tests: ConversationController.load() required before get()
FREEBIE
Fix problems with updating contact information (#1419)
Performance/reliability: Fetch conversations from DB only once (#1420)
Export bug-fixes (still behind a flag)
- Properly generate directory names for nameless groups (#1421)
- Remove " as one of the allowed characters in filenames
FREEBIE
* Fetch conversations once, clean up ConversationController API
Race conditions around re-fetching have caused some problems recently,
so this removes the need to re-fetch conversations. They are fetched
once or saved once, and that is it. All interaction goes through the
ConversationController, which is the central source of truth.
We have two rules for Conversations:
1. If a conversation is in the ConversationController it doesn't need
to be fetched, but its initial fetch/save might be in progress. You
can wait for that fetch/save with conversation.initialPromise.
2. If a conversation is not already in the ConversationController, it's
not yet in the database. It needs to be added to the
ConversationController and saved to the database.
FREEBIE
* Remove Conversation.fetch() call in Message.handleDataMessage()
FREEBIE
* ConversationController.API cleanup: Fix two missing spots
FREEBIE
When processing a contact sync with embedded identity key verification info, we
were running overlapping async fetch/save operations on the same conversation
model, causing a race that tends to clobber updates to the contact info.
In this change we extend the application-level contact info handler to block on
a subsequent call to the verification handler, which effectively serializes the
fetch/save calls, and relieves the need for the message receiver to trigger a
seperate event concerning the verification info on contact sync messages.
Fixes#1408
// FREEBIE
Properly handle update of blocked numbers sync'd from mobile
device (#1411)
Fix some bugs with migration to Electron (still behind a flag)
- Dark Theme: Increase banner text contrast for legibility (#1415)
- Better disambiguate conversation directory names (#1409)
- Handle long group or contact names (#1402)
- Redact group ids in export logging (#1402)
Better logging
- Don't log expiration if queued task threw an error (#1412)
- Additional error handling/logging during contact sync (#1395)
Remove unknown group messages from cache - no need to retry! (#1414)
Update a large number of strings via transifex (#1403)
FREEBIE