diff --git a/Modules/ContentKit/Examples/ContentKitExample/Sources/ActivityDetailsView.swift b/Modules/ContentKit/Examples/ContentKitExample/Sources/ActivityDetailsView.swift index 8519802a2f..5d3cd64de3 100644 --- a/Modules/ContentKit/Examples/ContentKitExample/Sources/ActivityDetailsView.swift +++ b/Modules/ContentKit/Examples/ContentKitExample/Sources/ActivityDetailsView.swift @@ -131,7 +131,7 @@ struct ActivityDetailsView: View { Section("Details (in: \(l10n.language.identifier))") { Text(self.activity.details.title) .font(.title) - Text(self.activity.details.subtitle) + Text(self.activity.details.subtitle ?? "no subtitle") .font(.title2) Markdown(self.activity.details.description) .markdownTheme(.gitHub) diff --git a/Modules/ContentKit/Resources/Content/activities/examples/sample_6-2FE0B8BDD1B0497F87B32A390119DB98.activity.yml b/Modules/ContentKit/Resources/Content/activities/examples/sample_6-2FE0B8BDD1B0497F87B32A390119DB98.activity.yml index 0d288455d8..338b8e9a57 100644 --- a/Modules/ContentKit/Resources/Content/activities/examples/sample_6-2FE0B8BDD1B0497F87B32A390119DB98.activity.yml +++ b/Modules/ContentKit/Resources/Content/activities/examples/sample_6-2FE0B8BDD1B0497F87B32A390119DB98.activity.yml @@ -43,7 +43,7 @@ l10n: icon: sample_6 title: Activité d'exemple 6 - subtitle: pour le développement + subtitle: null short_description: > Nunc Corinthiaci anilem, rerum primo et ambos fata? Et Drya aliis abest, *adeunt @@ -74,7 +74,7 @@ l10n: icon: sample_6 title: Sample activity 6 - subtitle: for development + subtitle: null short_description: > Nunc Corinthiaci anilem, rerum primo et ambos fata? Et Drya aliis abest, *adeunt diff --git a/Modules/ContentKit/Sources/Activity/Activity.swift b/Modules/ContentKit/Sources/Activity/Activity.swift index d43b74804e..a330bd15e2 100644 --- a/Modules/ContentKit/Sources/Activity/Activity.swift +++ b/Modules/ContentKit/Sources/Activity/Activity.swift @@ -132,7 +132,7 @@ public extension Activity { public let icon: String public let title: String - public let subtitle: String + public let subtitle: String? public let shortDescription: String public let description: String public let instructions: String diff --git a/Modules/GameEngineKit/Sources/Views/Activity/ActivityDetailsView.swift b/Modules/GameEngineKit/Sources/Views/Activity/ActivityDetailsView.swift index 3c9858e32d..9ad9929dc1 100644 --- a/Modules/GameEngineKit/Sources/Views/Activity/ActivityDetailsView.swift +++ b/Modules/GameEngineKit/Sources/Views/Activity/ActivityDetailsView.swift @@ -33,9 +33,11 @@ public struct ActivityDetailsView: View { .font(.largeTitle) .bold() - Text(self.activity.details.subtitle) - .font(.title2) - .foregroundColor(.secondary) + if let subtitle = self.activity.details.subtitle { + Text(subtitle) + .font(.title2) + .foregroundColor(.secondary) + } Text(self.activity.details.shortDescription) .font(.subheadline) diff --git a/Specs/jtd/activity.jtd.json b/Specs/jtd/activity.jtd.json index 11ec3518e3..58261e4c7e 100644 --- a/Specs/jtd/activity.jtd.json +++ b/Specs/jtd/activity.jtd.json @@ -99,7 +99,8 @@ "type": "string" }, "subtitle": { - "type": "string" + "type": "string", + "nullable": true }, "short_description": { "type": "string"