-
Notifications
You must be signed in to change notification settings - Fork 26
fix: add correct empty results screen for app - WPB-24393 #4518
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
Open
caldrian
wants to merge
23
commits into
develop
Choose a base branch
from
fix/apps-search-results-empty-screen-WPB-24393
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
cb3e8b1
fix errors
caldrian 7dbbaec
create target WireSearchUI
caldrian 568d2b3
rename class
caldrian 4b63e64
create protocol
caldrian 1bbc948
Merge branch 'develop' of github.com:wireapp/wire-ios into fix/apps-s…
caldrian 3ef8d7a
Merge branch 'develop' of github.com:wireapp/wire-ios into fix/apps-s…
caldrian 753f6f5
Merge branch 'fix/apps-search-results-empty-screen-WPB-24393.tmp' int…
caldrian a394b52
revert changes
caldrian 59b243e
finish EmptyAppsSearchResultView
caldrian 01d3185
Merge branch 'develop' of github.com:wireapp/wire-ios into fix/apps-s…
caldrian 51dc067
fix constraints
caldrian 613de7a
adding participants empty screen
caldrian 7af9489
add tests
caldrian 88e4bb9
add snapshot images
caldrian eecc3e3
Merge branch 'develop' of github.com:wireapp/wire-ios into fix/apps-s…
caldrian 150e7e8
format code
caldrian 97e00db
use localizable
caldrian 494fc2b
update snapshot images
caldrian 1742549
Merge branch 'develop' of github.com:wireapp/wire-ios into fix/app-de…
caldrian 124c9db
empty
caldrian 0604b79
address pr comments
caldrian efa8a7c
minor fix
caldrian c75ad13
Merge branch 'develop' of github.com:wireapp/wire-ios into fix/apps-s…
caldrian File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
wire-ios/Wire-iOS Tests/EmptyAppsSearchResultViewSnapshotTests.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| // | ||
| // Wire | ||
| // Copyright (C) 2026 Wire Swiss GmbH | ||
| // | ||
| // This program is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
| // | ||
| // This program is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see http://www.gnu.org/licenses/. | ||
| // | ||
|
|
||
| import WireTestingPackage | ||
| import XCTest | ||
|
|
||
| @testable import Wire | ||
|
|
||
| final class EmptyAppsSearchResultViewSnapshotTests: XCTestCase { | ||
|
|
||
| // MARK: Properties | ||
|
|
||
| private var snapshotHelper: SnapshotHelper! | ||
|
|
||
| // MARK: setUp / tearDown | ||
|
|
||
| override func setUp() { | ||
| snapshotHelper = SnapshotHelper() | ||
| } | ||
|
|
||
| override func tearDown() { | ||
| snapshotHelper = nil | ||
| } | ||
|
|
||
| // MARK: Snapshot Tests | ||
|
|
||
| func testAppearance() { | ||
| // GIVEN | ||
| let sut = EmptyAppsSearchResultView() | ||
| sut.frame = CGRect( | ||
| origin: .zero, | ||
| size: CGSize(width: 320, height: 480) | ||
| ) | ||
| sut.backgroundColor = .systemBackground | ||
|
|
||
| // WHEN & THEN | ||
| snapshotHelper | ||
| .withUserInterfaceStyle(.light) | ||
| .verify( | ||
| matching: sut, | ||
| named: "LightTheme", | ||
| file: #filePath, | ||
| testName: #function, | ||
| line: #line | ||
| ) | ||
|
|
||
| snapshotHelper | ||
| .withUserInterfaceStyle(.dark) | ||
| .verify( | ||
| matching: sut, | ||
| named: "DarkTheme", | ||
| file: #filePath, | ||
| testName: #function, | ||
| line: #line | ||
| ) | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...renceImages/EmptyAppsSearchResultViewSnapshotTests/testAppearance.DarkTheme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions
3
...enceImages/EmptyAppsSearchResultViewSnapshotTests/testAppearance.LightTheme.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
wire-ios/Wire-iOS/Sources/UserInterface/SearchUI/EmptyAppsSearchResultView.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| // | ||
| // Wire | ||
| // Copyright (C) 2026 Wire Swiss GmbH | ||
| // | ||
| // This program is free software: you can redistribute it and/or modify | ||
| // it under the terms of the GNU General Public License as published by | ||
| // the Free Software Foundation, either version 3 of the License, or | ||
| // (at your option) any later version. | ||
| // | ||
| // This program is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| // GNU General Public License for more details. | ||
| // | ||
| // You should have received a copy of the GNU General Public License | ||
| // along with this program. If not, see http://www.gnu.org/licenses/. | ||
| // | ||
|
|
||
| import UIKit | ||
| import WireDesign | ||
|
|
||
| final class EmptyAppsSearchResultView: UIView { | ||
|
|
||
| override init(frame: CGRect) { | ||
| super.init(frame: frame) | ||
| setup() | ||
| } | ||
|
|
||
| @available(*, unavailable) | ||
| required init?(coder aDecoder: NSCoder) { | ||
|
Check warning on line 30 in wire-ios/Wire-iOS/Sources/UserInterface/SearchUI/EmptyAppsSearchResultView.swift
|
||
| fatalError("init(coder:) is not supported") | ||
| } | ||
|
|
||
| private func setup() { | ||
| let headlineLabel = UILabel() | ||
| headlineLabel.numberOfLines = 0 | ||
| headlineLabel.text = L10n.Localizable.Peoplepicker.NoAppsAdded.title | ||
| headlineLabel.font = .font(for: .body1).withWeight(.bold) | ||
| let contentLabel = UILabel() | ||
| contentLabel.numberOfLines = 0 | ||
| contentLabel.text = L10n.Localizable.Peoplepicker.NoAppsAdded.message | ||
| contentLabel.font = .font(for: .body1) | ||
caldrian marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| let stackView = UIStackView(arrangedSubviews: [headlineLabel, contentLabel]) | ||
| stackView.axis = .vertical | ||
| stackView.spacing = 24 | ||
| stackView.translatesAutoresizingMaskIntoConstraints = false | ||
| addSubview(stackView) | ||
| NSLayoutConstraint.activate([ | ||
| stackView.leadingAnchor.constraint(equalTo: leadingAnchor, constant: 16), | ||
| stackView.topAnchor.constraint(equalTo: topAnchor, constant: 16), | ||
| trailingAnchor.constraint(greaterThanOrEqualTo: stackView.trailingAnchor, constant: 16), | ||
| bottomAnchor.constraint(greaterThanOrEqualTo: stackView.bottomAnchor, constant: 16) | ||
| ]) | ||
| } | ||
|
|
||
| } | ||
|
|
||
| @available(iOS 17, *) | ||
| #Preview { | ||
| EmptyAppsSearchResultView() | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.