-
Notifications
You must be signed in to change notification settings - Fork 18
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: Dashboard parsing error #360
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,7 +102,6 @@ public extension DataLayer { | |
public let number: String | ||
public let org: String | ||
public let start: String? | ||
public let startDisplay: String | ||
public let startType: StartType | ||
public let end: String? | ||
public let dynamicUpgradeDeadline: String? | ||
|
@@ -112,9 +111,6 @@ public extension DataLayer { | |
public let courseImage: String | ||
public let courseAbout: String | ||
public let courseSharingUtmParameters: CourseSharingUtmParameters | ||
public let courseUpdates: String | ||
public let courseHandouts: String | ||
public let discussionURL: String | ||
public let videoOutline: String? | ||
public let isSelfPaced: Bool | ||
|
||
|
@@ -124,7 +120,6 @@ public extension DataLayer { | |
case number | ||
case org | ||
case start | ||
case startDisplay = "start_display" | ||
case startType = "start_type" | ||
case end | ||
case dynamicUpgradeDeadline = "dynamic_upgrade_deadline" | ||
|
@@ -134,9 +129,6 @@ public extension DataLayer { | |
case courseImage = "course_image" | ||
case courseAbout = "course_about" | ||
case courseSharingUtmParameters = "course_sharing_utm_parameters" | ||
case courseUpdates = "course_updates" | ||
case courseHandouts = "course_handouts" | ||
case discussionURL = "discussion_url" | ||
Comment on lines
-138
to
-139
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @miankhalid in the production app, we are using Should we remove these or keep them and create a ticket to get parity with the production app? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It makes sense to add these fields to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @volodymyr-chekyrta the only downside I'm seeing with this approach is we're fattening the response of the said API. Currently, there are courses on our side whose response for Blocks has reached size close to 2 to 3Mbs. If we keep on adding stuff, it'll only increase further. Plus, Glib will have to update his PR openedx/edx-platform#34273 even further. For now, I do think we can update this API but in the longer run we should look into splitting these responses into atleast 2 APIs where:
thoughts? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, sounds reasonable 💯 👍! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yep that's why I've asked if Glib can do some performance & load testing before and after the change in his PR. |
||
case videoOutline = "video_outline" | ||
case isSelfPaced = "is_self_paced" | ||
} | ||
|
@@ -147,7 +139,6 @@ public extension DataLayer { | |
number: String, | ||
org: String, | ||
start: String?, | ||
startDisplay: String, | ||
startType: StartType, | ||
end: String?, | ||
dynamicUpgradeDeadline: String?, | ||
|
@@ -157,9 +148,6 @@ public extension DataLayer { | |
courseImage: String, | ||
courseAbout: String, | ||
courseSharingUtmParameters: CourseSharingUtmParameters, | ||
courseUpdates: String, | ||
courseHandouts: String, | ||
discussionURL: String, | ||
videoOutline: String?, | ||
isSelfPaced: Bool | ||
) { | ||
|
@@ -168,7 +156,6 @@ public extension DataLayer { | |
self.number = number | ||
self.org = org | ||
self.start = start | ||
self.startDisplay = startDisplay | ||
self.startType = startType | ||
self.end = end | ||
self.dynamicUpgradeDeadline = dynamicUpgradeDeadline | ||
|
@@ -178,9 +165,6 @@ public extension DataLayer { | |
self.courseImage = courseImage | ||
self.courseAbout = courseAbout | ||
self.courseSharingUtmParameters = courseSharingUtmParameters | ||
self.courseUpdates = courseUpdates | ||
self.courseHandouts = courseHandouts | ||
self.discussionURL = discussionURL | ||
self.videoOutline = videoOutline | ||
self.isSelfPaced = isSelfPaced | ||
} | ||
|
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.
Consider this idea: If we render all fields optional, it would prevent any disruptions in functionality, even if certain fields remain unused or no data is received from the backend.
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.
Certainly, however, since we currently have no use for these fields, there's no need to waste resources on them.