Commit Graph

65 Commits (4a482243d0ea372b3d01f50679d11810882891f1)

Author SHA1 Message Date
lilia 4a482243d0 Simplify event arguments
// FREEBIE
10 years ago
lilia 960754ef04 Restyle compose button
Move it to a tool bar at the top of the conversation list. This is also
where a search bar will live someday.

Fixes #357

// FREEBIE
10 years ago
lilia 90e9216e19 Add UI for submitting debug logs
Fixes #343

// FREEBIE
10 years ago
lilia fa0e2584f4 Fix new threads not appearing at top of inbox
When messages from someone not in your inbox arrived, that thread would
appear at the bottom of the inbox instead of the top.

// FREEBIE
10 years ago
lilia a390e37abc Fixup change:active_at handling when setting null
When a conversation goes from active to not active, it should be removed
the view rather than promoted.

// FREEBIE
10 years ago
lilia bd5f43bdb1 Avoid excessive re-rendering of the inbox list
This listener is doing way more work than necessary to update the dom by
removing all the list items and re-creating them. This also causes the
bug where selected state is cleared when new messages arrive, not to
mention binding new event listeners without unbinding the old ones.

Fix by simply promoting an element to the top of the list when it's
active_at value changes, rather than re-rendering the whole list. This
could backfire if the value gets changed to an earlier timestamp but for
now we assume that won't happen.

// FREEBIE
10 years ago
lilia 1a30d003f5 Fetch group contacts before fetching new messages
Messages must wait for sender info to arrive before rendering.

// FREEBIE
10 years ago
lilia 756875f235 Refactor inbox collection listeners
Create a new collection type for the inbox which listens to events on
the main conversation cache. Also don't reload conversation info from
the database as often or when unnecessary.

Fixes #345

// FREEBIE
10 years ago
lilia f764445c86 Remove erroneous license file and headers
We only use GPLV3 around here.

// FREEBIE
10 years ago
lilia 21aaf0fab5 Clean up notification and unread indicator behavior 10 years ago
lilia baa55c9018 Refactor for less model duplication 10 years ago
lilia c4eac76032 Fix for new contact button bug 10 years ago
lilia 17051cef9d Only add loading class from inbox 10 years ago
lilia d07357ce9a Retool various sub-screens to fit two-column layout 10 years ago
lilia bcec207674 Mark read when opening a conversation 10 years ago
lilia d6a4e6e496 Restore two column layout
Establishes basic functionality for viewing conversations in two column
mode, including message area and message list resizing, and maintaining
scroll position.

Various subviews need to be retooled but are more or less still
functional, i.e., new message, message detail, key verification, etc...
10 years ago
lilia 00dfcbb462 Change websocket closed message 10 years ago
lilia 82de8148d2 Reload harder
Refreshing the background page does re-open the socket, but the inbox
and other windows don't reattach correctly. Reload the whole runtime to
force close all windows, reload the background, and re open the inbox.
10 years ago
lilia ac401c78b3 Fix socket status indicator
It was not correctly reporting the status after a background page reload.
10 years ago
lilia cdb7fcfbad Pass windows around to let file inputs work 10 years ago
lilia 95f8e3921c Keep inbox window open, but allow it to be hidden
As a chrome packaged app, we have to keep at least one window open in
order to maintain our websocket connection in the background page.

This change replaces the system window frame with custom buttons in the
inbox header, such that the 'close' button merely hides the window
rather than unloading it.

Fixes #237
FREEBIE
10 years ago
lilia 7afd0a02e8 Convert beforeunload listeners 10 years ago
lilia 76e170686a Make getBackground async 10 years ago
lilia 5d4298697c Use view.$ shorthand for scoped jquery searches
Wish I'd noticed that one earlier. http://backbonejs.org/#View-dollar
10 years ago
lilia 5ffa265559 Revert "Popout inbox"
This reverts commit 31e7d285e3.

This seemed like a nice feature, but the popup bubble isn't very
conducive to nontrivial user inputs, e.g. file inputs.

