[PR #1256] [MERGED] Send feature for mobile #2810

Closed
opened 2025-11-26 23:24:24 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/1256
Author: @mpbw2
Created: 2/9/2021
Status: Merged
Merged: 2/11/2021
Merged by: @mpbw2

Base: masterHead: feature-send


📝 Commits (8)

  • 323cbb0 Send feature for mobile
  • e350ea3 added fallback for KdfIterations
  • e0e7d90 additional property exclusions for tests
  • 28f2fb4 support encryptedFileData as byte array comparison in SendServiceTests
  • 9bde0b8 formatting
  • 4a216a1 requested changes
  • 643ac46 additional changes
  • 01d9e0e change position of send service registration to match declaration order

📊 Changes

49 files changed (+3776 additions, -33 deletions)

View changed files

📝 src/Android/Android.csproj (+5 -0)
src/Android/Renderers/ExtendedDatePickerRenderer.cs (+50 -0)
src/Android/Renderers/ExtendedTimePickerRenderer.cs (+50 -0)
src/Android/Renderers/SendViewCellRenderer.cs (+199 -0)
src/Android/Resources/drawable/paper_plane.xml (+9 -0)
src/Android/Resources/layout/SendViewCell.axml (+96 -0)
📝 src/Android/Resources/values/styles.xml (+0 -7)
📝 src/App/App.csproj (+4 -0)
src/App/Controls/ExtendedDatePicker.cs (+86 -0)
src/App/Controls/ExtendedTimePicker.cs (+86 -0)
src/App/Controls/SendViewCell/SendViewCell.xaml (+124 -0)
src/App/Controls/SendViewCell/SendViewCell.xaml.cs (+110 -0)
src/App/Controls/SendViewCell/SendViewCellViewModel.cs (+16 -0)
📝 src/App/Models/PreviousPageInfo.cs (+1 -0)
src/App/Pages/Send/SendAddEditPage.xaml (+340 -0)
src/App/Pages/Send/SendAddEditPage.xaml.cs (+228 -0)
src/App/Pages/Send/SendAddEditPageViewModel.cs (+510 -0)
src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml (+158 -0)
src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml.cs (+188 -0)
src/App/Pages/Send/SendGroupingsPage/SendGroupingsPageListGroup.cs (+35 -0)

...and 29 more files

📄 Description

Overview

Added Send feature to mobile UI

Files Changes/Added

Android:

  • ExtendedDatePickerRenderer.cs: NEW: Renderer for ExtendedDatePicker
  • ExtendedTimePickerRenderer.cs: NEW: Renderer for ExtendedTimePicker
  • SendviewCellRenderer.cs: NEW: Renderer for the Sends ListView
  • paper_plane.xml: NEW: Send logo vector drawable
  • SendviewCell.axml: NEW: Layout file for each Send ListView item
  • styles.xml: Removed legacy styling that was interfering with Date & Time Picker themes
  • Android.csproj: System modified to add renderers and resources

App:

  • SendviewCell.xaml: NEW: Layout file for each Send ListView item
  • SendViewCell.xaml.cs: NEW: Code behind for each Send ListView item
  • SendViewCellViewModel.cs: NEW: ViewModel for each Send ListView item
  • ExtendedDatePicker.cs: NEW: DatePicker that supports nullable DateTime and displays placeholder text when null
  • ExtendedTimePicker.cs: NEW: TimePicker that supports nullable TimeSpan and displays placeholder text when null
  • PreviousPageInfo.cs: Added SendId for previous page tracking
  • SendGroupingsPage.xaml: NEW: Layout file for the Send groupings page
  • SendGroupingsPage.xaml.cs: NEW: Code behind for the Send groupings page
  • SendGroupingsPageViewModel.cs: NEW: ViewModel for the Send groupings page
  • SendGroupingsPageListGroup.cs: NEW: Type grouping logic for the Send groupings page
  • SendGroupingsPageListItem.cs: NEW: ListView item logic for the Send groupings page
  • SendGroupingsPageListItemSelector.cs: NEW: Type grouping logic for the Send groupings page
  • SendAddEditPage.xaml: NEW: Layout file for the Send add/edit page
  • SendAddEditPage.xaml.cs: NEW: Code behind for the Send add/edit page
  • SendAddEditPageViewModel.cs: NEW: ViewModel file for the Send add/edit page
  • SendsPage.xaml: NEW: Layout file for the Sends search page
  • SendsPage.xaml.cs: NEW: Code behind for the Sends search page
  • SendsPageViewModel.cs: NEW: ViewModel file for the Sends search page
  • TabsPage.cs: Added Send option with paper plane logo
  • AppResources.resx: Added Send strings
  • AppResources.Designer.cs: System modified resources
  • Base.xaml: Added styling for DatePicker
  • AppHelpers.cs: Added list options and helper methods for Sends
  • App.csproj: System modified to render layout (not sure if this is required, may revert)

Core:

  • ISearchService.cs: Added Search methods for Send
  • ISendService.cs: Changed encrypted file data return type to byte array and added return string to save method to allow for share-on-save support
  • SendResponse.cs: Removed internal to allow newtonsoft to write deserialized values
  • SendView.cs: Added param-less constructor and additional helper methods
  • ApiService.cs: Added missing /remove-password to PutSendRemovePasswordAsync path
  • CryptoService.cs: Commodore 65 is app-crashing fantasy, changed to 64
  • SearchService.cs: Added send search support service & methods
  • SendService.cs: Changed encFileData return type to byte array, added missing Dates in constructed Send, and changed fixed iterations to use stored value. Also return new Send ID after saving, and filled in some gaps where non-existent Send data was wreaking havoc.
  • SyncService.cs: Changed userId to use the sendId in the selector, plus reformatting while troubleshooting to match similar SyncPoliciesAsync method
  • ServiceContainer.cs: Added missing SendService registration, and moved sendService declaration up higher so it could be used with searchService

iOS:

  • paper_plane.png: NEW: The plane!
  • paper_plane@2x.png: NEW: The bigger plane!
  • paper_plane@3x.png: NEW: The biggest plane!
  • iOS.csproj: System modified recognition of the normal, bigger, and biggest planes!

iOS.Core:

  • ExtendedDatePickerRenderer.cs: NEW: Renderer for ExtendedDatePicker
  • ExtendedTimePickerRenderer.cs: NEW: Renderer for ExtendedTimePicker
  • iOS.Core.csproj: System modified

Considerations

  • There is no unified Date & Time picker on mobile, so those values have to be set individually. I added some automatic adjustments to hopefully make the process less tappy.
  • I changed the new "copy link on save" option to "share on save" since that's most likely going to be the intended purpose. The user can always use the Copy option in the share sheet if needed.

Screenshots

Screen Shot 2021-02-09 at 4 29 47 PM
Screen Shot 2021-02-09 at 4 30 41 PM
Screen Shot 2021-02-09 at 4 31 32 PM
Screen Shot 2021-02-09 at 4 31 58 PM
Screen Shot 2021-02-09 at 4 32 19 PM
Screen Shot 2021-02-09 at 4 32 52 PM
Screen Shot 2021-02-09 at 4 33 56 PM
Screen Shot 2021-02-09 at 4 35 42 PM
Screen Shot 2021-02-09 at 4 36 10 PM
Screen Shot 2021-02-09 at 4 37 00 PM
Screen Shot 2021-02-09 at 4 49 37 PM

Here's a picture of me trying to customize the Date & Time Pickers:

thepain


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/1256 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 2/9/2021 **Status:** ✅ Merged **Merged:** 2/11/2021 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `master` ← **Head:** `feature-send` --- ### 📝 Commits (8) - [`323cbb0`](https://github.com/bitwarden/android/commit/323cbb0985cf138003eed8c9d394b8c52c7b82b4) Send feature for mobile - [`e350ea3`](https://github.com/bitwarden/android/commit/e350ea38a0e082f10fdb7a25148893d0f92aa51d) added fallback for KdfIterations - [`e0e7d90`](https://github.com/bitwarden/android/commit/e0e7d90ad58280b5bcbccc36c6329604c4761cb3) additional property exclusions for tests - [`28f2fb4`](https://github.com/bitwarden/android/commit/28f2fb49416da4338dcdcb92840e943707a5bfa2) support encryptedFileData as byte array comparison in SendServiceTests - [`9bde0b8`](https://github.com/bitwarden/android/commit/9bde0b8437eea86c88685dfe8d70fa2465709b44) formatting - [`4a216a1`](https://github.com/bitwarden/android/commit/4a216a1c9375dc2f28dadbbf1e77b5e75a4b9eb8) requested changes - [`643ac46`](https://github.com/bitwarden/android/commit/643ac46340ff960c82e33d7452d3ab8f3e98ea20) additional changes - [`01d9e0e`](https://github.com/bitwarden/android/commit/01d9e0e2477e357fddd6b2d4b18f6c219123cc02) change position of send service registration to match declaration order ### 📊 Changes **49 files changed** (+3776 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `src/Android/Android.csproj` (+5 -0) ➕ `src/Android/Renderers/ExtendedDatePickerRenderer.cs` (+50 -0) ➕ `src/Android/Renderers/ExtendedTimePickerRenderer.cs` (+50 -0) ➕ `src/Android/Renderers/SendViewCellRenderer.cs` (+199 -0) ➕ `src/Android/Resources/drawable/paper_plane.xml` (+9 -0) ➕ `src/Android/Resources/layout/SendViewCell.axml` (+96 -0) 📝 `src/Android/Resources/values/styles.xml` (+0 -7) 📝 `src/App/App.csproj` (+4 -0) ➕ `src/App/Controls/ExtendedDatePicker.cs` (+86 -0) ➕ `src/App/Controls/ExtendedTimePicker.cs` (+86 -0) ➕ `src/App/Controls/SendViewCell/SendViewCell.xaml` (+124 -0) ➕ `src/App/Controls/SendViewCell/SendViewCell.xaml.cs` (+110 -0) ➕ `src/App/Controls/SendViewCell/SendViewCellViewModel.cs` (+16 -0) 📝 `src/App/Models/PreviousPageInfo.cs` (+1 -0) ➕ `src/App/Pages/Send/SendAddEditPage.xaml` (+340 -0) ➕ `src/App/Pages/Send/SendAddEditPage.xaml.cs` (+228 -0) ➕ `src/App/Pages/Send/SendAddEditPageViewModel.cs` (+510 -0) ➕ `src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml` (+158 -0) ➕ `src/App/Pages/Send/SendGroupingsPage/SendGroupingsPage.xaml.cs` (+188 -0) ➕ `src/App/Pages/Send/SendGroupingsPage/SendGroupingsPageListGroup.cs` (+35 -0) _...and 29 more files_ </details> ### 📄 Description **Overview** Added Send feature to mobile UI **Files Changes/Added** Android: - **ExtendedDatePickerRenderer.cs**: NEW: Renderer for ExtendedDatePicker - **ExtendedTimePickerRenderer.cs**: NEW: Renderer for ExtendedTimePicker - **SendviewCellRenderer.cs**: NEW: Renderer for the Sends ListView - **paper_plane.xml**: NEW: Send logo vector drawable - **SendviewCell.axml**: NEW: Layout file for each Send ListView item - **styles.xml**: Removed legacy styling that was interfering with Date & Time Picker themes - **Android.csproj**: System modified to add renderers and resources App: - **SendviewCell.xaml**: NEW: Layout file for each Send ListView item - **SendViewCell.xaml.cs**: NEW: Code behind for each Send ListView item - **SendViewCellViewModel.cs**: NEW: ViewModel for each Send ListView item - **ExtendedDatePicker.cs**: NEW: DatePicker that supports nullable DateTime and displays placeholder text when null - **ExtendedTimePicker.cs**: NEW: TimePicker that supports nullable TimeSpan and displays placeholder text when null - **PreviousPageInfo.cs**: Added SendId for previous page tracking - **SendGroupingsPage.xaml**: NEW: Layout file for the Send groupings page - **SendGroupingsPage.xaml.cs**: NEW: Code behind for the Send groupings page - **SendGroupingsPageViewModel.cs**: NEW: ViewModel for the Send groupings page - **SendGroupingsPageListGroup.cs**: NEW: Type grouping logic for the Send groupings page - **SendGroupingsPageListItem.cs**: NEW: ListView item logic for the Send groupings page - **SendGroupingsPageListItemSelector.cs**: NEW: Type grouping logic for the Send groupings page - **SendAddEditPage.xaml**: NEW: Layout file for the Send add/edit page - **SendAddEditPage.xaml.cs**: NEW: Code behind for the Send add/edit page - **SendAddEditPageViewModel.cs**: NEW: ViewModel file for the Send add/edit page - **SendsPage.xaml**: NEW: Layout file for the Sends search page - **SendsPage.xaml.cs**: NEW: Code behind for the Sends search page - **SendsPageViewModel.cs**: NEW: ViewModel file for the Sends search page - **TabsPage.cs**: Added Send option with paper plane logo - **AppResources.resx**: Added Send strings - **AppResources.Designer.cs**: System modified resources - **Base.xaml**: Added styling for DatePicker - **AppHelpers.cs**: Added list options and helper methods for Sends - **App.csproj**: System modified to render layout (not sure if this is required, may revert) Core: - **ISearchService.cs**: Added Search methods for Send - **ISendService.cs**: Changed encrypted file data return type to byte array and added return string to save method to allow for share-on-save support - **SendResponse.cs**: Removed `internal` to allow newtonsoft to write deserialized values - **SendView.cs**: Added param-less constructor and additional helper methods - **ApiService.cs**: Added missing `/remove-password` to `PutSendRemovePasswordAsync` path - **CryptoService.cs**: Commodore 65 is app-crashing fantasy, changed to 64 - **SearchService.cs**: Added send search support service & methods - **SendService.cs**: Changed encFileData return type to byte array, added missing Dates in constructed Send, and changed fixed iterations to use stored value. Also return new Send ID after saving, and filled in some gaps where non-existent Send data was wreaking havoc. - **SyncService.cs**: Changed `userId` to use the `sendId` in the selector, plus reformatting while troubleshooting to match similar `SyncPoliciesAsync` method - **ServiceContainer.cs**: Added missing SendService registration, and moved sendService declaration up higher so it could be used with searchService iOS: - **paper_plane.png**: NEW: The plane! - **paper_plane@2x.png**: NEW: The bigger plane! - **paper_plane@3x.png**: NEW: The biggest plane! - **iOS.csproj**: System modified recognition of the normal, bigger, and biggest planes! iOS.Core: - **ExtendedDatePickerRenderer.cs**: NEW: Renderer for ExtendedDatePicker - **ExtendedTimePickerRenderer.cs**: NEW: Renderer for ExtendedTimePicker - **iOS.Core.csproj**: System modified **Considerations** - There is no unified Date & Time picker on mobile, so those values have to be set individually. I added some automatic adjustments to hopefully make the process less tappy. - I changed the new "copy link on save" option to "share on save" since that's most likely going to be the intended purpose. The user can always use the Copy option in the share sheet if needed. **Screenshots** ![Screen Shot 2021-02-09 at 4 29 47 PM](https://user-images.githubusercontent.com/59324545/107431938-3134ae80-6af5-11eb-8509-09def416fb7c.png) ![Screen Shot 2021-02-09 at 4 30 41 PM](https://user-images.githubusercontent.com/59324545/107431941-32fe7200-6af5-11eb-9db3-c5b0ee938d83.png) ![Screen Shot 2021-02-09 at 4 31 32 PM](https://user-images.githubusercontent.com/59324545/107431947-3560cc00-6af5-11eb-96dd-bb501a367399.png) ![Screen Shot 2021-02-09 at 4 31 58 PM](https://user-images.githubusercontent.com/59324545/107431955-372a8f80-6af5-11eb-8e8f-c8cf98db0995.png) ![Screen Shot 2021-02-09 at 4 32 19 PM](https://user-images.githubusercontent.com/59324545/107431960-398ce980-6af5-11eb-8a5e-599425bf18b6.png) ![Screen Shot 2021-02-09 at 4 32 52 PM](https://user-images.githubusercontent.com/59324545/107431967-3b56ad00-6af5-11eb-83e5-76c8c16c835f.png) ![Screen Shot 2021-02-09 at 4 33 56 PM](https://user-images.githubusercontent.com/59324545/107431975-3d207080-6af5-11eb-8606-dd9b6b0fdf7a.png) ![Screen Shot 2021-02-09 at 4 35 42 PM](https://user-images.githubusercontent.com/59324545/107431979-3eea3400-6af5-11eb-829e-66a28e408690.png) ![Screen Shot 2021-02-09 at 4 36 10 PM](https://user-images.githubusercontent.com/59324545/107431982-40b3f780-6af5-11eb-9d47-4d660f98f58c.png) ![Screen Shot 2021-02-09 at 4 37 00 PM](https://user-images.githubusercontent.com/59324545/107431987-427dbb00-6af5-11eb-9123-6f3873bdc537.png) ![Screen Shot 2021-02-09 at 4 49 37 PM](https://user-images.githubusercontent.com/59324545/107445762-153c0780-6b0b-11eb-973c-3877237f5617.png) Here's a picture of me trying to customize the Date & Time Pickers: ![thepain](https://user-images.githubusercontent.com/59324545/107305870-c716fd80-6a51-11eb-84e1-e438a15e4dad.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-26 23:24:24 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#2810