Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Features/MarketInsight/Sources/Scenes/ChartScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ public struct ChartScene: View {
model: AssetPriceDetailsViewModel(priceData: priceData)
)
}
.presentationDetentsForCurrentDeviceSize(expandable: true)
.presentationBackground(Colors.grayBackground)
}
}
Expand Down
3 changes: 1 addition & 2 deletions Features/Perpetuals/Sources/Scenes/PerpetualScene.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public struct PerpetualScene: View {
case .data(let data): CandlestickChartView(data: data, period: model.currentPeriod, lineModels: model.chartLineModels)
case .error(let error):
StateEmptyView(
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,
title: error.networkOrNoDataDescription,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

While moving error.networkOrNoDataDescription to the title parameter makes the title dynamic, it's generally better practice to use a concise, generic title for error states (e.g., 'An error occurred!') and provide the specific details in the description parameter. This improves readability and user experience, especially if networkOrNoDataDescription can be verbose. The StateEmptyView is designed to accommodate both a title and a description.

Suggested change
title: error.networkOrNoDataDescription,
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,

image: Images.ErrorConent.error
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ public struct ChartStateView: View {
ChartView(model: model)
case .error(let error):
StateEmptyView(
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,
title: error.networkOrNoDataDescription,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Similar to the change in PerpetualScene.swift, using error.networkOrNoDataDescription directly as the title might make the title too long or less user-friendly. It's recommended to keep a generic error title and use the description parameter for the specific error details provided by error.networkOrNoDataDescription. This maintains a consistent and clear error presentation.

Suggested change
title: error.networkOrNoDataDescription,
title: Localized.Errors.errorOccured,
description: error.networkOrNoDataDescription,

image: Images.ErrorConent.error
)
}
Expand Down