Skip to content

Commit

Permalink
Minor design improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed Sep 11, 2024
1 parent ea09a55 commit c4c3d56
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ struct ConsoleListContentView: View {
Text("Empty")
.font(.subheadline)
.foregroundColor(.secondary)
.listRowInsets(EdgeInsets(top: 12, leading: 20, bottom: 12, trailing: 16))
} else {
ForEach(viewModel.visibleEntities, id: \.objectID) { entity in
let objectID = entity.objectID
Expand All @@ -33,11 +34,12 @@ struct ConsoleListContentView: View {
.onDisappear { viewModel.onDisappearCell(with: objectID) }
#endif
#if os(iOS)
.listRowInsets(EdgeInsets(top: 10, leading: 20, bottom: 10, trailing: 16))
.listRowInsets(EdgeInsets(top: 12, leading: 20, bottom: 12, trailing: 16))
#endif
}
}
footerView
.listRowInsets(EdgeInsets(top: 12, leading: 20, bottom: 12, trailing: 16))
}

@ViewBuilder
Expand Down
3 changes: 2 additions & 1 deletion Sources/PulseUI/Features/Console/List/ConsoleListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ private struct _ConsoleListView: View {
ConsoleSearchListContentView()
} else {
ConsoleToolbarView()
.listRowSeparator(.hidden, edges: .top)
.listRowSeparator(.hidden, edges: .all)
.listRowInsets(EdgeInsets(top: 4, leading: 16, bottom: 8, trailing: 16))
ConsoleListContentView()
}
}
Expand Down
15 changes: 7 additions & 8 deletions Sources/PulseUI/Features/Console/Views/ConsoleMessageCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,13 @@ struct ConsoleMessageCell: View {
.foregroundColor(titleColor)
Spacer()
Components.makePinView(for: message)
HStack(spacing: 3) {
ConsoleTimestampView(date: message.createdAt)
.overlay(alignment: .trailing) {
if isDisclosureNeeded {
ListDisclosureIndicator()
.offset(x: 11, y: 0)
}
}
ConsoleTimestampView(date: message.createdAt)
.padding(.trailing, 3)
}
.overlay(alignment: .trailing) {
if isDisclosureNeeded {
ListDisclosureIndicator()
.offset(x: 8, y: 0)
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions Sources/PulseUI/Features/Console/Views/ConsoleTaskCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ struct ConsoleTaskCell: View {
var body: some View {
VStack(alignment: .leading, spacing: 3) {
header
content // .padding(.top, 4)
details
content.padding(.top, 3)
}
}

Expand All @@ -36,6 +36,7 @@ struct ConsoleTaskCell: View {
info
Spacer()
ConsoleTimestampView(date: task.createdAt)
.padding(.trailing, 3)
}
.overlay(alignment: .leading) {
StatusIndicatorView(state: task.state(in: store))
Expand All @@ -44,7 +45,7 @@ struct ConsoleTaskCell: View {
.overlay(alignment: .trailing) {
if isDisclosureNeeded {
ListDisclosureIndicator()
.offset(x: 11)
.offset(x: 8)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,13 @@ struct ConsoleListOptionsView: View {
Button(action: { filters.options.isOnlyErrors.toggle() }) {
Text(Image(systemName: filters.options.isOnlyErrors ? "exclamationmark.octagon.fill" : "exclamationmark.octagon"))
.font(.body)
.foregroundColor(.red)
.foregroundColor(filters.options.isOnlyErrors ? .white : .secondary)
}
.cornerRadius(4)
.padding(.leading, 1)
.dynamicTypeSize(...DynamicTypeSize.accessibility1)
.padding(7)
.background(filters.options.isOnlyErrors ? .red : Color(.secondarySystemFill).opacity(0.8))
.clipShape(RoundedRectangle(cornerRadius: 10))
}
}

Expand Down

0 comments on commit c4c3d56

Please sign in to comment.