Fixes #211
10 years ago
lilia 31e7d285e3 Popout inbox
Rather than opening the inbox in its own window, let it appear as a
browser action popup by default, but allow promotion to its own window
if requested.
10 years ago
lilia 019a9d1fbc Unread counts
Update unreadCounts per-conversation on incoming messages. Render unread
conversations with font-weigh: bold in the inbox view.

To ensure that the inbox and conversation views remain in sync, the
background page now ensures that the same models objects are used for
both views.
10 years ago
lilia c73f4d71a7 DRY up scrollable pattern
Switch to using gutter class instead of id since there is potentially
more than one usage on the page.
10 years ago
lilia a72ea7966d Clean up inbox/compose view rendering and swapping
Templatize the inbox view and use the same pattern for in-window view
switching as is now used with the conversation/message detail views.
This means doing more with markup and less jquery manipulation of
individual subelements of the inbox view.
10 years ago
lilia fd6e2954f7 Curtail over-zealous websocket reconnects
Closes #173

Previously, in the event of a failed websocket auth, we would attempt to
reconnect once a second ad infinitum. This changeset ensures that we
only reconnect automatically if the socket closed 'normally' as
indicated by the code on the socket's CloseEvent. Otherwise, show a
'Websocket closed' error on the inbox view.

Ideally we would show a more contextual error (ie, 'Unauthorized'), but
unfortunately the actual server response code is not available to our
code. It can be observed in the console output from the background page,
but programmatically, we only receive the WebSocket CloseEvent codes
listed here:
https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes

The websocket error message is displayed by a normally-hidden but ever
present socket status element. Clicking this element will immediately
refresh the background page, which will try again to open the websocket
connection.
10 years ago
lilia 368cd2f79a Refactor back button style
Make it easier to reuse these styles.
10 years ago
lilia 3292177a96 Remove resize logic in favor of pure css 10 years ago
lilia 955ef60292 Fix list_view-related error in background page
Background page conversations were trying to trigger events on the inbox
list view which had been destroyed, resulting in a background page
console error of "can't read innerHeight of null".

Avoid this by removing listeners when the inbox window is closed.
10 years ago
lilia 44b1e5c88e Move inbox collection to the background page
No more waiting, no more messy fetch logic. Background page
bootstraps the inbox and keeps it up to date.
10 years ago
lilia d5c85dfbd8 Resize inbox listview after it finishes loading
Ensures that scrollbars are properly setup on load.
10 years ago
lilia 3a099657e6 Untangle select vs open events 10 years ago
lilia 746e6530b9 WIP pill view for selected recipients 10 years ago
lilia 9e245e67e0 Fix double-opening exsisting conversations from typeahead 10 years ago
lilia aca3db97da New messages auto-update the inbox & conversation
When a new message arrives, if its conversation is not already opened,
the background page opens it. If it is alrady open the window is
focused. Finally, the 'message' event is triggered, resulting in
   1. the inbox refetches conversations
   2. all conversations fetch new messages

TODO: only send this event to the target window
10 years ago
lilia db5e7fd6b6 Fix list view scrolling
Resize handlers are ugly. But not as ugly as scroll handlers. :p
Normalized some whitespace along the way.
10 years ago
lilia a00632c728 Hook up group creation flow UI
Checkboxes add and remove members as well as exposing the group update
ui. The conversation window is opened after saving the group.
10 years ago
lilia 87cd3f5053 Save and open new contact on click 10 years ago
lilia 17f3263a21 Listen for escape key anywhere in the inbox 10 years ago
lilia 070393170c Auto-focus new conversation input field 10 years ago
lilia b1ad04298f Add title bar label to new conversation view 10 years ago
lilia d26dc8c7e6 Move openConversation handler to InboxView
Removes the background page ref to inbox which should fix view tests.
Prep for handling new contact creation.
10 years ago
lilia 9a6c6bcd98 Reset the typahead before showing it 10 years ago
lilia 6d81011f6a Add back button to compose view 10 years ago
lilia fedfdcdd7e Style elements for compose flow 10 years ago
lilia 00e9e3b757 Setup loading gif on conversation list
TODO: get actual gif asset in there.
10 years ago