-
Notifications
You must be signed in to change notification settings - Fork 111
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
Fix calendar not loading when calendar context limit is increased #2991
base: master
Are you sure you want to change the base?
Conversation
refs: MBL-18102 affects: Student, Teacher, Parent release note: Fixed calendar not displaying the filter list and events properly. test plan: - Enable "Increase calendar context limit" in course settings on web. - Go to all apps, check if calendar loads. - Check if calendar filter loads, pull to refresh doesn't show an error page. - Test if teacher app still has a functioning calendar filter (max 10/20 events).
Release Note:Fixed calendar not displaying the filter list and events properly. Affected Apps: Student, Teacher, Parent
|
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.
QA + 1
case .extended(let value): return value | ||
case .unlimited: return 9999 | ||
} | ||
} | ||
} | ||
|
||
public extension Optional where Wrapped == AppEnvironment.App { |
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.
I noticed that on this extension, if we haveisCalendarFilterLimitEnabled
always evaluated to false for Student app. I am wondering whether we need for Student or Parent apps to still worry about parsing this property.
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.
Not really, I also thought about this but left it as-is to save some time but it would be a nice future improvement.
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.
QA + 1
Code + 1
Thanks @vargaat !
But I have few concerns for you to consider.
@@ -17,7 +17,9 @@ | |||
// | |||
|
|||
public struct GetEnvironmentSettingsRequest: APIRequestable { | |||
public typealias Response = [String: Bool] | |||
public struct Response: Codable { | |||
public let calendar_contexts_limit: Int? |
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.
Can we say the it is confirmed the BE team will continue using this for future?
Or, perhaps, would be better to keep a logic to check for the Bool value as well? (The old way).
What changed?
/api/v1/settings/environment.json
: thecalendar_contexts_limit
field no longer returns a bool whether it's enabled or not but returns the actual limit as an integer in case theIncrease calendar context limit
toggle is enabled. If this setting is not enabled the API won't return this field at all.refs: MBL-18102
affects: Student, Teacher, Parent
release note: Fixed calendar not displaying the filter list and events properly.
test plan:
Checklist