Skip to content

Commit

Permalink
fix: 馃悰 [IOSSDKBUG-67]DataTable blinks redline when toggling mod (#643)
Browse files Browse the repository at this point in the history
  • Loading branch information
shengxu7 committed Feb 21, 2024
1 parent a6c77ea commit 41309df
Showing 1 changed file with 30 additions and 31 deletions.
61 changes: 30 additions & 31 deletions Sources/FioriSwiftUICore/DataTable/GridTableView.swift
Expand Up @@ -41,32 +41,38 @@ struct BannerView: View {
if self.data.title == "" {
EmptyView()
} else {
HStack {
VStack {
Color.preferredColor(.negativeLabel).frame(height: 4)

HStack {
Spacer()

Image(systemName: "exclamationmark.triangle")
.foregroundColor(self.data.level.tintColor)
.fixedSize()
.frame(width: 16, height: 18)

Spacer().frame(width: 6)
Text(self.data.title)
.font(.fiori(forTextStyle: .footnote))
.foregroundColor(self.data.level.tintColor)
HStack {
Spacer()

Image(systemName: "exclamationmark.triangle")
.foregroundColor(self.data.level.tintColor)
.fixedSize()
.frame(width: 16, height: 18)

Spacer().frame(width: 6)
Text(self.data.title)
.font(.fiori(forTextStyle: .footnote))
.foregroundColor(self.data.level.tintColor)

Spacer()
}

Spacer()
Button {
self.action?()
self.showBanner = false
} label: {
Image(systemName: "xmark")
.foregroundColor(Color.preferredColor(.quaternaryLabel))
}
}
.padding(EdgeInsets(top: 13, leading: 8, bottom: 13, trailing: 8))

Button {
self.action?()
self.showBanner = false
} label: {
Image(systemName: "xmark")
.foregroundColor(Color.preferredColor(.quaternaryLabel))
}
Color.preferredColor(.primaryLabel).frame(height: 0.33).opacity(0.7)
}
.padding(EdgeInsets(top: 13, leading: 8, bottom: 13, trailing: 8))
.background(Color.preferredColor(.header))
.onTapGesture {
self.showBanner = false
Expand All @@ -86,16 +92,9 @@ struct BannerViewModifier: ViewModifier {

Group {
if self.isPresented {
VStack {
Color.preferredColor(.negativeLabel).frame(height: 4)

BannerView(data: self.data, showBanner: self.$isPresented)
.animation(.easeOut, value: self.isPresented)
.transition(AnyTransition.move(edge: .top).combined(with: .opacity))

Color.preferredColor(.primaryLabel).frame(height: 0.33).opacity(0.7)
}
.background(Color.preferredColor(.header))
BannerView(data: self.data, showBanner: self.$isPresented)
.animation(.easeOut, value: self.isPresented)
.transition(AnyTransition.move(edge: .top).combined(with: .opacity))
}
}
.accessibilitySortPriority(100)
Expand Down

0 comments on commit 41309df

Please sign in to comment.