Show current user in ContactGiftingView #155

Open
jose wants to merge 8 commits from contact-gifting-current-user into master
jose commented 2 weeks ago
Owner
  • "You" is displayed conditionally, similar to GiftedDialog behavior
  • "Show All" is hidden in GiftedDialog when accessed from ContactGiftingView (redundant)
- "You" is displayed conditionally, similar to GiftedDialog behavior - "Show All" is hidden in GiftedDialog when accessed from ContactGiftingView (redundant)
jose added 1 commit 2 weeks ago
bed2c7106a Added: current user in ContactGiftingView
jose changed target branch from build-improvement to master 6 days ago
jose added 88 commits 6 days ago
07c5c6fd31 Convert Vue components to use @Emit decorator instead of manual emits declarations
9067bec54a fix: Convert searchBoxes arrays to JSON strings in $saveSettings and $updateSettings
ca828d45a6 cleanup: Remove unused duplicate type definition files
433f3c1154 Fix GiftedDialog functionality
f4a7d437c8 Fix parameter passing in contact gift dialogs
9cd4551bed docs: add comprehensive GiftedDialog architecture overview
404a7cbc71 Add form field preservation in gifting flow
e741790d70 Fix ClaimView affirm delivery action
c30b94dcc7 Integrate TypeScript type checking into build process with conditional execution
54bfaafbd0 Fix entity type matching in ClaimView
3d38cb89a9 Fix HomeView registration status by using $accountSettings() instead of $settings()
06f3a4c7c2 Refactor: simplify GiftedDialog with explicit entity type props
aed16ebe94 Remove PROD_SHARE_DOMAIN constant and unify domain configuration
0bd0e7c332 Fix contact methods JSON string/array duality in PlatformServiceMixin
32f589b866 Fix Android emulator API connectivity with cleaner build script approach
b681905abd Upgrade Android API from 35 to 36
1d6418b02c Add custom API IP support for Android physical device development
3b1a63468c Add iOS support for custom API IP configuration
974d33b322 Document environment variable precedence and API configuration scheme
c27caf8887 Fix build script to fail on TypeScript errors
5ae0535935 fix: Restore "Get someone to onboard you" button functionality
607bb50a55 fix: Restore "Share Your Info" functionality with correct QR code format
4480778a49 fix: export contactMethods as JSON arrays instead of strings
b267d1bc66 Fix contact backup export: contactMethods now exports as JSON arrays instead of strings
ed0f49656d Simplify contactsToExportJson function
6868a322f1 feat: switch ContactQRScanShowView to URL-based contact sharing
3c37ead60d feat: add comprehensive Quick Start section and clean:all command
18e6aa5a9a Fix: gifting error messages
bf08e57ce7 Fix: re-organize entity type conditional logic in gifting flow
f98d6c7020 Fix notify initialization and axios access errors
0eb8d3d50e Migrate OnboardMeetingListView to new notify system and add comprehensive documentation
4f9fb068c8 Remove unused confirmation code from ActivityListItem and HomeView
778d00c2a4 refactor(HomeView): remove unused methods and deduplicate API server calls
d5db39878c Remove debug code from ShareMyContactInfoView
0277b05fef Fix: offer validation prematurely closes dialog
de47829dc2 fix: DataExportSection error
jose added 1 commit 6 days ago
jose added 1 commit 6 days ago
jose changed title from Show current user in ContactGiftingView to WIP: Show current user in ContactGiftingView 6 days ago
jose added 1 commit 5 days ago
ec1a725832 Refactor: improve dialog logic and entity handling
jose added 1 commit 5 days ago
jose changed title from WIP: Show current user in ContactGiftingView to Show current user in ContactGiftingView 5 days ago
trentlarson reviewed 3 days ago
* Creates an entity object from the contact parameter
*/
private createEntityFromContact(
contact?: GiverReceiverInputInfo | "Unnamed" | "You",
Poster
Owner

Let's change this logic a little bit, because there are redundant potential states:

  • The "contact" could be null/undefined. That is the case where "Unnamed" would be used, so we don't need a separate "Unnamed" value. (If we have both potential cases then we have to include similar logic to work with both cases, which makes it more complex.)

  • The contact could be the current user's activeDid, so that's what we should use in the openDialog instead of the word "You". (We should be checking here for the activeDid... and if we also have to check "You" then there is duplicate logic again... again adding to the complexity and difficulty of maintenance.)

Let's change this logic a little bit, because there are redundant potential states: * The "contact" could be null/undefined. That is the case where "Unnamed" would be used, so we don't need a separate "Unnamed" value. (If we have both potential cases then we have to include similar logic to work with both cases, which makes it more complex.) * The contact could be the current user's activeDid, so that's what we should use in the openDialog instead of the word "You". (We should be checking here for the activeDid... and if we also have to check "You" then there is duplicate logic again... again adding to the complexity and difficulty of maintenance.)
jose added 1 commit 2 days ago
jose added 1 commit 2 days ago
a4528c5703 Refactor: eliminate "special" entity type and use DID-based logic
jose commented 2 days ago
Poster
Owner

I refactored the entity creation method by eliminating the use of string-type entities, and instead determining those through the logic you mentioned. No more "Unnamed" or "You" special cases, just deduction via DID.

I also looked at related views and components to find similar patterns and refactored those, as well.

I refactored the entity creation method by eliminating the use of string-type entities, and instead determining those through the logic you mentioned. No more "Unnamed" or "You" special cases, just deduction via DID. I also looked at related views and components to find similar patterns and refactored those, as well.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.