Skip to content
Open
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
82 changes: 80 additions & 2 deletions Horizon/Horizon/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -4151,6 +4151,10 @@
}
}
},
"%d courses" : {
"comment" : "A string describing the number of courses in a program. The argument is the number of courses.",
"isCommentAutoGenerated" : true
},
"%d of %d" : {
"comment" : "A string that describes a course list widget item, including its index within a list of multiple items. The first argument is the index of the item in the list, starting at 1. The second argument is the total number of items in the list.",
"isCommentAutoGenerated" : true,
Expand Down Expand Up @@ -9526,6 +9530,7 @@
}
},
"All" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -10809,6 +10814,10 @@
}
}
},
"All programs" : {
"comment" : "Title for a filter option that shows all programs.",
"isCommentAutoGenerated" : true
},
"Almaty (+05:00/+05:00)" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -30816,6 +30825,7 @@
}
},
"complete" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -35194,6 +35204,7 @@
},
"Count of visible courses is %@" : {
"comment" : "A label displaying the number of courses that are currently visible in the list. The argument is the count of visible courses.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -35450,6 +35461,10 @@
}
}
},
"Count of visible items is %@" : {
"comment" : "A label that describes the number of items currently visible in the list. The argument is the count of visible items.",
"isCommentAutoGenerated" : true
},
"Count of visible notes is %@. " : {
"comment" : "A label that describes the number of notes that are currently visible in the list. The argument is the number of visible notes.",
"isCommentAutoGenerated" : true,
Expand Down Expand Up @@ -35968,6 +35983,7 @@
},
"Course is Locked" : {
"comment" : "Accessibility label for a course that is not currently enrolled.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -37002,6 +37018,10 @@
}
}
},
"Courses" : {
"comment" : "Name of the \"Courses\" tab in the Learn tab bar.",
"isCommentAutoGenerated" : true
},
"Courses activities, Widget 1 of 3" : {
"comment" : "A label describing a widget that shows the user how many courses they have completed.",
"isCommentAutoGenerated" : true,
Expand Down Expand Up @@ -42157,8 +42177,13 @@
}
}
},
"Double tap to %@" : {
"comment" : "A string that can be read by VoiceOver to describe an action that can be taken in the Learn more button. The string should be in the form \"Double tap to [action]\". The argument is the string “View course”, the string “Start learning” or the string “Resume learning”.",
"isCommentAutoGenerated" : true
},
"Double tap to back to all programs" : {
"comment" : "A description of the action to go back to viewing all programs.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -46025,6 +46050,10 @@
}
}
},
"Double tap to load more programs" : {
"comment" : "Accessibility hint for the \"See More\" button in the Learn Program List View.",
"isCommentAutoGenerated" : true
},
"Double tap to open course" : {
"comment" : "Accessibility hint text for a course in the course list.",
"isCommentAutoGenerated" : true,
Expand Down Expand Up @@ -47835,6 +47864,7 @@
},
"Double-tap to collapse" : {
"comment" : "A hint for collapsing the course dropdown.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -48093,6 +48123,7 @@
},
"Double-tap to expand" : {
"comment" : "A hint that appears when the user taps the title of a course in the course dropdown to expand it.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -68409,7 +68440,6 @@
}
},
"In progress" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -74813,6 +74843,14 @@
}
}
},
"Learning Library" : {
"comment" : "Name of the Learning Library tab in the Learn tab bar.",
"isCommentAutoGenerated" : true
},
"learningLibrary" : {
"comment" : "A placeholder text for a learning library tab.",
"isCommentAutoGenerated" : true
},
"Like" : {
"comment" : "A label describing an action that likes something.",
"isCommentAutoGenerated" : true,
Expand Down Expand Up @@ -92539,6 +92577,7 @@
},
"Not Started" : {
"comment" : "Name of the course status when the user has not started the course.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -105915,6 +105954,7 @@
}
},
"Program overview" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -106170,6 +106210,10 @@
}
}
},
"Programs" : {
"comment" : "Name of the \"Programs\" tab in the Learn tab bar.",
"isCommentAutoGenerated" : true
},
"Progress: %d percent complete. " : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -110279,7 +110323,6 @@
}
},
"Resume learning" : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -115404,6 +115447,14 @@
}
}
},
"Search courses" : {
"comment" : "Placeholder text for the search bar in the Learn Course List View.",
"isCommentAutoGenerated" : true
},
"Search programs" : {
"comment" : "Placeholder text for the search bar in the Learn Program List View.",
"isCommentAutoGenerated" : true
},
"See full course list" : {
"comment" : "A button label that links to a view showing all courses.",
"isCommentAutoGenerated" : true,
Expand Down Expand Up @@ -117221,6 +117272,7 @@
},
"Selected filter is %@. Double tap to select another filter" : {
"comment" : "A hint that appears when a user taps on a filter button in the course filtering view. The argument is the name of the currently selected filter.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -117477,6 +117529,18 @@
}
}
},
"Selected filter is %@. Double tap to select another filter. %@" : {
"comment" : "A hint that describes the current state of the filter selection list, including the currently selected filter and whether the list is expanded or collapsed.",
"isCommentAutoGenerated" : true,
"localizations" : {
"en" : {
"stringUnit" : {
"state" : "new",
"value" : "Selected filter is %1$@. Double tap to select another filter. %2$@"
}
}
}
},
"Selected label is %@. " : {
"comment" : "A description of an accessibility label for the selection popover.",
"isCommentAutoGenerated" : true,
Expand Down Expand Up @@ -117995,6 +118059,7 @@
},
"Selected program is %@. " : {
"comment" : "A label that describes the currently selected program. The argument is the name of the program.",
"extractionState" : "stale",
"isCommentAutoGenerated" : true,
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -124414,6 +124479,10 @@
}
}
},
"Start learning" : {
"comment" : "The text that should be displayed as the title of a button that, when tapped, directs the user to start learning a course.",
"isCommentAutoGenerated" : true
},
"Start quiz" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -143977,6 +144046,10 @@
}
}
},
"View course" : {
"comment" : "The title of the button that appears when a course is marked as completed.",
"isCommentAutoGenerated" : true
},
"View submission" : {
"localizations" : {
"ar" : {
Expand Down Expand Up @@ -150396,6 +150469,7 @@
}
},
"You aren’t currently enrolled in a course or program." : {
"extractionState" : "stale",
"localizations" : {
"ar" : {
"stringUnit" : {
Expand Down Expand Up @@ -150907,6 +150981,10 @@
}
}
},
"You aren’t currently enrolled in a program." : {
"comment" : "A message displayed when a user has no programs they are enrolled in.",
"isCommentAutoGenerated" : true
},
"You have been invited to join" : {
"extractionState" : "stale",
"localizations" : {
Expand Down
24 changes: 24 additions & 0 deletions Horizon/Horizon/Sources/Common/Utilities/UIScreen+.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// This file is part of Canvas.
// Copyright (C) 2026-present Instructure, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

import SwiftUI

extension UIScreen {
static let width = UIScreen.main.bounds.width
static let height = UIScreen.main.bounds.height
}
49 changes: 49 additions & 0 deletions Horizon/Horizon/Sources/Common/View/SeeMoreButton.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
//
// This file is part of Canvas.
// Copyright (C) 2026-present Instructure, Inc.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
//

import HorizonUI
import SwiftUI

struct SeeMoreButton: View {
private let accessibilityHint: String
private let type: HorizonUI.ButtonStyles.ButtonType
private let onTap: () -> Void

init(
accessibilityHint: String,
type: HorizonUI.ButtonStyles.ButtonType = .darkOutline,
onTap: @escaping () -> Void
) {
self.accessibilityHint = accessibilityHint
self.type = type
self.onTap = onTap
}

var body: some View {
HorizonUI.PrimaryButton(
String(localized: "Show more", bundle: .horizon),
type: type,
isSmall: true,
fillsWidth: true
) {
onTap()
}
.accessibilityLabel(String(localized: "Show more"))
.accessibilityHint(accessibilityHint)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,9 @@ import UIKit

enum CourseListAssembly {
static func makeViewModel(courses: [CourseCardModel]) -> CourseListViewModel {
let onTapProgram: (ProgramSwitcherModel?, WeakViewController) -> Void = { program, viewController in
AppEnvironment.shared.switchToLearnTab(with: program, from: viewController)
}
return CourseListViewModel(
courses: courses,
router: AppEnvironment.shared.router,
onTapProgram: onTapProgram
)
}

Expand Down
Loading