-
Notifications
You must be signed in to change notification settings - Fork 6
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
fix(EmptyState): Missing accessibility ids on the Empty State - SMARTWIFI-3093 #148
Changes from 2 commits
12470c2
8cfc998
fa1737e
d1438f2
f771b61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,24 +11,30 @@ import Foundation | |
public struct EmptyStateButton { | ||
public let title: String | ||
public let loadingTitle: String? | ||
public let accesibilityIdentifier: String? | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm feels weird to have this here. vc.emptyState.titleAccessibilityIdentifier = "empty_state_title_id"
vc.emptyState.descriptionAccessibilityIdentifier = "empty_state_card_id"
vc.emptyState.assetAccessibilityIdentifier = "empty_state_card_id"
vc.emptyState.secondaryButtonAccessibilityIdentifier = "empty_state_card_id"
vc.emptyState.primaryButtonAccessibilityIdentifier = "empty_state_card_id"
vc.emptyState.linkAccessibilityIdentifier = "empty_state_card_id" Any particular reason for not doing it this way too? Maybe the way the actions are configured? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no reason, the same as I did initially, add indentifiers to the init, it seemed easier to then pass that configuration to the actual element, I changed it to follow the same approach as the other elements There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the changes! |
||
public let tapHandler: (() -> Void)? | ||
|
||
public init(title: String, | ||
loadingTitle: String?, | ||
accesibilityIdentifier: String? = nil, | ||
tapHandler: (() -> Void)?) { | ||
self.title = title | ||
self.loadingTitle = loadingTitle | ||
self.accesibilityIdentifier = accesibilityIdentifier | ||
self.tapHandler = tapHandler | ||
} | ||
} | ||
|
||
public struct EmptyStateLinkButton { | ||
public let title: String | ||
public let accesibilityIdentifier: String? | ||
public let tapHandler: (() -> Void)? | ||
|
||
public init(title: String, | ||
accesibilityIdentifier: String? = nil, | ||
tapHandler: (() -> Void)?) { | ||
self.title = title | ||
self.accesibilityIdentifier = accesibilityIdentifier | ||
self.tapHandler = tapHandler | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,7 +17,7 @@ import UIKit | |
/// the spaces between the texts of a letter. When a text is not configured, her vertical spacing is also ignored. | ||
@dynamicMemberLookup | ||
class StackViewContentItem<Element: UIView>: UIStackView { | ||
private var item: Element | ||
var item: Element | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to make this internal... |
||
|
||
var topSpacing: CGFloat { | ||
didSet { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ DEVICES_USED_FOR_TESTING = ["iPhone 13"] | |
platform :ios do | ||
|
||
before_all do | ||
xcversion(version: "13") | ||
xcversion(version: "13") if is_ci | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. failing to execute locally if you don't have an xcode named "Xcode_13.app", I removed this constraint so it is executed only on CI |
||
end | ||
|
||
desc "Setup the external dependencies and stuff needed to have a full working environment experience" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I'm not sure about this one:
HighlightedCard
(and others) we are exposing computed properties to get and set the identifiers.Callout
we are exposing the inner components.I would go with the same approach as
HighlightedCard
so at least almost every component behaves in the same way.WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I thought about that it was a pain to then propagate those attributes to each subelement, I will change it and see how it looks... and what about the
EmptyStateButton
? there I'm using the init as well