mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Only run Compound tests when files are changed in Compound. (#4611)
* Only run Compound tests when files are changed in Compound. * Fix warnings about missing spacing. * Fix warnings about inner type shadowing.
This commit is contained in:
@@ -235,7 +235,7 @@ public struct CompoundButtonStyle_Previews: PreviewProvider, TestablePreview {
|
||||
}
|
||||
|
||||
public static func buttons(_ size: CompoundButtonStyle.Size) -> some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
Button("Super") { }
|
||||
.buttonStyle(.compound(.super, size: size))
|
||||
|
||||
|
||||
@@ -168,9 +168,9 @@ struct CompoundIcon_Previews: PreviewProvider, TestablePreview {
|
||||
}
|
||||
|
||||
static var accessibilityIcons: some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
ForEach(DynamicTypeSize.allCases, id: \.self) { size in
|
||||
HStack {
|
||||
HStack(spacing: 8) {
|
||||
CompoundIcon(\.userProfile, size: .xSmall, relativeTo: .compound.bodyXS)
|
||||
CompoundIcon(\.userProfile, size: .small, relativeTo: .compound.bodySM)
|
||||
CompoundIcon(\.userProfile, size: .medium, relativeTo: .compound.bodyLG)
|
||||
@@ -219,7 +219,7 @@ struct CompoundIcon_Previews: PreviewProvider, TestablePreview {
|
||||
}
|
||||
|
||||
static var buttons: some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
Button { } label: {
|
||||
Label { Text("Body Large") } icon: {
|
||||
CompoundIcon(\.userProfile, size: .medium, relativeTo: .compound.bodyLG)
|
||||
|
||||
@@ -39,7 +39,7 @@ private struct ScaledFrameModifier: ViewModifier {
|
||||
|
||||
struct ScaledFrameModifier_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
ForEach(DynamicTypeSize.allCases, id: \.self) { size in
|
||||
likeButtonLabel
|
||||
.dynamicTypeSize(size)
|
||||
|
||||
@@ -32,7 +32,7 @@ private struct ScaledOffsetModifier: ViewModifier {
|
||||
|
||||
struct ScaledOffsetModifier_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
ForEach(DynamicTypeSize.allCases, id: \.self) { size in
|
||||
verifiedUserComposite
|
||||
.dynamicTypeSize(size)
|
||||
|
||||
@@ -37,7 +37,7 @@ private struct ScaledPaddingModifier: ViewModifier {
|
||||
|
||||
struct ScaledPaddingModifier_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
VStack {
|
||||
VStack(spacing: 8) {
|
||||
ForEach(DynamicTypeSize.allCases, id: \.self) { size in
|
||||
userProfileButtonLabel
|
||||
.dynamicTypeSize(size)
|
||||
|
||||
@@ -27,19 +27,19 @@ public struct ListRow<Icon: View, DetailsIcon: View, CustomContent: View, Select
|
||||
let label: ListRowLabel<Icon>
|
||||
let details: ListRowDetails<DetailsIcon>?
|
||||
|
||||
public enum Kind<CustomContent: View, SelectionValue: Hashable> {
|
||||
public enum Kind<CustomView: View, Selection: Hashable> {
|
||||
case label
|
||||
case button(action: () -> Void)
|
||||
case navigationLink(action: () -> Void)
|
||||
case picker(selection: Binding<SelectionValue>, items: [(title: String, tag: SelectionValue)])
|
||||
case picker(selection: Binding<Selection>, items: [(title: String, tag: Selection)])
|
||||
case toggle(Binding<Bool>)
|
||||
case inlinePicker(selection: Binding<SelectionValue>, items: [(title: String, tag: SelectionValue)])
|
||||
case inlinePicker(selection: Binding<Selection>, items: [(title: String, tag: Selection)])
|
||||
case selection(isSelected: Bool, action: () -> Void)
|
||||
case multiSelection(isSelected: Bool, action: () -> Void)
|
||||
case textField(text: Binding<String>, axis: Axis?)
|
||||
case secureField(text: Binding<String>)
|
||||
|
||||
case custom(() -> CustomContent)
|
||||
case custom(() -> CustomView)
|
||||
|
||||
public static func textField(text: Binding<String>) -> Self {
|
||||
.textField(text: text, axis: nil)
|
||||
|
||||
Reference in New Issue
Block a user