Merge branch 'mbruce/bugfix' into 'develop'

Several bugfixes

See merge request BPHV_MIPS/vds_ios!199
This commit is contained in:
Bruce, Matt R 2024-04-05 20:11:43 +00:00
commit 30cc68d53f
5 changed files with 37 additions and 27 deletions

View File

@ -1369,7 +1369,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 57;
CURRENT_PROJECT_VERSION = 58;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
@ -1406,7 +1406,7 @@
BUILD_LIBRARY_FOR_DISTRIBUTION = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 57;
CURRENT_PROJECT_VERSION = 58;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;

View File

@ -432,6 +432,7 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
icon.color = color
icon.size = size.value
icon.customSize = customSize
icon.isEnabled = isEnabled
} else {
icon.reset()
}
@ -502,7 +503,6 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
badgeIndicator.isHidden = true
return
}
badgeIndicator.surface = surface
badgeIndicator.kind = badgeIndicatorModel.kind
badgeIndicator.fillColor = badgeIndicatorModel.fillColor
@ -538,11 +538,6 @@ open class ButtonIcon: Control, Changeable, FormFieldable {
}
}
/// Used to update any Accessibility properties.
open override func updateAccessibility() {
super.updateAccessibility()
setAccessibilityLabel(for: [icon, badgeIndicator.label])
}
}
// MARK: AppleGuidelinesTouchable

View File

@ -39,18 +39,32 @@ open class Notification: View {
public enum Style: String, CaseIterable {
case info, success, warning, error
func iconName() -> Icon.Name {
var iconName: Icon.Name {
switch self {
case .info:
return .infoBold
.infoBold
case .success:
return .checkmarkAltBold
.checkmarkAltBold
case .warning:
return .warningBold
.warningBold
case .error:
return .errorBold
.errorBold
}
}
var accessibilityText: String {
switch self {
case .info:
"Information Message"
case .success:
"Success Message"
case .warning:
"Warning Message"
case .error:
"Catastrophic Warning Alert"
}
}
}
//--------------------------------------------------
@ -309,8 +323,9 @@ open class Notification: View {
//--------------------------------------------------
private func updateIcons() {
let iconColor = surface == .dark ? VDSColor.paletteWhite : VDSColor.paletteBlack
typeIcon.name = style.iconName()
typeIcon.name = style.iconName
typeIcon.color = iconColor
typeIcon.accessibilityLabel = style.accessibilityText
closeButton.color = iconColor
closeButton.isHidden = hideCloseButton
}

View File

@ -34,16 +34,10 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
//--------------------------------------------------
// MARK: - Private Properties
//--------------------------------------------------
private var mainStackView = UIStackView().with {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.alignment = .top
$0.axis = .vertical
$0.spacing = 0
}
private var selectorStackView = UIStackView().with {
$0.translatesAutoresizingMaskIntoConstraints = false
$0.alignment = .top
$0.distribution = .fill
$0.axis = .horizontal
$0.spacing = 12
}
@ -160,6 +154,7 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
$0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forState: .disabled)
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .selected)
$0.setSurfaceColors(VDSColor.elementsPrimaryOnlight, VDSColor.elementsPrimaryOndark, forState: .highlighted)
$0.setSurfaceColors(VDSColor.interactiveDisabledOnlight, VDSColor.interactiveDisabledOndark, forState: [.selected, .disabled])
}
//--------------------------------------------------
@ -182,10 +177,8 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
addSubview(selectorView)
selectorView.isUserInteractionEnabled = false
selectorView.addSubview(mainStackView)
mainStackView.addArrangedSubview(selectorStackView)
selectorView.addSubview(selectorStackView)
selectorStackView.addArrangedSubview(selectorLeftLabelStackView)
selectorStackView.addArrangedSubview(subTextRightLabel)
selectorLeftLabelStackView.addArrangedSubview(textLabel)
@ -197,7 +190,7 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
.pinTrailing(0, .defaultHigh)
.pinBottom(0, .defaultHigh)
mainStackView.pinToSuperView(.uniform(16))
selectorStackView.pinToSuperView(.uniform(16))
}
/// Resets to default settings.
@ -323,7 +316,7 @@ open class RadioBoxItem: Control, Changeable, FormFieldable {
//get the colors
let backgroundColor = backgroundColorConfiguration.getColor(self)
let borderColor = borderColorConfiguration.getColor(self)
let borderWidth = isSelected || isHighlighted ? selectorBorderWidthSelected : selectorBorderWidth
let borderWidth = (isSelected || isHighlighted) && isEnabled ? selectorBorderWidthSelected : selectorBorderWidth
selectorView.backgroundColor = backgroundColor
selectorView.layer.borderColor = borderColor.cgColor

View File

@ -1,3 +1,10 @@
1.0.58
----------------
- CXTDT-542341 - RadioButtonItem - disabled state color/borderWidth
- CXTDT-542333 - RadioButtonItem - padding fix
- CXTDT-542295 - ButtonIcon - Disabled state
- ONEAPP-6360 - Notification - Accessiblity issues
1.0.57
----------------
- CXTDT-540077 - BadgeIndicator Font