-
Notifications
You must be signed in to change notification settings - Fork 37
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
Chip component update #1326
Chip component update #1326
Conversation
Backpack/Chip/Classes/BPKChip.swift
Outdated
if isSelected { | ||
accessibilityTraits.insert(.selected) | ||
} |
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.
uicontrol should give this to us for free.
Backpack/Chip/Classes/BPKChip.swift
Outdated
if !isEnabled { | ||
accessibilityTraits.insert(.notEnabled) | ||
} |
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.
uicontrol should give this to us for free.
let off: Colors | ||
// swiftlint:disable:next identifier_name | ||
let on: Colors |
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.
could we use 'normal' and 'selected' as options?
} | ||
@objc | ||
public enum BPKChipType: UInt { | ||
case option, select, dismiss |
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.
We also need a version to support the chevron down
containerStackView.trailingAnchor.constraint(equalTo: trailingAnchor, constant: -chipHorizontalSpacing), | ||
containerStackView.topAnchor.constraint(equalTo: topAnchor, constant: chipVerticalSpacing), | ||
bottomAnchor.constraint(equalTo: containerStackView.bottomAnchor, constant: chipVerticalSpacing) | ||
containerStackView.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -chipVerticalSpacing) |
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.
Can we flip these constraints? So we don't have to use the negative value?
This is already done throughout the codebase
bottomAnchor.constraint(equalTo: containerStackView.bottomAnchor, constant: chipVerticalSpacing)
# Conflicts: # UNRELEASED.md
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.
LGTM
Updated the chip to reflect the design on Figma
https://gojira.skyscanner.net/browse/KOA-5149
Remember to include the following changes:
UNRELEASED.md
README.md
Backpack.h
header fileIf you are curious about how we review, please read through the code review guidelines