[SailfishOS] Chat view overhaul: tracking issue
This is a tracking issue for the ongoing overhaul of the main conversations view and related pages.
Related MRs: !110 (merged), !129 (merged)
To do first:
-
implement showing attachments in a simple fashion to be on par with the old implementation (done in !110 (merged)) -
open a tracking issue for all these tasks (#256) -
replace ContactModel
with Sailfish contacts (!110 (merged))
Message view:
-
use docked chat input field (!110 (merged)) -
hide input field while scrolling etc. (!110 (merged)) -
only allow quickly scrolling to the bottom instead of both directions (this only makes sense when the model supports lazy loading, #105 (closed)) -
improve overall performance; scrolling should go smooth -
emoji selector for emoji reactions
Message view sections:
-
basic section based on timestamp (!110 (merged)) -
[section] date (above the first message of a day) (!110 (merged)) -
sticky section (has to be better than in jolla-messages in SFOS 4) -
the model needs a new role namedQML automatically already sections the messages by daysection
containing an ISO formatted date string with the day of each message (e.g.2021-02-22
)
Special/service messages:
-
service message, optionally with icon (!110 (merged)) -
service message with link to docs / details (!110 (merged)) -
[fake message] "XX unread messages" above the first (oldest) unread message -
[message] "missed call" etc. (!110 (merged)) -
[message] "fingerprint changed" (!110 (merged)) -
[message] "secure session reset" (!110 (merged)) -
[message] "xx joined the group" (!110 (merged)) -
[message] "xx left the group" (!110 (merged)) -
... (extend this list when service messages are implemented in the model)
Message delegate:
-
plain text (!110 (merged)) -
linked text: e.g. phone numbers, urls, etc. (is this possible while still enforcing plain text?) (!110 (merged)) - [-]
@-mentions(has to be implemented in a custom text parser) -
emoji reactions (<- custom emoji selector) (menu item prepared in !129 (merged)) (!468 (merged)) -
body_ranges
i.e. formatted text; bold, italic, strikethrough, monospace, spoilers -
color emojis (setting for system style or custom style; see below) (!110 (merged)) -
timestamp (!110 (merged)) -
sent/received/read markers (!110 (merged)) -
clickable links (!110 (merged)) -
link previews, maybe OpenGraph -
[group] sender name / nickname / number (!110 (merged)) - [-]
[group] other sender's profile pictures(needs a lot of limited screen space) -
[group] clickable sender name (opens contact page) (!110 (merged)) -
attachments -> see below (!110 (merged)) -
shorten long messages, "read more..." (!110 (merged)) -
debug info (message id) (!110 (merged)) -
quoted message (!110 (merged)) -
jump to quoted message on click (!110 (merged))
bugs:
-
some places rely on identifying contacts based on phone numbers; we shouldn't do that -
check if SFOS 4 has "image://theme/icon-s-blocked" - 3.4 doesn't, so we use our own icon for
failed
messages
- 3.4 doesn't, so we use our own icon for
-
if all states are implemented and used, then we should change the default state to 'failed'; until then the default has to be 'queued' to prevent a new message's icon to jump from 'failed' to 'received'
-> Message actions (context menu? custom mechanic?)
-
reply to message (-> custom mechanic) (!110 (merged)) -
UI for: forward message (!129 (merged)) -
backend for: forward message -
delete message (!129 (merged)) -
copy message (!129 (merged)) -
select message(s) (!129 (merged)) -
clear selection (!129 (merged)) -
basic UI for: show message info (-> if only one message is selected) -
message info page -> see below -
resend failed message (-> only if it failed, not if it is queued) (!129 (merged)) -
react (emoji) (-> custom mechanic?)(context menu item in !129 (merged)) [emoji selector and delegate tracked above] - [-]
open attachment externally- not possible for multiple attachments, has to be handled in the message delegate
-
export attachment - also possible for multiple* attachments
-> Message info (separate page) (#428 (closed)) :
-
message -
sent timestamp -
received timestamp -
read timestamp(s) (available? -> need(s) to be exposed) -
sent from / to -
groups and 1:1... -
debug info (message id)
-> Attachment delegates:
-
-> single (!110 (merged)) -
-> multiple (cf. #51 (closed), #11 (closed)) (!110 (merged)) -
image (!110 (merged)) -
video (note: not fully functional, may be related to #158 (closed)) (!110 (merged)) -
gif (!110 (merged)) -
audio (!110 (merged)) -
sticker (what mime type? custom/variable size?) -
single emoji -> should be bigger, heart can be pounding, etc. (!110 (merged)) -
document (!110 (merged)) -
contact / vcf (!110 (merged)) -
-> separate contact preview page (!110 (merged)) -
-> separate attachments page for many attachments -
location (show a map etc.) -
voice note
bugs:
-
distinguish between voice notes and attached audio files -
play audio inline (probably blocked by #255, #245 (closed)) -
show contact name from file; this requires parsing the file -
handle missing files and failed thumbnails -
show thumbnails for video files (#255) -
adapt attachment to screen orientation, i.e. make/keep them smaller in horizontal mode -
show retry/resend icon -
show attachment upload progress -
show list of all attachments for >5 images or >2 documents -
show image details (metadata, file path, ...) etc., and actions, on an attached page
from !175 (comment 565323253): More plausible would be something like the gallery overlay in Jolla's gallery app: swipe left and right to go through images, swipe up and down to close the overlay, tap an icon (yeh I know) to get a details page.
-> separate contact preview page:
-
show vcf file contents using system pages (!110 (merged)) -
save to address book (!110 (merged)) -
directly share to other apps (UI is ready but crashes) (!110 (merged)) -
investigate why sharing a VCF file crashes Whisperfish (it doesn't anymore)
-> separate image/video (media) view pages:
-
show some info on an attached page -
save to somewhere -
share with other apps -
delete locally -
forward to contact(s) -
simple video controls -
don't auto play (#255, #264) -
maybe use a popup instead of a separate page? -
investigate: is it possible to use the system gallery page? (we're out of Harbour anyways...)
Input bar:
-
emoji selector next to input field ( or use emoji keyboard -- but I would like to support different emoji sets) -
gif selector (giphy?) -
stickers selector -
attachment selector (!110 (merged)) -
select multiple attachments at once (use MultiContentPickerDialog
) (!110 (merged)) -
select and send a contact -
open camera directly (#7 (closed) ?) -
record voice note directly (!520 (merged) / !521 (closed)) -
[current bug] fix spacing between input field and latest message (!110 (merged)) -
show preview of replied message (!110 (merged)) -
jump to quoted message on click (!110 (merged)) -
only visible when needed (cf. ListView::headerPositioning
,ListView.PullBackHeader
) (!110 (merged))
bugs:
-
preview quoted attachments (show a small thumbnail of the first attachment) (!110 (merged)) -
adapt maximum height based on screen size
Page header:
-
profile picture (!110 (merged)) -
saved contact name OR nickname OR phone number (whichever is available) (!110 (merged)) -
start video call -> on attached page -
start voice call -> on attached page -
search
For 1:1 chats
(Attached pages are also subject of !105 (closed) and #215 (closed).)
Attached page:
-
enable self-destroying messages (for ... time) (!524 (merged)) -
list of all media contents (attachments) -> new page -
conversation settings -
show current time for self-destroying messages (!524 (merged))
-
-
search -
reset secure session (requires debug mode) -
mute (in SessionDelegate) -
add to contacts (!141 (merged) ...)
For groups
Attached page:
-
leave this group (!110 (merged)) -
create invitation link (!110 (merged)) -
add member (!110 (merged)) -
show profile pictures (!110 (merged)) -
direct message to member (!110 (merged)) -
add unknown member to contacts (!110 (merged)) -
link unknown member to existing contact (!110 (merged)) -
directly verify fingerprint (!110 (merged)) -
show member's contact page (!110 (merged)) -
admin: remove member from group (!110 (merged)) -
group name (!110 (merged)) -
description (!110 (merged)) -
group avatar (!110 (merged)) -
wallpaper / background (!110 (merged)) -
mute (in SessionDelegate) -
search members -
list of all media contents (attachments) -> new page -
customize notifications (@-mentions, sound, vibration) -
enable self-destroying messages (for ... time) (!524 (merged)) -
admin: who can add members? -
admin: who can change group details? (description etc.) -
admin: enable group links? -
search
bugs:
-
clean up code after #223 (closed) -
use message id instead of index, requires a new model method (!416 (merged))
Emojis
Parsing and inserting emojis is currently done in Javascript hased on twemoji. This is slow and cumbersome and should optimally be done in rust using a custom parser for LinkedText
(see below).
The current system supports different emoji styles which have to be installed to ~/.local/share/sailor-emoji/
by the user.
Supported styles:
- Sailfish's system emojis
- OpenMoji (https://openmoji.org/)
- Twitter emojis (https://github.com/twitter/twemoji)
- emojis downloaded from Emojipedia (currently WhatsApp and Apple (Signal for Android), others?)
bugs:
-
If we decide to "officially" support Openmoji emoji art, we should tell them on Github. There appear to be some bugs with a few graphics that maybe could be ironed out, too (it they're not caused by Qt). -
make emoji styles fully configurable (the current implementation requires styles to be registered in qml/js/emoji.js
) -
We should provide a way for users to download emoji sets to WF's directory in $HOME/.local/share (in-app for open sets, and a guide for proprietary sets). -
We need an entry in the settings page to configure the emoji style -
We need to be able to auto-detect installed emoji sets first
-
-
handle missing icons/characters instead of showing an empty space (should be done in the custom parser) -
Add support for Apple emojis that Signal uses (!276 (merged)) -
investigate the emoji keyboard (sources) -
move emojis to a shared path ( sailor-emoji
) (!110 (merged))
2021-02-28 update:
I wrote a patch (https://openrepos.net/content/ichthyosaurus/patch-stock-emoji-keyboard-colors) for full emoji support in the stock emoji keyboard. It has a settings page and I'm planning to document its dconf
configuration keys to make them "standardized". Apps like Whisperfish can then simply read the dconf
key (using Nemo.Configuration
, ConfigurationValue
) and decide which style to use. More in #250 (closed).
- do we still need an entry in the settings page of Whisperfish? (we can't require users to install a patch...)
- we don't have to provide emoji sets through Whisperfish, we only point to the documentation
Rust tasks
-
Custom text parser: escape rich text, detect and linkify urls and phone numbers, include emojis as <img>
elements, convert Markdown-like markup to rich text, @-mentions (likeLinkedText
and the privateLinkParser
but customized) -
check for missing emoji icons when parsing, only include existing icons and keep the system font for the rest -
make emoji style configurable (requires a new setting) -
implement emoji reactions (#99) -
implement service messages (instead of saving/showing them as empty messages); the service message type should be exposed as an enum
-
treat attachments of type text/x-signal-plain
as very long messages, i.e. don't save them as attachments but save and expose the message text plus the attachment contents as message to the UI -
implement replies / quoted messages (must be a QObject
with these properties: message, source, outgoing (outbound), message id, (index) -
actually show profile pictures (requires #192 (closed), #154 (closed), #204) -
implement message sections (date, see above) -
implement fake service message for the unread boundary, i.e. right above the oldest unread message -
for quoted messages: we need a method to get an index
for a messageid
(e.g.MessageModel.indexFromId(mId)
) -
send on click or send on press-and-hold (UI is there, requires #189 and setting send_on_click
) -
implement multiple attachments in the model; ideally we have two lists (attachments with thumbnails and attachments with details, i.e. image/video and everything else); the UI expects a list of objects like: [{ data: modelData.attachment, type: modelData.mimeType }]
-
implement shared locations -
implement receiving shared contacts -
implement sharing contacts (works from People app already) -
actually use 'queued' state for messages in MessageModel
(#183, #105 (closed)) -
implement 'failed' state for messages in MessageModel
(#183, #105 (closed)) -
expose read state of a message per peer (e.g. in groups; #238) -
...
Considerations
- The page header should be sticky so the user always sees who's on the other side.
- A
PullDownMenu
is not useful even with a sticky page header. The user would have to reach to the top of the page to open it. We should use the attached page (currentlyGroup.qml
and (?)) instead. - A
PushUpMenu
may be useful. Maybe even as emoji selector...? [-> Or advise users to use the emoji keyboard for this -- @ Nathan] - It is possible to attach another page to the attached page. (Yes. @direc85) This could be useful: first swipe from the conversations view -> contact details and settings; second swipe -> fingerprint verification
- We should try to stick to the swipe mechanics - this is what sets Sailfish apart (even though Jolla appears to slowly move away).
- We should implement "tutorial" hints using
InteractionHint
to help users discover all features - ...