mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:31:27 +00:00
Room screen: timeline message bubbles (#91)
* #34 Create `TimelineItemStylerView` * #34 Add styler view into different type of cells * #34 Use placeholder avatar image on room list * #34 Add `isOutgoing` param to event based timeline item * #34 Compute `isOutgoing` for timeline items * #34 Update sender info view in timeline * #34 Update mock timeline items * #34 Rename `EventBasedTimelineView` to `EventBasedTimelineSenderView` * #34 Change padding on timeline cells * #34 Create `TimelineItemStylerView` to move content into a bubble if needed * #34 Use styler view in all of the timeline item views * #34 Make timestamp more readable on images * #34 Little layout tweaks * #34 Add changelog * #34 Fix code smells * #34 Set text colors on timeline items * #34 Fix background color of the timeline * #34 Fix PR remarks * #34 Set background colors explicitly on remaining screens * #34 Reduce min bubble width and make it a scaled metric * #34 Refactor `PlaceholderAvatarImage` to accept a text only * #34 Fix code smell * #34 Fix further comments
This commit is contained in:
@@ -50,6 +50,7 @@ struct BugReport: View {
|
||||
}
|
||||
.navigationTitle(ElementL10n.titleActivityBugReport)
|
||||
}
|
||||
.background(Color.element.background, ignoresSafeAreaEdges: .all)
|
||||
}
|
||||
|
||||
/// The main content of the view to be shown in a scroll view.
|
||||
@@ -59,11 +60,11 @@ struct BugReport: View {
|
||||
.accessibilityIdentifier("reportBugDescription")
|
||||
ZStack(alignment: .topLeading) {
|
||||
RoundedRectangle(cornerRadius: 8, style: .continuous)
|
||||
.fill(Color(UIColor.secondarySystemBackground))
|
||||
.fill(Color.element.system)
|
||||
|
||||
if context.reportText.isEmpty {
|
||||
Text(ElementL10n.sendBugReportPlaceholder)
|
||||
.foregroundColor(Color(UIColor.placeholderText))
|
||||
.foregroundColor(Color.element.secondaryContent)
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 12)
|
||||
}
|
||||
@@ -131,10 +132,14 @@ struct BugReport: View {
|
||||
|
||||
struct BugReport_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
Group {
|
||||
let viewModel = BugReportViewModel(bugReportService: MockBugReportService(), screenshot: Asset.Images.appLogo.image)
|
||||
BugReport(context: viewModel.context)
|
||||
.previewInterfaceOrientation(.portrait)
|
||||
}
|
||||
body.preferredColorScheme(.light)
|
||||
body.preferredColorScheme(.dark)
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
static var body: some View {
|
||||
let viewModel = BugReportViewModel(bugReportService: MockBugReportService(), screenshot: Asset.Images.appLogo.image)
|
||||
BugReport(context: viewModel.context)
|
||||
.previewInterfaceOrientation(.portrait)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user