Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Device manager: User sessions overview - Other sessions section read only (PSG-667) #6672

Merged
merged 31 commits into from
Sep 12, 2022

Conversation

SBiOSoftWhare
Copy link
Contributor

@SBiOSoftWhare SBiOSoftWhare commented Sep 5, 2022

#6656

Light Dark
 Simulator Screen Shot - iPhone 13 Pro - 2022-09-08 at 08 32 54 Simulator Screen Shot - iPhone 13 Pro - 2022-09-08 at 08 33 07

@github-actions
Copy link

github-actions bot commented Sep 5, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/aQxbpG

@SBiOSoftWhare SBiOSoftWhare marked this pull request as ready for review September 6, 2022 14:48
@SBiOSoftWhare SBiOSoftWhare requested review from a team and pixlwave and removed request for a team September 6, 2022 14:49
Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woah, the Device Manager looks like it's going to be a cool new feature 😎

Comments inline :)

Riot/Assets/en.lproj/Vector.strings Show resolved Hide resolved

@Environment(\.theme) private var theme: ThemeSwiftUI

private var sessionTitle: String {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this, sessionDetailsText and lastActivityDateString(from:) be moved into UserSessionListItemViewData instead? It would make the view implementation clearing keeping all this logic out of it.

.padding(.horizontal, 16)

// Device list
VStack(spacing: 16) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use a LazyVStack here given we're emulating a List.

Side note: Might be worth looking at VectorForm and using/extending that for use in this view :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VectorForm has the separators already implemented too 😉

@codecov-commenter
Copy link

codecov-commenter commented Sep 7, 2022

Codecov Report

Merging #6672 (111c829) into develop (cc2115e) will increase coverage by 3.74%.
The diff coverage is 30.21%.

@@             Coverage Diff             @@
##           develop    #6672      +/-   ##
===========================================
+ Coverage     6.23%    9.98%   +3.74%     
===========================================
  Files         1474     1486      +12     
  Lines       155154   157045    +1891     
  Branches     62259    62950     +691     
===========================================
+ Hits          9679    15685    +6006     
+ Misses      145072   140807    -4265     
- Partials       403      553     +150     
Impacted Files Coverage Δ
Riot/Generated/Images.swift 58.18% <ø> (+3.41%) ⬆️
...s/UserSessions/DeviceAvatar/DeviceAvatarView.swift 0.00% <0.00%> (ø)
.../Coordinator/UserSessionsOverviewCoordinator.swift 0.00% <0.00%> (ø)
...ervice/MatrixSDK/UserSessionsOverviewService.swift 0.00% <0.00%> (ø)
...serSessionsOverview/View/UserSessionListItem.swift 0.00% <0.00%> (ø)
...erSessionsOverview/View/UserSessionsOverview.swift 0.00% <0.00%> (ø)
...ssionsOverview/UserSessionsOverviewViewModel.swift 46.47% <48.21%> (+46.47%) ⬆️
...s/UserSessions/DeviceType/DeviceType+Element.swift 48.57% <48.57%> (ø)
Riot/Generated/Strings.swift 10.15% <58.33%> (+7.29%) ⬆️
...Service/Mock/MockUserSessionsOverviewService.swift 83.33% <83.33%> (ø)
... and 315 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

var name: String {
let name: String

let appName = AppInfo.current.displayName
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this not show the current app's bundle display name for all devices?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes atm the application short name Element is taken from the bundle display name in the app. This is probably something we set in other place like BuildSettings or specific translation file in the future.
The parsing of client name is not yet implemented. So there is chances to change the client name generation in the future also.

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure who this is going to now, but LGTM

@pixlwave pixlwave merged commit b02834a into develop Sep 12, 2022
@pixlwave pixlwave deleted the steve/6656_dm_overview_other_sessions branch September 12, 2022 10:39
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@Johennes
Copy link
Contributor

Not sure who this is going to now, but LGTM

Thanks @pixlwave. @paleksandrs is picking this up from Stève.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device manager: User sessions overview - Other sessions section read only
4 participants