-
Notifications
You must be signed in to change notification settings - Fork 5
DevDB #59
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
Merged
Merged
DevDB #59
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
4029501
[WIP] Device Vendor
Xialtal aa7d7fa
Add device vendor endpoint
Xialtal 2b0be4f
[WIP] Device Vendor
Xialtal 9e80649
Add ability to open device from vendor screen
Xialtal 9ae2ee9
Fix build
Xialtal b0432d2
Fix device vendor parser
Xialtal 11bc01a
Improve localizable
Xialtal 607e116
Fix perception warning
Xialtal 3e99209
Add device vendor deeplink support
Xialtal c58f3bc
[WIP] DevDB
Xialtal 8730f5d
Add device brands endpoint
Xialtal 18be0bc
[WIP] DevDB
Xialtal dbd61a0
Fix build
Xialtal a4695ab
[WIP] DevDB
Xialtal b41e867
Fix device path navigation
Xialtal e07e560
Improve device goTo deeplink code
Xialtal 204c23e
Implement full deeplink support for devdb
Xialtal f7d7fdf
Improve namings for devdb
Xialtal 563365e
Fix device image for devdb vendor screen
Xialtal 743569e
Fix device images size for device specifications
Xialtal 8b9fc99
Improve namings for DeviceTypeFeature
Xialtal 25c92e7
Improve & cleanup Row in DeviceTypeScreen
Xialtal c43f0b5
Improve marks in DeviceTypeScreen
Xialtal 4c436e1
Add analytics to DeviceTypeFeature
Xialtal 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
20 changes: 20 additions & 0 deletions
20
Modules/Sources/APIClient/Models/Extensions/DeviceType+Extension.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,20 @@ | ||
| // | ||
| // DeviceType+Extension.swift | ||
| // ForPDA | ||
| // | ||
| // Created by Xialtal on 2.04.26. | ||
| // | ||
|
|
||
| import PDAPI | ||
| import Models | ||
|
|
||
| extension DeviceType { | ||
| var transferType: DeviceCommand.DeviceType { | ||
| switch self { | ||
| case .phone: .phone | ||
| case .ebook: .ebook | ||
| case .pad: .pad | ||
| case .smartWatch: .smartWatch | ||
| } | ||
| } | ||
| } |
28 changes: 28 additions & 0 deletions
28
Modules/Sources/AnalyticsClient/Events/DeviceTypeEvent.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,28 @@ | ||
| // | ||
| // DeviceTypeEvent.swift | ||
| // ForPDA | ||
| // | ||
| // Created by Xialtal on 13.04.26. | ||
| // | ||
|
|
||
| public enum DeviceTypeEvent: Event { | ||
|
|
||
| case typeTapped(String) | ||
| case deviceTapped(String) | ||
| case vendorTapped(String, type: String) | ||
|
|
||
| public var name: String { | ||
| return "DeviceType " + eventName(for: self).inProperCase | ||
| } | ||
|
|
||
| public var properties: [String: String]? { | ||
| switch self { | ||
| case .deviceTapped(let tag): | ||
| return ["tag": name] | ||
| case .typeTapped(let type): | ||
| return ["type": type] | ||
| case .vendorTapped(let name, let type): | ||
| return ["type": type, "name": name] | ||
| } | ||
| } | ||
| } |
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
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
38 changes: 38 additions & 0 deletions
38
Modules/Sources/DeviceTypeFeature/Analytics/FormFeature+Analytics.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,38 @@ | ||
| // | ||
| // DeviceTypeFeature+Analytics.swift | ||
| // ForPDA | ||
| // | ||
| // Created by Xialtal on 13.04.2026. | ||
| // | ||
|
|
||
| import ComposableArchitecture | ||
| import AnalyticsClient | ||
|
|
||
| extension DeviceTypeFeature { | ||
|
|
||
| struct Analytics: Reducer { | ||
| typealias State = DeviceTypeFeature.State | ||
| typealias Action = DeviceTypeFeature.Action | ||
|
|
||
| @Dependency(\.analyticsClient) var analytics | ||
|
|
||
| var body: some Reducer<State, Action> { | ||
| Reduce<State, Action> { state, action in | ||
| switch action { | ||
| case .view(.deviceButtonTapped(let tag)): | ||
| analytics.log(DeviceTypeEvent.deviceTapped(tag)) | ||
|
|
||
| case .view(.typeButtonTapped(let type)): | ||
| analytics.log(DeviceTypeEvent.typeTapped(type.rawValue)) | ||
|
|
||
| case .view(.vendorButtonTapped(let name, let type)): | ||
| analytics.log(DeviceTypeEvent.vendorTapped(name, type: type.rawValue)) | ||
|
|
||
| case .delegate, .internal, .view: | ||
| break | ||
| } | ||
| return .none | ||
| } | ||
| } | ||
| } | ||
| } |
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.