Skip to content

Commit 726a02b

Browse files
authored
Fix a truncated session title in Japanese (#33)
* Use fixed size because found a truncated title in the Japanese title * Remove stacks that were not needed and correct title collapses
1 parent 4383b60 commit 726a02b

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

MyLibrary/Sources/ScheduleFeature/Detail.swift

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -76,37 +76,32 @@ public struct ScheduleDetailView: View {
7676

7777
public var body: some View {
7878
ScrollView {
79-
HStack {
80-
Spacer()
81-
VStack {
82-
VStack(alignment: .leading, spacing: 16) {
83-
Text(LocalizedStringKey(store.title), bundle: .module)
84-
.font(.title.bold())
85-
Text(LocalizedStringKey(store.description), bundle: .module)
79+
VStack(alignment: .leading, spacing: 16) {
80+
Text(LocalizedStringKey(store.title), bundle: .module)
81+
.font(.title.bold())
82+
Text(LocalizedStringKey(store.description), bundle: .module)
83+
.font(.callout)
84+
if let requirements = store.requirements {
85+
VStack(alignment: .leading) {
86+
Text("Requirements", bundle: .module)
87+
.font(.subheadline.bold())
88+
.foregroundStyle(Color.accentColor)
89+
Text(LocalizedStringKey(requirements), bundle: .module)
8690
.font(.callout)
87-
if let requirements = store.requirements {
88-
VStack(alignment: .leading) {
89-
Text("Requirements", bundle: .module)
90-
.font(.subheadline.bold())
91-
.foregroundStyle(Color.accentColor)
92-
Text(LocalizedStringKey(requirements), bundle: .module)
93-
.font(.callout)
94-
}
95-
.padding()
96-
.overlay {
97-
RoundedRectangle(cornerRadius: 16)
98-
.stroke(Color.accentColor, lineWidth: 1)
99-
}
100-
}
10191
}
102-
.padding(.horizontal)
103-
.padding(.bottom)
104-
.frame(maxWidth: 700) // Readable content width for iPad
105-
speakers
106-
.frame(maxWidth: 700) // Readable content width for iPad
92+
.padding()
93+
.overlay {
94+
RoundedRectangle(cornerRadius: 16)
95+
.stroke(Color.accentColor, lineWidth: 1)
96+
}
10797
}
108-
Spacer()
10998
}
99+
.padding(.horizontal)
100+
.padding(.bottom)
101+
.frame(maxWidth: 700) // Readable content width for iPad
102+
103+
speakers
104+
.frame(maxWidth: 700) // Readable content width for iPad
110105
}
111106
.sheet(item: $store.scope(state: \.destination?.safari, action: \.destination.safari)) {
112107
sheetStore in

0 commit comments

Comments
 (0)