-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make dimmer a close button in VO mode (#8)
* Make dimmer a close button in VO mode * Apply Mark suggestion * Fix unit test * Tweak VO implementation --------- Co-authored-by: Mark Pospesel <[email protected]>
- Loading branch information
1 parent
ae8495d
commit d3e6d7f
Showing
9 changed files
with
103 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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 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 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
9 changes: 9 additions & 0 deletions
9
Sources/YSideMenu/Assets/Strings/en.lproj/Localizable.strings
This file contains 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,9 @@ | ||
/* | ||
Localizable.strings | ||
YSideMenu | ||
|
||
Created by Caio Coan on 05/03/23. | ||
Copyright © 2023 Y Media Labs. All rights reserved. | ||
*/ | ||
|
||
"Menu_Dimmer_Close" = "Dismiss"; |
13 changes: 13 additions & 0 deletions
13
Sources/YSideMenu/Enums/SideMenuController+AccessibilityIdentifiers.swift
This file contains 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,13 @@ | ||
// | ||
// SideMenuController+AccessibilityIdentifiers.swift | ||
// YSideMenu | ||
// | ||
// Created by Caio Coan on 05/03/23. | ||
// Copyright © 2023 Y Media Labs. All rights reserved. | ||
// | ||
|
||
extension SideMenuController { | ||
enum AccessibilityIdentifiers { | ||
static let dimmerId = "Menu_Dimmer_Close" | ||
} | ||
} |
This file contains 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,18 @@ | ||
// | ||
// YSideMenuController+Strings.swift | ||
// YSideMenu | ||
// | ||
// Created by Caio Coan on 05/03/23. | ||
// Copyright © 2023 Y Media Labs. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
import YCoreUI | ||
|
||
extension SideMenuController { | ||
enum Strings: String, Localizable, CaseIterable { | ||
case dimmerAccessibilityLabel = "Menu_Dimmer_Close" | ||
|
||
static var bundle: Bundle { .module } | ||
} | ||
} |
This file contains 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
24 changes: 24 additions & 0 deletions
24
Tests/YSideMenuTests/Enums/SideMenuController+StringsTests.swift
This file contains 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,24 @@ | ||
// | ||
// SideMenuController+StringsTests.swift | ||
// YSideMenu | ||
// | ||
// Created by Caio Coan on 03/05/23. | ||
// Copyright © 2023 Y Media Labs. All rights reserved. | ||
// | ||
|
||
import XCTest | ||
import YCoreUI | ||
@testable import YSideMenu | ||
|
||
final class SideMenuControllerStringsTests: XCTestCase { | ||
func testLoad() { | ||
SideMenuController.Strings.allCases.forEach { | ||
// Given a localized string constant | ||
let string = $0.localized | ||
// it should not be empty | ||
XCTAssertFalse(string.isEmpty) | ||
// and it should not equal its key | ||
XCTAssertNotEqual($0.rawValue, string) | ||
} | ||
} | ||
} |
This file contains 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