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

Only use device type name as fallback for session display name #6820

Merged
merged 9 commits into from
Oct 7, 2022

Conversation

Johennes
Copy link
Contributor

@Johennes Johennes commented Oct 7, 2022

Before After
Simulator Screen Shot - iPhone SE (3rd generation) - 2022-10-07 at 09 38 03 Simulator Screen Shot - iPhone SE (3rd generation) - 2022-10-07 at 09 35 18

The session display name should usually be sufficient and we'll indicate the device type via the icon already.

@Johennes Johennes requested review from a team and phloux and removed request for a team October 7, 2022 07:52
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.

LGTM, but could you revert the changes to the translations please? We should only edit the en ones in the project otherwise we risk merge conflicts when updating Weblate.

@Johennes
Copy link
Contributor Author

Johennes commented Oct 7, 2022

LGTM, but could you revert the changes to the translations please? We should only edit the en ones in the project otherwise we risk merge conflicts when updating Weblate.

Argh, sorry I wasn't aware. 🤦‍♂️ Have backed them out now.

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.

Thanks 🙏

@Johennes
Copy link
Contributor Author

Johennes commented Oct 7, 2022

Hm, actually this is now making locheck produce these warnings

de.lproj/Vector.strings
  user_session_name:
    WARNING: Translation of 'user_session_name' includes arguments that don't exist in the source: 1, 2 (string_has_extra_arguments)
      Base: user_session_name
      Translation: %@: %@
...

And since we call it with --treat-warnings-as-errors that fails the build.

I suppose the warning stems from the English string being gone. So maybe we need to keep all strings around for now?

@codecov
Copy link

codecov bot commented Oct 7, 2022

Codecov Report

Base: 11.41% // Head: 53.58% // Increases project coverage by +42.16% 🎉

Coverage data is based on head (4eb7a36) compared to base (1ee8c9c).
Patch coverage: 25.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop    #6820       +/-   ##
============================================
+ Coverage    11.41%   53.58%   +42.16%     
============================================
  Files         1544      401     -1143     
  Lines       154237    15594   -138643     
  Branches     62254     6305    -55949     
============================================
- Hits         17606     8356     -9250     
+ Misses      136027     7048   -128979     
+ Partials       604      190      -414     
Impacted Files Coverage Δ
...iftUI/Modules/UserSessions/Common/DeviceType.swift 45.83% <0.00%> (-46.48%) ⬇️
...UserSessions/Common/UserSessionNameFormatter.swift 66.66% <0.00%> (-17.95%) ⬇️
Riot/Categories/String.swift 43.33% <66.66%> (-30.75%) ⬇️
...SwiftUI/Modules/Common/Extensions/Collection.swift 0.00% <0.00%> (-100.00%) ⬇️
.../Modules/UserSessions/Common/UserSessionInfo.swift 0.00% <0.00%> (-100.00%) ⬇️
...odules/Common/Util/ScreenTrackerViewModifier.swift 0.00% <0.00%> (-100.00%) ⬇️
...ice/Mock/MockRoomNotificationSettingsService.swift 0.00% <0.00%> (-100.00%) ⬇️
.../Modules/UserSessions/Common/UserAgentParser.swift 0.00% <0.00%> (-93.75%) ⬇️
...UI/Modules/Common/Bridging/VectorContentView.swift 0.00% <0.00%> (-92.31%) ⬇️
.../ViewModel/RoomNotificationSettingsViewModel.swift 0.00% <0.00%> (-92.31%) ⬇️
... and 1167 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link

github-actions bot commented Oct 7, 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/gH2mrh

@sonarcloud
Copy link

sonarcloud bot commented Oct 7, 2022

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

@@ -38,17 +38,15 @@ enum DeviceType {
}

var name: String {
let appName = AppInfo.current.displayName
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pixlwave sorry just pinging to inform you that I've decided to include this in the current PR as it's related. We shouldn't use the current app name here because the device type name is used for all sessions, so there's no guarantee the others are Element, too.

Copy link
Contributor

@phloux phloux left a comment

Choose a reason for hiding this comment

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

LGTM

@Johennes Johennes merged commit 800d5aa into develop Oct 7, 2022
@Johennes Johennes deleted the johannes/session-name-trumps-device-type-name branch October 7, 2022 15:31
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.

3 participants