flutter_app/SPEC.md

145 lines
5.5 KiB
Markdown
Raw Permalink Normal View History

2021-03-01 23:39:27 +00:00
# Specification
This document outlines the minimal functionality necessary for us to consider Flwtch the canonical
Cwtch UI implementation.
This functionality is implemented in libCwtch and so this work captures just the UI work
required - any new Cwtch work is beyond the scope of this initial spec.
2021-03-03 00:42:44 +00:00
# Functional Requirements
- [ ] Kill all processes / isolates on exit (Blocked - P1)
2021-06-16 21:25:08 +00:00
- [X] Android Service? (P1)
2021-03-03 00:42:44 +00:00
2021-03-02 00:31:24 +00:00
# Splash Screen
- [X] Android
- [X] Investigate Lottie [example implementation blog](https://medium.com/swlh/native-splash-screen-in-flutter-using-lottie-121ce2b9b0a4)
- [ ] Desktop (P2)
2021-03-01 23:39:27 +00:00
2021-03-03 00:42:44 +00:00
# Custom Styled Widgets
2021-06-16 21:25:08 +00:00
- [X] Label Widget
2021-03-03 00:42:44 +00:00
- [X] Initial
2021-06-16 21:25:08 +00:00
- [X] With Accessibility / Zoom Integration (P1)
2021-03-03 00:42:44 +00:00
- [X] Text Field Widget
- [X] Password Widget
2021-03-04 22:08:53 +00:00
- [X] Text Button Widget (for Copy)
2021-03-03 00:42:44 +00:00
2021-03-01 23:39:27 +00:00
## Home Pane (formally Profile Pane)
2021-03-02 00:09:04 +00:00
- [X] Unlock a profile with a password
2021-03-03 00:42:44 +00:00
- [X] Create a new Profile
2021-03-02 00:09:04 +00:00
- [X] With a password
2021-03-03 00:42:44 +00:00
- [X] Without a password
2021-03-02 00:09:04 +00:00
- [X] Display all unlocked profiles
- [X] Profile Picture
- [X] default images
- [ ] custom images (P3)
2021-06-16 21:25:08 +00:00
- [X] coloured ring border (P2)
- [X] Profile Name
2021-03-02 00:09:04 +00:00
- [X] Edit Button
2021-06-16 21:25:08 +00:00
- [X Unread messages badge (P2)
2021-03-02 00:09:04 +00:00
- [X] Navigate to a specific Profile Contacts Pane (when clicking on a Profile row)
- [X] Navigate to a specific Profile Management Pane (edit Button)
- [X] Navigate to the Settings Pane (Settings Button in Action bar)
2021-03-01 23:39:27 +00:00
## Settings Pane
2021-03-10 17:43:33 +00:00
- [X] Save/Load
2021-03-02 00:09:04 +00:00
- [X] Switch Dark / Light Theme
2021-03-10 17:43:33 +00:00
- [X] Switch Language
2021-03-16 19:56:53 +00:00
- [X] Enable/Disable Experiments
- [ ] Accessibility Settings (Zoom etc. - needs a deep dive into flutter) (P1)
2021-03-10 17:43:33 +00:00
- [X] Display Build & Version Info
- [X] Acknowledgements & Credits
2021-03-01 23:39:27 +00:00
## Profile Management Pane
2021-03-02 00:09:04 +00:00
- [X] Update Profile Name
2021-03-04 23:09:33 +00:00
- [X] Update Profile Password
2021-06-16 21:25:08 +00:00
- [X] Error Message When Attempting to Update Password with Wrong Old Password (P2)
- [ ] Easy Transition from Unencrypted Profile -> Encrypted Profile (P3)
2021-06-16 21:25:08 +00:00
- [X] Delete a Profile (P2)
- [X] Dialog Acknowledgement (P2)
- [X] Require Old Password Gate (P2)
- [X] Async Checking of Password (P2)
2021-03-04 22:08:53 +00:00
- [X] Copy Profile Onion Address
2021-03-01 23:39:27 +00:00
## Profile Pane (formally Contacts Pane)
2021-03-02 00:09:04 +00:00
- [X] Display Profile-specific status
- [X] Profile Name
- [X] Online Status
- [X] Add Contact Button Navigates to Add Contact Pane
- [ ] Search Bar (P2)
2021-03-02 00:22:51 +00:00
- [ ] Search by name
- [ ] Search by Onion
2021-03-01 23:39:27 +00:00
- [ ] Display all Peer Contacts
2021-03-02 00:09:04 +00:00
- [X] Profile Picture
- [X] Name
- [X] Onion
- [X] Online Status
2021-06-16 21:25:08 +00:00
- [X] Unread Messages Badge (P1)
- [X] In Order of Most Recent Message / Activity (P1)
- [X] With Accept / Reject Heart/Trash Bin Option (P1)
- [X] Separate list area for Blocked Contacts (P1)
- [X] Display all Group Contacts (if experiment is enabled)
2021-03-02 00:09:04 +00:00
- [X] Navigate to a specific Contact or Group Message Pane (Contact Row)
- [X] Pressing Back should go back to the home pane
2021-03-01 23:39:27 +00:00
## Add Contact Pane
- [X] Allowing Copying the Profile Onion Address for Sharing
- [X] Allowing Pasting a Peer Onion Address for adding to Contacts
- [ ] (with optional name field)
2021-06-16 21:25:08 +00:00
- [X] Allowing Pasting a Group Invite / Server Address
- [X] (if group experiment is enabled)
2021-03-01 23:39:27 +00:00
2021-03-02 00:22:51 +00:00
## Message Overlay
2021-03-01 23:39:27 +00:00
2021-03-02 00:09:04 +00:00
- [X] Display Messages from Contacts
2021-06-16 21:25:08 +00:00
- [X] Allowing copying the text of a specific message (on mobile) (P2)
2021-03-02 00:09:04 +00:00
- [X] Send a message to the specific Contact / Group
- [~] Display the Acknowledgement status of a message (P1)
2021-06-16 21:25:08 +00:00
- [X] Navigate to the specific Contact or Group Settings Pane ( Settings Button in Action bar)
- [ ] Emoji Support (P1)
- [ ] Display in-message emoji text labels e.g. `:label:` as emoji. (P1)
- [ ] Functional Emoji Drawer Widget for Selection (P2)
- [ ] Mutant Standard? (P2)
2021-06-16 21:25:08 +00:00
- [X] Display a warning if Contact / Server is offline (Broken Heart) (P1)
- [X] Display a warning for configuring peer history (P2)
2021-03-02 00:09:04 +00:00
- [X] Pressing Back should go back to the contacts pane
2021-03-01 23:39:27 +00:00
## List Overlay (P3)
- [ ] Add Item to List (P3)
- [ ] mark Item as Complete (P3)
- [ ] Delete Item from List (P3)
- [ ] Search List (P3)
2021-03-02 00:22:51 +00:00
## Bulletin Overlay (P4)
2021-03-02 00:22:51 +00:00
2021-03-01 23:39:27 +00:00
## Contact Settings Pane
- [X] Update local name of contact
- [X] Copy contact onion address
- [X] Block/Unblock a contact
- [X] Configure Peer History Saving
2021-03-02 00:09:04 +00:00
- [X] Pressing Back should go back to the message pane
2021-03-01 23:39:27 +00:00
## Group Settings Pane (experimental - P3)
2021-06-16 21:25:08 +00:00
- [X] Gated behind group experiment
- [X] Update local name of group
- [X] Get Group Invite
- [X] Leave Group
- [X] Pressing Back should go back to the message pane for the group
2021-03-02 00:22:51 +00:00
2021-05-21 00:36:43 +00:00
## Android Requirements Notes
What are our expectations here?
- Can we periodically check groups in the background to power notifications?
- Either way we need networking in the service not the main/UI thread.
- We probably don't want to and very likely can't persist tor connections to peers indefinitely.
- Neither google nor apple are very tolerant of apps that try to create their own push message infrastructure.
- "Aside": Retrieving a CallbackHandle for a method from PluginUtilities.getCallbackHandle has the side effect of populating a callback cache within the Flutter engine, as seen in the diagram above. This cache maps information required to retrieve callbacks to raw integer handles, which are simply hashes calculated based on the properties of the callback. This cache persists across launches, but be aware that callback lookups may fail if the callback is renamed or moved and PluginUtilities.getCallbackHandle is not called for the updated callback.
- The above seems to imply that there is a persistent cache somewhere that can affect code between launches...the ramifications of this are ?!?!