Page MenuHomePhabricator

[native] Improve device labels on device list screen
ClosedPublic

Authored by bartek on Oct 17 2024, 7:43 AM.
Tags
None
Referenced Files
F3518436: D13747.id45720.diff
Sun, Dec 22, 8:03 PM
F3518435: D13747.id45268.diff
Sun, Dec 22, 8:03 PM
F3518422: D13747.id.diff
Sun, Dec 22, 8:03 PM
F3518397: D13747.diff
Sun, Dec 22, 8:03 PM
Unknown Object (File)
Sun, Dec 22, 3:37 AM
Unknown Object (File)
Fri, Dec 20, 10:57 AM
Unknown Object (File)
Mon, Dec 16, 3:57 AM
Unknown Object (File)
Fri, Dec 13, 3:41 AM
Subscribers

Details

Summary

Resolves ENG-9136

The previous label for current primary device looked weird with two parentheses:

someDeviceID (primary) (this device)

Depends on D13262

Test Plan
  • Opened devices screen on native and verified they're now displayed correctly

Simulator Screenshot - iPhone 15 Pro - 2024-10-18 at 10.55.22.png (2×1 px, 188 KB)

  • JS playground:
function getLabel(deviceID, isPrimary, isThisDevice) {
  // contents of useMemo
}

getLabel('123456789', false, false) // '1234567'
getLabel('123456789', false, true)  // '1234567 (this device)'
getLabel('123456789', true, false)  // '1234567 (primary)'
getLabel('123456789', true, true)   // '1234567 (primary, this device)'

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Can you share a screenshot of what it looks like now in the Test Plan?

This revision is now accepted and ready to land.Oct 17 2024, 9:03 AM