Skip to content

Commit

Permalink
Merge pull request #1945 from Skyscanner/origami/OGM-2484-add-accessi…
Browse files Browse the repository at this point in the history
…bility-id

OGM-2484: update BPKNavigationTabGroup to have an accessibilityIdentifier
  • Loading branch information
mcomisso committed Apr 25, 2024
2 parents 552feb4 + 56487e2 commit b65db53
Show file tree
Hide file tree
Showing 1,291 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_build-docs.yml
Expand Up @@ -10,7 +10,7 @@ defaults:
jobs:
BuildDocs:
name: Build Docs
runs-on: macos-latest
runs-on: macos-13
permissions:
statuses: write
pull-requests: write
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/_build.yml
Expand Up @@ -10,7 +10,7 @@ defaults:
jobs:
Setup:
name: Install Dependencies
runs-on: macos-latest
runs-on: macos-13
steps:
- uses: actions/checkout@v4

Expand All @@ -22,7 +22,7 @@ jobs:

Lint:
name: Lint Project
runs-on: macos-latest
runs-on: macos-13
needs: [Setup]
steps:
- name: Checkout code
Expand Down Expand Up @@ -70,6 +70,9 @@ jobs:
run: bundle exec pod install
working-directory: Example

- name: Select Xcode 14
run: sudo xcode-select --switch /Applications/Xcode_14.2.app

- name: Install clang-format
run: brew install clang-format

Expand All @@ -87,7 +90,7 @@ jobs:

AnalyzePods:
name: Analyzing pods
runs-on: macos-latest
runs-on: macos-13
needs: [Setup]
strategy:
fail-fast: false
Expand Down Expand Up @@ -134,7 +137,7 @@ jobs:

UploadArtifacts:
name: Upload Artifacts
runs-on: macos-latest
runs-on: macos-13
needs: [TestPods]
steps:
- name: Save assets
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/_test.yml
Expand Up @@ -15,7 +15,7 @@ defaults:
jobs:
TestPods:
name: Testing Pods
runs-on: macos-latest
runs-on: macos-13
outputs:
changed-files: ${{ steps.checkSnapshotChanges.outputs.didChangeFiles }}
steps:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: ./.github/workflows/_build.yml
Deploy-Common:
name: Release Common to Cocoapods
runs-on: macos-latest
runs-on: macos-13
environment: Publishing
needs: [Build]
steps:
Expand All @@ -43,7 +43,7 @@ jobs:

Deploy-UIKit:
name: Release UIKit to Cocoapods
runs-on: macos-latest
runs-on: macos-13
environment: Publishing
needs: [Build]
steps:
Expand All @@ -69,7 +69,7 @@ jobs:

Deploy-SwiftUI:
name: Release SwiftUI to Cocoapods
runs-on: macos-latest
runs-on: macos-13
environment: Publishing
needs: [Build]
steps:
Expand All @@ -95,7 +95,7 @@ jobs:

Deploy-Docs:
name: Release Backpack Docs
runs-on: macos-latest
runs-on: macos-13
environment: Publishing
needs: [Deploy-SwiftUI, Deploy-UIKit, Deploy-Common]
steps:
Expand Down
Expand Up @@ -59,26 +59,32 @@ public struct BPKNavigationTabGroup: View {
) {
onItemClick(index)
}
.accessibilityIdentifier(tab.accessibilityIdentifier)
}
}

public extension BPKNavigationTabGroup {
struct Item: Hashable {
let text: String
let icon: BPKIcon?
let accessibilityIdentifier: String

public init(text: String, icon: BPKIcon? = nil) {
public init(text: String, icon: BPKIcon? = nil, accessibilityIdentifier: String? = nil) {
self.text = text
self.icon = icon
self.accessibilityIdentifier = accessibilityIdentifier ?? "navigationTab" + text
}

// swiftlint:disable line_length
public static func == (lhs: Item, rhs: Item) -> Bool {
lhs.text == rhs.text && lhs.icon?.name == rhs.icon?.name
lhs.text == rhs.text && lhs.icon?.name == rhs.icon?.name && lhs.accessibilityIdentifier == rhs.accessibilityIdentifier
}
// swiftlint:enable line_length

public func hash(into hasher: inout Hasher) {
hasher.combine(text)
hasher.combine(icon?.name)
hasher.combine(accessibilityIdentifier)
}
}
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b65db53

Please sign in to comment.