-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verticals popup menu on CourseUnitView #190
Verticals popup menu on CourseUnitView #190
Conversation
@touchapp should we start the review of this PR or wait for:
|
private let landscapeTopSpacing: CGFloat = 75 | ||
|
||
let isDropdownActive: Bool = { | ||
Container.shared.resolve(ConfigProtocol.self)?.uiComponents.isVerticalsMenuEnabled ?? false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be better to pass this as an argument to the initializer or use ConfigProtocol from the viewModel
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -180,4 +180,21 @@ public class CourseUnitViewModel: ObservableObject { | |||
func trackFinishVerticalBackToOutlineClicked() { | |||
analytics.finishVerticalBackToOutlineClicked(courseId: courseID, courseName: courseName) | |||
} | |||
|
|||
func route(to vertical: CourseVertical) { | |||
if let index = verticals.firstIndex(where: {$0.id == vertical.id}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small improvement for readability
verticals.firstIndex(where: {$0.id == vertical.id})
-> verticals.firstIndex(where: { $0.id == vertical.id })
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Great feature! |
fixed merge conflict and corrected code according @volodymyr-chekyrta comments |
Added verticals popup menu to CourseUnitView. It closed by feature key
VERTICALS_MENU_ENABLED
ofUI_COMPONENTS
category, to test it need to use config from Config PR #157.This issue related to: #156
Sample with key
Simulator.Screen.Recording.-.iPhone.15.-.2023-12-06.at.16.37.10.mp4
Sample with disabled or without key
Simulator.Screen.Recording.-.iPhone.15.-.2023-12-06.at.16.36.25.mp4